| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
of expressions without duplicating code.
|
|\ |
|
| |
| |
| |
| | |
state.
|
| |
| |
| |
| |
| | |
* Fixed indexing temps for non-python objects.
* Moved cleanup into release_temps since the temps survived into the result_code.
|
| |
| |
| | |
Closes https://github.com/cython/cython/issues/3430
|
| |
| |
| |
| |
| |
| |
| |
| | |
instantiating a fused function before the object fields of the fused function subtype are fully initialised.
See https://bugs.python.org/issue38392
Closes GH-3215.
Supersedes GH-3216.
|
| | |
|
| |
| |
| |
| | |
changed by accident.
|
| |
| |
| |
| |
| |
| | |
* Fixed indexing temps for non-python objects.
* Release another temp in PyMethodCallNode.
Was causing warnings in generators_py.
* Moved cleanup into release_temps since the temps survived into the result_code.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Prevent fused dispatcher optional arguments being overwritten
If the 5th argument of the regular functions was optional it'd
overwrite the _fused_sigindex default of the dispatcher, causing
type errors at runtime.
closes https://github.com/cython/cython/issues/3511
|
| |
| |
| | |
Closes https://github.com/cython/cython/issues/3430
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows things to work like:
# in pxd file
from libc.math cimport sin
# in py file
if not cython.compiled:
from math import sin # previously failed with cython compile
# error because it was assigning to a cdef name
This seems worthwhile because it makes it easier to write code
that re-assigns cdef names and so works in both modes.
|
| |
| |
| | |
Mainly helps for adding attributes to classes, but undoubtedly fixes other things too.
|
| |
| |
| |
| | |
store them correctly as PyTypeObject* instead of a generic (and unusable) PyObject*.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
instantiating a fused function before the object fields of the fused function subtype are fully initialised.
See https://bugs.python.org/issue38392
Closes GH-3215.
Supersedes GH-3216.
|
| |
| |
| |
| | |
3.9 that replaces the "Py_TYPE() == …" type check pattern.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Rewrite the test code generation for the unicode normalisation test, making sure that we always write UTF-8 source files.
* Fix failures to print the compilation status for modules with non-ascii names (on Windows).
* Help with remote debugging environment encoding problems in test runs, by extending the output of the "buildenv" pseudo-test.
* Explicitly set I/O encoding for subprocesses in parallel cythonize() runs to make the test runner workers inherit it (instead of defaulting to ASCII in Py2).
* Use a Latin-1 Unicode character in the test for Unicode module names to make it more compatible with Windows file system character sets (such as CP-1252).
* Properly decode source and module file name from the FS encoding in Py2. Previously, with ASCII module names, UTF-8 decoding always worked, but wasn't correct.
* Hack around a distutils 3.[5678] bug on Windows for unicode module names.
https://bugs.python.org/issue39432
* Try to fix cython.inline() on Windows with Py3.8+ where the DLL loading requires an explicit registration of the extension output directory.
Closes GH-3450.
|
| |
| |
| |
| | |
already. (GH-3494)
|
| |
| |
| |
| |
| |
| |
| | |
wraparound/boundscheck (GH-3493)
The directives are currently inherited from user code, which is not correct, but it seemed difficult to reliably change the directives applied to the `__pyx_fused_cpdef` dispatch function, so instead the code was changed to be independent.
Fixes https://github.com/cython/cython/issues/3492
|
| |
| |
| |
| |
| | |
function. (GH-3491)
Closes GH-3481.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Optimized inplace operations for str/unicode so that they're
genuinely done in place if no-one else needs the object. This
is what CPython tries to do (and string concatenation was
a point where it significantly beat Cython at times).
This only works if the types are known at compile time, so with
unknown types CPython will still be faster in some cases.
Note: Uses slightly odd-macro trickery - does modify the input argument too
(although only in places where it shouldn't matter).
|
| | |
|
| |
| |
| |
| | |
statements in if/else clauses that are not preceded by other statements.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Rewrote signature matching for fused cpdef function dispatch to use a pre-built tree index in a mutable default argument and be O(n).
* Added test to ensure proper differentiation between ambiguously compatible and definitely compatible arguments.
* Added test to ensure fused cpdef's can be called by the module itself during import.
* Added test to ensure consistent handling of ambiguous fused cpdef signatures.
* Test for explicitly defined fused cpdef method.
* Add .komodoproject to .gitignore.
* Add /cython_debug/ to .gitignore.
Closes #1385.
|
| |
| |
| |
| |
| |
| |
| | |
These were previously getting missed. Added code to specialize them and tests to prove it.
Fixes https://github.com/cython/cython/issues/3142
Also fixes https://github.com/cython/cython/issues/3460 - (seems related enough to go in the same PR)
|
| | |
|
| |
| |
| |
| | |
from. (GH-3413)
|
| |
| |
| |
| |
| |
| |
| | |
(GH-3377)
The idea being that struct-types like memoryviews
can generate their own reference counting code
using a common interface with Python objects.
|
|\ \ |
|
| | | |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | | |
Closes GH-3418.
|
| | | |
|
| | |
| | |
| | | |
Closes #1427
|
| | |
| | |
| | | |
* omp declare privates on outer loop, since inner loops are not 'omp parallel for'ified
|
| | |
| | |
| | | |
They'd generate two calls - one exception checked and one not
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
Strings werren't static for the limited API so had to be set at module init rather than compile time.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. DefNode.has_fused_arguments was set too early (before
locals/annotations) were evalutated, so function was not treated
as fused.
2. When re-evaluating the specializations of the fused function
it was treated as a redefinition because the locals/annotation was
reapplied over the specialized type.
3. Including annotation as string (required changes to
StringNode.analyse_as_type), and extra tests for fused type defined
as cython.fused_type in the Py file
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Cleanup of string initialization code for limited API
Now appears in a few large blocks rather than
```
# if CYTHON_LIMITED_API
individual string line
# endif
```
* Fixed issue with some unicode strings, e.g.
```
# cython: language_level=3str, binding=True
def non_ascii_str():
s = 'ø\x20\u0020'
assert isinstance(s, str)
return s
```
|
| | |
| | |
| | | |
"@subsitute: tempita" tag ensures that they are loaded in tempita utility code class
|
| | |
| | |
| | | |
They'd generate two calls - one exception checked and one not
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Add more limited api support
* Fix Fused Functions
* Fixed profile
* Use PyModule_GetDict
* Simplify __Pyx_Globals
* Address issues in CommonStructures
* ifdef guard CyFunction and FusedFunction
|
| | |
| | |
| | |
| | | |
See #2686.
|
| | |
| | |
| | |
| | | |
Close #2686.
|
| | |
| | |
| | | |
* omp declare privates on outer loop, since inner loops are not 'omp parallel for'ified
|