| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
'noexcept' for function pointer fields (GH-5386)
|
|
|
|
|
|
|
| |
Require the bracketed multiple context managers to be followed by a
colon, so that the bracketed called context manager is identified as
regular parentheses in old-style syntax.
Fixes https://github.com/cython/cython/issues/5403
|
|
|
|
| |
legacy code (GH-5094)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(and "struct S"/"union U")
This appears to be an old Pyrex feature introduced in
https://github.com/cython/cython/commit/9bac9c2e014ed63c2ac435e9b431fae124fba668
to provide a way of "forward cimporting" a class. I originally tried to make
a test for it, but couldn't actually come up with a useful way
of using it in the intended way, where the name would be unavailable
initially but avaialble later.
It looks to be completely untested, and responsible for some missing
coverage in Nodes.py (https://github.com/cython/cython/issues/4163).
The large section containing
```
if kind == 'struct' or kind == 'union': # 8479 ↛ 8480
```
I propose to fix the missing coverage by killing off the feature.
The only people I could find using this syntax were H5Py, who
look to have removed their sole use of it 3 years ago
https://github.com/h5py/h5py/commit/8d2498c7f5e3fec884ff56e9aca905c325d82484
Therefore it seems a good candidate to go in Cython 3
|
|
|
| |
Relaxes the grammar restrictions on decorators
|
|
|
|
|
| |
Change the default behavior to always check for exceptions after a call to a cdef function defined in Cython. Calls to extern cdef functions are not checked by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that it wasn't correct before since it didn't pass the
correct flag to `p_lambdef` and thus was equivalent to just
using `p_lambdef`.
Note also that there's a difference in behaviour between Python3.9+
and before. Python <3.9 allowed `[i for i in range(10) if lambda: i]`
while Python >=3.9 disallows this. Arguably it's pointless because
the lambda always evaluates to True. See
https://github.com/python/cpython/issues/86014
for the Python issue.
With this change Cython will follow the Python 3.9 behaviour at
the cost of potentially breaking some code that does use the
pattern above.
Part of the cleanup in https://github.com/cython/cython/issues/4595
|
|
|
|
| |
directives. (GH-4938)
|
| |
|
| |
|
|
|
|
|
|
|
| |
As described in https://docs.python.org/3/whatsnew/3.10.html#parenthesized-context-managers
The approach to parsing is largely copied from the CPython parser
(with comments to support it) - closer to the PEG approach of
"try the bracketed case first, and let it fail silently then try the unbracketed case".
|
|
|
|
|
|
|
|
|
| |
Things like match-case (essentially anything that uses Python's
new PEG parser capacities) are going to have to be implemented
by trying to parse something, failing, then going back and trying
to parse something else. This commit gets the initial work done
to make this easier to do.
Several error positions change in this effort, but this seems to improve the error reporting overall.
|
|
|
|
|
|
|
|
| |
parser (GH-4846)
I've tried to rewrite it to largely follow the rules from the most
recent version of the Python LL parser, so avoiding conditional parameters.
See https://github.com/cython/cython/issues/4595
|
| |
|
|
|
|
| |
See https://github.com/cython/cython/issues/4310
|
|
|
|
| |
See https://github.com/cython/cython/issues/4310
|
| |
|
|
|
| |
Closes https://github.com/cython/cython/issues/2636
|
| |
|
|
|
|
|
|
|
|
|
|
| |
file (GH-4085)
Fixes https://github.com/cython/cython/issues/3174
Closes https://github.com/cython/cython/pull/3175
I've removed all identification of is_self_arg from the parser, since I think it's better dealt with when analysing the declarations.
Original test copied from https://github.com/cython/cython/pull/3175
|
|
|
|
|
|
| |
is the first assignment to that variable.
This makes literal list assignments to declared pointers work.
|
| |
|
|
|
| |
Closes https://github.com/cython/cython/issues/3796
|
|
|
|
| |
where appropriate.
|
|
|
| |
Closes https://github.com/cython/cython/issues/1355
|
|
|
|
| |
Python's "and" and "or" operators. (GH-3858)
|
|
|
|
|
| |
See, for example, https://isocpp.org/blog/2012/11/universal-references-in-c11-scott-meyers
Closes #3814
|
| |
|
|
|
|
| |
parsing etc.
|
| |
|
| |
|
|
|
| |
Closes #1603.
|
| |
|
|
|
| |
… and enforce them with pycodestyle.
|
|\ |
|
| |
| |
| |
| | |
Closes https://github.com/cython/cython/issues/3674
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Closes https://github.com/cython/cython/issues/1462
|
| |
| |
| |
| |
| |
| | |
RaiseStatNode.
This allows taking advantage of the automatic "with gil" block handling for raising exceptions, allows proper control flow analysis, etc.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Annotations are now dealt with according to PEP-563 - they are
saved as strings, rather than evaluated as Python objects.
They can/are still be used by Cython for typing.
Previous behaviour for evaluating them as Python objects was
convoluted and has been removed entirely, which hopefully doesn't
break too much.
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
in "3str" parsing mode.
|
|\ \
| | |
| | | |
Allow condition in GILStatNode
|
| | | |
|
|\ \ \
| |/ / |
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
under Py3.7. Cython used to be 3x slower than CPython here.
Also enable absolute imports automatically in top-level (non-package) modules.
|