summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reimplement __Pyx_PyDict_GetItemStrWithError() as a hacky version in Py2 to ↵gh3578_refleakStefan Behnel2020-05-092-4/+26
| | | | | | get the semantics right of returning a borrowed reference with non-KeyError exceptions left in place. Closes https://github.com/cython/cython/issues/3578
* Update changelog.Stefan Behnel2020-05-091-1/+8
|
* Add comment to explain why "better" GIL handling is not needed in special ↵Stefan Behnel2020-05-091-1/+1
| | | | methods (because it's held anyway).
* Fix GIL handling on function exit for re-assigned Python arguments.Stefan Behnel2020-05-092-0/+17
|
* Fix another GIL handling case on error function exit.Stefan Behnel2020-05-091-1/+1
|
* Guard the local variable cleanup in nogil functions with 'with gil' sections ↵Stefan Behnel2020-05-092-2/+18
| | | | | | with the GIL. Closes https://github.com/cython/cython/issues/3590
* Fix refleak in a rare error case.Stefan Behnel2020-05-081-0/+1
|
* Enhance refnanny a bit to raise less errors on shutdown and report better ↵Stefan Behnel2020-05-081-6/+14
| | | | positions in those cases.
* Add test for libc.math's modfDean Scarff2020-05-081-2/+12
| | | | Test modf, since it's in C89 and has a non-trivial signature.
* Update libc.math testsDean Scarff2020-05-081-2/+10
| | | | | cimport some C99 float and long double functions, and test legacy kwargs for double functions.
* Add C99 math.h functions to libc.mathDean Scarff2020-05-081-0/+109
| | | | | | | | | | | | | | | Adds many long double variants (e.g. expl) that were previously omitted. No functions have been removed. I've omitted the identifier for trivial parameters in new functions. However, I've retained them for existing functions for compatibility with legacy kwargs. Classes of functions/macros that are still missing: - error-handling ones, like math_errhandling and MATH_ERRNO - Bessel functions like j0, y0 Fixes cython/cython#3570
* Sort functions in libc.mathDean Scarff2020-05-081-55/+43
| | | | | | | Sorting alphabetically by function name makes it easier to audit changes. Also changes "type *" -> "type*"
* Test suite no longer fails in Py3.9, so enable it as a fully supported ↵Stefan Behnel2020-05-071-1/+0
| | | | target in travis.
* Try to fix MSVC warning "C4551: function call missing argument list".Stefan Behnel2020-05-071-3/+3
| | | | Closes #3579.
* Restore the previous PyThreadState_Get() calls in the refnanny, but with a ↵Stefan Behnel2020-05-071-2/+4
| | | | comment explaining the purpose of the "useless" calls.
* Add more visible warnings to C-API functions that steal references of their ↵Stefan Behnel2020-05-073-14/+19
| | | | arguments.
* Turn all legacy struct fields in the NumPy ndarray type into properties and ↵Stefan Behnel2020-05-071-49/+74
| | | | | | | document them (copied from NumPy docs). Adapt the 'nogil' declarations according to the ones in NumPy and add some missing functions. See https://github.com/numpy/numpy/pull/16170
* Update changelog.Stefan Behnel2020-05-071-0/+24
|
* Support for versioned pxd files (GH-3577)scoder2020-05-073-20/+131
| | | | | | * Support for versioned pxd files like "lib.cython-30.pxd" for a Cython 3.0+ version. See https://github.com/cython/cython/issues/3573 * Fix test in Py2 by avoiding namespace packages in favour of a normal package.
* Remove "PYTHONHOME" setting from embed-test since it seems to break the I/O ↵Stefan Behnel2020-05-071-1/+1
| | | | encoding setup in (at least) Py3.8+ venvs.
* Remove dead code.Stefan Behnel2020-05-071-5/+1
|
* Reformat code for readability.Stefan Behnel2020-05-071-1/+1
|
* Mark "ndarray.shape" and "ndarray.strides" as not requiring the GIL.Stefan Behnel2020-05-061-2/+2
|
* Clean up some code in the refnanny.Stefan Behnel2020-05-061-47/+35
|
* Remove some non-public functions from the NumPy declarations.Stefan Behnel2020-05-061-4/+4
| | | | See https://github.com/numpy/numpy/pull/16170
* Add more 'nogil' declarations to NumPy functions that do not require the GIL ↵Stefan Behnel2020-05-061-84/+85
| | | | | | (according to the declarations shipped by NumPy itself). See https://github.com/numpy/numpy/pull/16170
* Fix a call signature that should have raised an exception - unused?Stefan Behnel2020-05-061-1/+1
|
* Remove the outdated getbuffer/releasebuffer implementations for the NumPy ↵Stefan Behnel2020-05-061-91/+0
| | | | | | | 'ndarray' since there are probably no NumPy installations out there anymore that do not support the buffer protocol themselves and are still worth supporting. See https://github.com/numpy/numpy/pull/12284#discussion_r420378155 See GH-3573
* Reverse the tuple item order in the utility code caching key to move the ↵Stefan Behnel2020-05-051-1/+1
| | | | most selective item first (just in case if we ever get dict collisions).
* Allow utility code for declared C properties.Stefan Behnel2020-05-051-1/+3
|
* Add a marker to the generated C code if the NumPy declarations came from ↵Stefan Behnel2020-05-051-0/+9
| | | | | | Cython/Includes/numpy/. See https://github.com/cython/cython/issues/3573
* Prepare release of 3.0a4.3.0a4Stefan Behnel2020-05-052-2/+2
|
* Prevent test from depending on repr(long) in Py2.Stefan Behnel2020-05-051-4/+7
|
* Tighten "numpy_attributes" test to assert that it's actually using a ↵Stefan Behnel2020-05-051-3/+50
| | | | | | property call and not an attribute access. Also add a test for the newly added "ndarray.data" property.
* Provide a more convenient way to declare internal C properties.Stefan Behnel2020-05-052-11/+26
|
* Mark the embedded C main() function in the embedding test as "extern C" in ↵Stefan Behnel2020-05-052-3/+8
| | | | C++ to see if that fixes the C++ builds in MSVC.
* Update changelog.Stefan Behnel2020-05-051-2/+25
|
* Disable embedding test on Windows since it fails to find "Py_DecodeLocale()" ↵Stefan Behnel2020-05-051-0/+3
| | | | for some reason.
* Rename embedding tests in docs to make it easier to find and select in the ↵Stefan Behnel2020-05-053-11/+11
| | | | test suite.
* Add tests that f-strings are rejected in nogil sections.Stefan Behnel2020-05-051-9/+20
|
* Add a test that side-effects of unused f-strings still apply.Stefan Behnel2020-05-051-0/+21
|
* Fix a C compiler warning about unused cleanup code in buffer using functions ↵Stefan Behnel2020-05-051-23/+25
| | | | that always raise (found by clang in the bufaccess.pyx test).
* add test for ndarray attributes (GH-3521)Matti Picus2020-05-051-0/+37
|
* Rewrite the C property feature (GH-3571)scoder2020-05-049-160/+370
| | | | | | | | | | | * Rewrite C property support (GH-2640) based on inline C methods. Supersedes GH-2640 and GH-3095. Closes GH-3521. * Test fix for `numpy_parallel.pyx`: avoid depending on whether "nd.shape" requires the GIL or not. * Turn NumPy's "ndarray.data" into a property to avoid direct struct access. * Make "ndarray.size" accessible without the GIL.
* Update the venerable tree-processing-phases comment in the "Node" class.Stefan Behnel2020-05-041-6/+6
|
* Prevent VerboseCodeWriter from inserting nul-bytes into the C file by ↵Stefan Behnel2020-05-041-9/+7
| | | | switching to a more "standard" way of inserting code at a later time.
* Stop calling PyEval_InitThreads() In Py3.7+ (where it has become a no-op).Stefan Behnel2020-05-042-2/+3
|
* Clean up some code formatting.Stefan Behnel2020-05-031-3/+2
|
* Clean up some code formatting.Stefan Behnel2020-05-031-12/+8
|
* Remove Py2 fallback from embedding example since the rest of the code is ↵Stefan Behnel2020-05-031-7/+1
| | | | Py3-only anyway.