<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/testing/__init__.py, branch meson</title>
<subtitle>github.com: numpy/numpy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/'/>
<entry>
<title>ENH: allow importlib.LazyLoader to work with numpy and add test of this (#22045)</title>
<updated>2022-07-27T13:05:58+00:00</updated>
<author>
<name>Dan Schult</name>
<email>dschult@colgate.edu</email>
</author>
<published>2022-07-27T13:05:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=6e1557900da3c2cc8455449e7e76b07f7c36b32a'/>
<id>6e1557900da3c2cc8455449e7e76b07f7c36b32a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Add `IS_PYSTON` to `np.testing.__all__`</title>
<updated>2021-11-05T10:11:12+00:00</updated>
<author>
<name>Bas van Beek</name>
<email>b.f.van.beek@vu.nl</email>
</author>
<published>2021-11-05T10:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=b9c0a231665a30836964e8c94ba2f83a08255be2'/>
<id>b9c0a231665a30836964e8c94ba2f83a08255be2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Configurable allocator (#17582)</title>
<updated>2021-10-25T18:53:48+00:00</updated>
<author>
<name>Matti Picus</name>
<email>matti.picus@gmail.com</email>
</author>
<published>2021-10-25T18:53:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=84e0707afa587e7655410561324ac36085db2b95'/>
<id>84e0707afa587e7655410561324ac36085db2b95</id>
<content type='text'>
Fixes gh-17467. Adds a public struct to hold memory manipulation routines PyDataMem_Handler and two new API functions PyDataMem_SetHandler to replace the current routines with the new ones, and PyDataMem_GetHandlerName to get the string name of the current routines (either globally or for a specific ndarray object). This also changes the size of the ndarray object to hold the PyDataMem_Handler active when it was created so subsequent actions on its data memory will remain consistent.

Tests and documentation are included. Along the way, I found some places in the code where the current policy is inconsistent (all data memory handling should have gone through npy_*_cache not PyDataMem_*) so even if this is rejected it might improve the cache handling.

The PyDataMem_Handler has fields to override memcpy, these are currently not implemented: memcpy in the code base is untouched. I think this PR is invasive enough as-is, if desired memcpy can be handled in a follow-up PR.


* ENH: add and use global configurable memory routines

* ENH: add tests and a way to compile c-extensions from tests

* fix allocation/free exposed by tests

* DOC: document the new APIs (and some old ones too)

* BUG: return void from FREE, also some cleanup

* MAINT: changes from review

* fixes from linter

* setting ndarray-&gt;descr on 0d or scalars mess with FREE

* make scalar allocation more consistent wrt np_alloc_cache

* change formatting for sphinx

* remove memcpy variants

* update to match NEP 49

* ENH: add a python-level get_handler_name

* ENH: add core.multiarray.get_handler_name

* Allow closure-like definition of the data mem routines

* Fix incompatible pointer warnings

* Note PyDataMemAllocator and PyMemAllocatorEx differentiation

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* Redefine default allocator handling

* Always allocate new arrays using the current_handler

* Search for the mem_handler name of the data owner

* Sub-comparisons don't need a local mem_handler

* Make the default_handler a valid PyDataMem_Handler

* Fix PyDataMem_SetHandler description (NEP discussion)

* Pass the allocators by reference

* Implement allocator context-locality

* Fix documentation, make PyDataMem_GetHandler return const

* remove import of setuptools==49.1.3, doesn't work on python3.10

* Fix refcount leaks

* fix function signatures in test

* Return early on PyDataMem_GetHandler error (VOID_compare)

* Add context/thread-locality tests, allow testing custom policies

* ENH: add and use global configurable memory routines

* ENH: add tests and a way to compile c-extensions from tests

* fix allocation/free exposed by tests

* DOC: document the new APIs (and some old ones too)

* BUG: return void from FREE, also some cleanup

* MAINT: changes from review

* fixes from linter

* setting ndarray-&gt;descr on 0d or scalars mess with FREE

* make scalar allocation more consistent wrt np_alloc_cache

* change formatting for sphinx

* remove memcpy variants

* update to match NEP 49

* ENH: add a python-level get_handler_name

* ENH: add core.multiarray.get_handler_name

* Allow closure-like definition of the data mem routines

* Fix incompatible pointer warnings

* Note PyDataMemAllocator and PyMemAllocatorEx differentiation

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* Redefine default allocator handling

* Always allocate new arrays using the current_handler

* Search for the mem_handler name of the data owner

* Sub-comparisons don't need a local mem_handler

* Make the default_handler a valid PyDataMem_Handler

* Fix PyDataMem_SetHandler description (NEP discussion)

* Pass the allocators by reference

* remove import of setuptools==49.1.3, doesn't work on python3.10

* fix function signatures in test

* try to fix cygwin extension building

* YAPF mem_policy test

* Less empty lines, more comments (tests)

* Apply suggestions from code review (set an exception and)

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* skip test on cygwin

* update API hash for changed signature

* TST: add gc.collect to make sure cycles are broken

* Implement thread-locality for PyPy

Co-authored-by: Sebastian Berg &lt;sebastian@sipsolutions.net&gt;

* Update numpy/core/tests/test_mem_policy.py

Co-authored-by: Sebastian Berg &lt;sebastian@sipsolutions.net&gt;

* fixes from review

* update circleci config

* fix test

* make the connection between OWNDATA and having a allocator handle more explicit

* improve docstring, fix flake8 for tests

* update PyDataMem_GetHandler() from review

* Implement allocator lifetime management

* update NEP and add best-effort handling of error in PyDataMem_UserFREE

* ENH: fix and test for blindly taking ownership of data

* Update doc/neps/nep-0049.rst

Co-authored-by: Elias Koromilas &lt;elias.koromilas@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes gh-17467. Adds a public struct to hold memory manipulation routines PyDataMem_Handler and two new API functions PyDataMem_SetHandler to replace the current routines with the new ones, and PyDataMem_GetHandlerName to get the string name of the current routines (either globally or for a specific ndarray object). This also changes the size of the ndarray object to hold the PyDataMem_Handler active when it was created so subsequent actions on its data memory will remain consistent.

Tests and documentation are included. Along the way, I found some places in the code where the current policy is inconsistent (all data memory handling should have gone through npy_*_cache not PyDataMem_*) so even if this is rejected it might improve the cache handling.

The PyDataMem_Handler has fields to override memcpy, these are currently not implemented: memcpy in the code base is untouched. I think this PR is invasive enough as-is, if desired memcpy can be handled in a follow-up PR.


* ENH: add and use global configurable memory routines

* ENH: add tests and a way to compile c-extensions from tests

* fix allocation/free exposed by tests

* DOC: document the new APIs (and some old ones too)

* BUG: return void from FREE, also some cleanup

* MAINT: changes from review

* fixes from linter

* setting ndarray-&gt;descr on 0d or scalars mess with FREE

* make scalar allocation more consistent wrt np_alloc_cache

* change formatting for sphinx

* remove memcpy variants

* update to match NEP 49

* ENH: add a python-level get_handler_name

* ENH: add core.multiarray.get_handler_name

* Allow closure-like definition of the data mem routines

* Fix incompatible pointer warnings

* Note PyDataMemAllocator and PyMemAllocatorEx differentiation

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* Redefine default allocator handling

* Always allocate new arrays using the current_handler

* Search for the mem_handler name of the data owner

* Sub-comparisons don't need a local mem_handler

* Make the default_handler a valid PyDataMem_Handler

* Fix PyDataMem_SetHandler description (NEP discussion)

* Pass the allocators by reference

* Implement allocator context-locality

* Fix documentation, make PyDataMem_GetHandler return const

* remove import of setuptools==49.1.3, doesn't work on python3.10

* Fix refcount leaks

* fix function signatures in test

* Return early on PyDataMem_GetHandler error (VOID_compare)

* Add context/thread-locality tests, allow testing custom policies

* ENH: add and use global configurable memory routines

* ENH: add tests and a way to compile c-extensions from tests

* fix allocation/free exposed by tests

* DOC: document the new APIs (and some old ones too)

* BUG: return void from FREE, also some cleanup

* MAINT: changes from review

* fixes from linter

* setting ndarray-&gt;descr on 0d or scalars mess with FREE

* make scalar allocation more consistent wrt np_alloc_cache

* change formatting for sphinx

* remove memcpy variants

* update to match NEP 49

* ENH: add a python-level get_handler_name

* ENH: add core.multiarray.get_handler_name

* Allow closure-like definition of the data mem routines

* Fix incompatible pointer warnings

* Note PyDataMemAllocator and PyMemAllocatorEx differentiation

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* Redefine default allocator handling

* Always allocate new arrays using the current_handler

* Search for the mem_handler name of the data owner

* Sub-comparisons don't need a local mem_handler

* Make the default_handler a valid PyDataMem_Handler

* Fix PyDataMem_SetHandler description (NEP discussion)

* Pass the allocators by reference

* remove import of setuptools==49.1.3, doesn't work on python3.10

* fix function signatures in test

* try to fix cygwin extension building

* YAPF mem_policy test

* Less empty lines, more comments (tests)

* Apply suggestions from code review (set an exception and)

Co-authored-by: Matti Picus &lt;matti.picus@gmail.com&gt;

* skip test on cygwin

* update API hash for changed signature

* TST: add gc.collect to make sure cycles are broken

* Implement thread-locality for PyPy

Co-authored-by: Sebastian Berg &lt;sebastian@sipsolutions.net&gt;

* Update numpy/core/tests/test_mem_policy.py

Co-authored-by: Sebastian Berg &lt;sebastian@sipsolutions.net&gt;

* fixes from review

* update circleci config

* fix test

* make the connection between OWNDATA and having a allocator handle more explicit

* improve docstring, fix flake8 for tests

* update PyDataMem_GetHandler() from review

* Implement allocator lifetime management

* update NEP and add best-effort handling of error in PyDataMem_UserFREE

* ENH: fix and test for blindly taking ownership of data

* Update doc/neps/nep-0049.rst

Co-authored-by: Elias Koromilas &lt;elias.koromilas@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed linter errors</title>
<updated>2021-07-07T20:47:21+00:00</updated>
<author>
<name>slepton</name>
<email>slepton@posteo.de</email>
</author>
<published>2021-07-07T20:47:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=22848046920d58ba91893e003b1a07ed9f763275'/>
<id>22848046920d58ba91893e003b1a07ed9f763275</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>TST: Pyston has no recursion limit and the refcount of "immortal" objects is set to ~infinity</title>
<updated>2021-07-07T19:36:30+00:00</updated>
<author>
<name>slepton</name>
<email>slepton@posteo.de</email>
</author>
<published>2021-07-07T19:25:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ac3cf01ace66ad14420856ba434d1c4e24f261cf'/>
<id>ac3cf01ace66ad14420856ba434d1c4e24f261cf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove two private functions from `__all__`</title>
<updated>2021-06-06T15:58:24+00:00</updated>
<author>
<name>Bas van Beek</name>
<email>b.f.van.beek@vu.nl</email>
</author>
<published>2021-06-02T00:58:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=3c8e5da46c1440ea0eb3fe66fdc897d3fbae194d'/>
<id>3c8e5da46c1440ea0eb3fe66fdc897d3fbae194d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove unnecessary 'from __future__ import ...' statements</title>
<updated>2020-01-03T15:48:11+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2019-08-27T11:36:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ed1e9659f103260a32536b4a7615393e3b1173dc'/>
<id>ed1e9659f103260a32536b4a7615393e3b1173dc</id>
<content type='text'>
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Move pytesttester outside of np.testing, to avoid creating unnecessary import dependencies</title>
<updated>2018-07-02T16:08:48+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2018-07-01T22:23:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=11302b66fec3e9f64e0eb77075344acec65d2c0f'/>
<id>11302b66fec3e9f64e0eb77075344acec65d2c0f</id>
<content type='text'>
pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports

Relates to #11457
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports

Relates to #11457
</pre>
</div>
</content>
</entry>
<entry>
<title>TST: Update modules `test` to PytestTester.</title>
<updated>2018-04-04T12:40:28+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2018-04-02T21:48:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=cf46d8cd2aa809be44b684ba234880e0aa4befe9'/>
<id>cf46d8cd2aa809be44b684ba234880e0aa4befe9</id>
<content type='text'>
Numpy can now be tested using the standard

    `python -c"import numpy; numpy.test()"`

construct.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Numpy can now be tested using the standard

    `python -c"import numpy; numpy.test()"`

construct.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Rearrange numpy/testing files.</title>
<updated>2018-03-29T17:41:35+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2018-03-27T15:26:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=157aedaa50d3c5fc74b45c79fb8b8c4b650217ac'/>
<id>157aedaa50d3c5fc74b45c79fb8b8c4b650217ac</id>
<content type='text'>
This is to prepare for the switch to pytest.

* Rename `numpy/testing/nose_tools` to `numpy/testing/_private`.
* Redirect imports as needed.
* Copy `_testutils.py` from scipy to `numpy/testing/_private`.
* Rename `_testutils.py` to `_pytester.py` and remove unneeded bits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to prepare for the switch to pytest.

* Rename `numpy/testing/nose_tools` to `numpy/testing/_private`.
* Redirect imports as needed.
* Copy `_testutils.py` from scipy to `numpy/testing/_private`.
* Rename `_testutils.py` to `_pytester.py` and remove unneeded bits.
</pre>
</div>
</content>
</entry>
</feed>
