summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix GCC -Wsign-conversion warningdalcinl/fix-c-warningLisandro Dalcin2021-11-021-1/+1
|
* Repair coverage tests to make them work with coverage 6.1, which changed the ↵Stefan Behnel2021-10-312-14/+23
| | | | HTML output format that the tests parse.
* Merge branch '0.29.x'Stefan Behnel2021-10-310-0/+0
|\
| * Change C includes of "longintrepr.h" to account for upstream changes (GH-4428)Thomas A Caswell2021-10-313-4/+15
| | | | | | | | | | | | | | See https://github.com/python/cpython/pull/28968/8e5de40f90476249e9a2e5ef135143b5c6a0b512 which is part of implementing https://bugs.python.org/issue35134 moved the header "longintrepr.h" into a sub-folder. The notes on this change suggested to include "Python.h" instead.
* | Change C includes of "longintrepr.h" to account for upstream changes (GH-4428)Thomas A Caswell2021-10-313-4/+15
| | | | | | | | | | | | | | See https://github.com/python/cpython/pull/28968/8e5de40f90476249e9a2e5ef135143b5c6a0b512 which is part of implementing https://bugs.python.org/issue35134 moved the header "longintrepr.h" into a sub-folder. The notes on this change suggested to include "Python.h" instead.
* | Fix pure Python example in clibraries.rst (GH-4432)Matus Valo2021-10-291-1/+1
| |
* | Add `clear_method_caches` to Utils.py (#4338)0dminnimda2021-10-283-4/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Utils.py: add _find_cache_attributes, clear_method_caches * TestCythonUtils.py: add tests for Cached Methods * Utils.py: add constants * Utils.py: update comment * TestCythonUtils.py: remove excess blank line * Change names to `_CACHE_NAME` and `_CACHE_NAME_PATTERN` * ci.yml: extend timeout to 40 minutes * _CACHE_NAME -> _build_cache_name
* | Apply #3782 to all releases older than Visual Studio 2017 (GH-4357)Max Bachmann2021-10-281-3/+3
| | | | | | See https://github.com/cython/cython/pull/3782
* | Clean up the NumPy integration test by moving the doctests into the ↵Stefan Behnel2021-10-251-180/+225
| | | | | | | | functions that they test.
* | Remove dead test code.Stefan Behnel2021-10-251-27/+0
| |
* | Use newer test dependencies in Py3.6+. (Excluding 3.10 for now to give the ↵Stefan Behnel2021-10-252-6/+1
| | | | | | | | projects a bit more time.)
* | Initial support for Python 3.11 (GH-4414)da-woods2021-10-254-10/+80
| | | | | | | | | | | | | | | | | | * Add a basic replacement for PyCode_New(). An optimized versions would be nice, but this is intended to work sufficiently to start testing. Also, CPython 3.11 might actually add a new C-API function to simplify setting the current code position. That might be used instead. * Disable introspection of frame object with vectorcall This feature looked to only be used for early Python versions that don't have the full vectorcall protocol (and the contents of the frame object are changed in Python 3.11).
* | Make sure that version dependent special methods are correctly and ↵Stefan Behnel2021-10-242-2/+90
| | | | | | | | | | | | completely excluded via preprocessor guards. Previously, implementing "__div__" could fail in Py3 (if the code for adapting the Python wrapper was generated) or would at least generate C compiler warnings about unused "__div__" C functions.
* | Add Py3.10 as CI test target.Stefan Behnel2021-10-241-1/+9
| |
* | Update incorrect version support comment for pycapsule.pxd (GH-4426)Max Bachmann2021-10-231-1/+1
| |
* | Fix libcpp map/set/multiset/unordered type issues (GH-4410)Dobatymo2021-10-228-169/+485
| | | | | | | | Fix insert return types, constness and input iterator templates. Fix typing in iterators and add constructor to allow explicit conversion from iterator to const_iterator.
* | Add C++ multimap/unordered_multimap (GH-4419)Dobatymo2021-10-223-0/+275
| |
* | Introduce new shell syntax for ci-run.sh to improve Windows support (GH-4400)0dminnimda2021-10-221-28/+31
| |
* | Merge branch '0.29.x'Stefan Behnel2021-10-210-0/+0
|\ \ | |/
| * docs: Use the Cython + IPython lexers that come with Pygments to avoid ↵Stefan Behnel2021-10-213-267/+0
| | | | | | | | having to maintain our own ones.
* | Add some missing functions to libcpp maps and string (GH-4395)account-login2021-10-206-0/+25
| | | | | | | | * add swap() to libcpp.string * add load_factor() to libcpp.unordered_map and libcpp.unordered_set
* | Merge branch '0.29.x'Stefan Behnel2021-10-180-0/+0
|\ \ | |/
| * Fix tracing after adapting it to Py3.11 (GH-4420)da-woods2021-10-181-2/+2
| |
* | Fix tracing after adapting it to Py3.11 (GH-4420)da-woods2021-10-181-2/+2
| |
* | Fix fused.__self__ tests on PyPy (GH-4417)da-woods2021-10-181-9/+12
| | | | | | PyPy v7.3.6 looks to have added a helpful "did you mean..." to the AttributeError exception. It's currently tripping up these tests.
* | Merge branch '0.29.x'Stefan Behnel2021-10-181-21/+38
|\ \ | |/
| * Make Profile.c use PyThreadState_EnterTracing() (GH-4411)Victor Stinner2021-10-181-21/+38
| | | | | | | | | | | | Instead of __Pyx_SetTracing(), Profile.c now uses PyThreadState_EnterTracing() and PyThreadState_LeaveTracing(), which were added to Python 3.11.0a2: https://github.com/python/cpython/pull/28542 When these functions are used, Cython no longer sets directly PyThreadState.cframe.use_tracing.
* | Fix fused cpdef default arguments (GH-4413)da-woods2021-10-174-6/+38
| | | | | | | | | | | | A couple of things were going wrong: * they're creating CloneNodes (but not requiring the contents of the clone of the clone node to be temp) * assignment from a clone node generates cleanup code (which is against the general rules of a clone node), and also loses a reference via giveref * cpdef functions cause a small memory leak (#4412) by assigning to their constants twice. This is unfortunately difficult to test for. With this patch we no longer leak, but still duplicate a little bit of work.
* | Import TextTestResult in test runner instead of _TextTestResult (GH-4415)da-woods2021-10-172-10/+7
| | | | | | All the versions we currently test are new enough that the alias is no longer necessary.
* | Fix wrong type in unordered_multiset::swap() (GH-4408)Dobatymo2021-10-151-1/+1
| |
* | Improve ci-run.sh (GH-4398)0dminnimda2021-10-071-23/+66
| |
* | Improve "import_array" guard (GH-4397)da-woods2021-10-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Stop using NPY_NDARRAYOBJECT_H since: a) in principle it's private b) Numpy has renamed it and use a public symbol instead. I think the existing tests are adequate - we just aren't yet testing against a new enough version of Numpy to have caught it yet. Closes https://github.com/cython/cython/issues/4396 Closes https://github.com/cython/cython/issues/4394
* | Make a compile test runnable.Stefan Behnel2021-10-022-12/+41
| |
* | Handle function "outer_attrs" more consistently (GH-4375)da-woods2021-10-014-3/+25
| | | | | | | | | | | | A few children of function nodes need to be consistently evaluated outside the function scope. This PR attempts to do so and thus fixes https://github.com/cython/cython/issues/4367.
* | Change gcc version check in test runner to a numeric comparison (GH-4359)da-woods2021-10-011-2/+4
| | | | | | | | The string comparison was reporting '11' < '4' (so OpenMP tests were being skipped on GCC 11)
* | Fix typo discovered by codespell (#4387)Christian Clauss2021-09-291-1/+1
| |
* | Fix the name of attributes in the common ABI module (GH-4376)da-woods2021-09-282-6/+27
| | | | | | | | | | Attribute names used to be fully qualified like "_cython_3_0_0a9.cython_function_or_method" instead of the plain name. Closes https://github.com/cython/cython/issues/4373
* | Avoid AddTraceback() if stringtab isn't set up (GH-4378)da-woods2021-09-273-25/+77
| | | | | | | | | | | | | | This can happen (rarely) with exceptions that occur very early in the module init process. Fixes https://github.com/cython/cython/issues/4377 Uses a fake Numpy module for testing to make a version of "import_array" that always fails.
* | Make __Pyx_CoroutineAwaitType non-pickleable (GH-4381)da-woods2021-09-271-0/+21
| | | | | | | | | | | | | | | | | | | | This is explicitly tested for: https://github.com/cython/cython/blob/aea4e6b84b38223c540266f8c57093ee2039f284/tests/run/test_coroutines_pep492.pyx#L2400 It turns out some earlier versions of Python assume that C-API classes without a dict or slot are pickleable by the class name. Currently it isn't pickleable because the class name lookup is failing but this change makes it more robust. See https://github.com/cython/cython/pull/4376
* | Avoid unnecessary binding of fused functions on class lookup (GH-4370)da-woods2021-09-242-3/+63
| | | | | | Among other things this makes it pickleable by ensuring that it's the same object each time.
* | Remove usused "FetchCommonPointer" utility code (GH-4380)da-woods2021-09-202-35/+0
| |
* | Merge branch '0.29.x'Stefan Behnel2021-09-071-3/+3
|\ \ | |/
| * Update changelog.Stefan Behnel2021-09-071-0/+17
| |
| * Fix signature of "PyUnicode_CompareWithASCIIString" (GH-4344)Max Bachmann2021-09-071-1/+1
| | | | | | "PyUnicode_CompareWithASCIIString()" does not raise exceptions and takes a "const char*" as argument.
| * Fix C++ bool coercion where no "operator bool" exists (GH-4349)da-woods2021-09-032-2/+15
| | | | | | | | This was causing c++ classes in if-statements to crash. Fixes #4348
* | Update changelog.Stefan Behnel2021-09-071-0/+19
| |
* | Fix maybe uninitialized `value` in get_value and get_value_no_default. (GH-4361)Nicolas Pauss2021-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ff16389c0da5acc2be1 introduced convenient functions get_value() and get_value_no_default(). Unfortunately, the variable `value` in these functions was not set before usage with PyContextVar_Get(). This triggered some warnings: Error compiling Cython file: ------------------------------------------------------------ ... """Return a new reference to the value of the context variable, or the default value of the context variable, or None if no such value or default was found. """ cdef PyObject *value PyContextVar_Get(var, NULL, &value) ^ ------------------------------------------------------------ Cython/Includes/cpython/contextvars.pxd:118:33: local variable 'value' might be referenced before assignment Error compiling Cython file: ------------------------------------------------------------ ... or the provided default value if no such value was found. Ignores the default value of the context variable, if any. """ cdef PyObject *value PyContextVar_Get(var, <PyObject*>default_value, &value) ^ ------------------------------------------------------------ Cython/Includes/cpython/contextvars.pxd:136:53: local variable 'value' might be referenced before assignment It can be replicated by simply importing `cpython`: echo "cimport cpython" >/tmp/mod.pyx && ./cython.py -Werror -Wextra /tmp/mod.pyx The solution is simply to assign NULL to `value` on declaration.
* | Fix a couple of trivial typos (GH-4363)da-woods2021-09-052-2/+2
| | | | | | | | | | See https://github.com/cython/cython/pull/4349 https://github.com/cython/cython/commit/0574dbceef7b8ee16a9cc94091c3629dfa23133d#r54025763
* | Fix C++ bool coercion where no "operator bool" exists (GH-4349)da-woods2021-09-032-2/+15
| | | | | | | | This was causing c++ classes in if-statements to crash. Fixes #4348
* | Merge branch '0.29.x'Stefan Behnel2021-09-011-0/+1
|\ \ | |/