Skip building trees for nodes with invalid tag name#5690
Merged
scoder merged 5 commits intocython:masterfrom Sep 14, 2023
Merged
Skip building trees for nodes with invalid tag name#5690scoder merged 5 commits intocython:masterfrom
scoder merged 5 commits intocython:masterfrom
Conversation
This change attempts to exclude arguments with invalid tag names from being inserted into the TreeBuilder
Contributor
Author
da-woods
reviewed
Sep 8, 2023
Contributor
da-woods
left a comment
There was a problem hiding this comment.
The main thing it's missing is a test - probably just to check that a generator expression doesn't break it the build
def f(a, b):
return (x for x in range(a, b))
is probably sufficient to hit the bug I think.
Unfortunately I'm not really sure how gdb mode is tested: probably in Cython/Debugger/Tests but I've never looked in there myself
Documented the purpose of is_valid_tag function in its docstring.
Contributor
Author
|
I attempted to validate the fix by locally running python ../cython/cython.py --cplus --gdb a.pyx --output-file a.cxx
g++ -fPIC a.cxx $(python3-config --includes) $(python3-config --ldflags) -shared -o a$(python3-config --extension-suffix)Then |
Contributor
scoder
reviewed
Sep 9, 2023
Contributor
scoder
left a comment
There was a problem hiding this comment.
I'm not sure that we really need to change start() and end() as well, but it's probably better to be consistent.
scoder
reviewed
Sep 9, 2023
Contributor
|
Looks good to me now. |
Contributor
|
Thanks |
3 tasks
tornaria
added a commit
to tornaria/void-packages
that referenced
this pull request
Oct 10, 2023
cython/cython#5690 cython/cython#5725 Both are merged in cython 3.0.3, however that release breaks scipy.
ahesford
pushed a commit
to void-linux/void-packages
that referenced
this pull request
Oct 10, 2023
cython/cython#5690 cython/cython#5725 Both are merged in cython 3.0.3, however that release breaks scipy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change attempts to exclude arguments with invalid tag names from being inserted into the
TreeBuilderas per comment from gh-5552.It does resolve the exception reported in gh-5552 and in gh-5686, but I am not sure whether this is the best way to implement the idea to skip nodes with invalid names.
Please feel free to suggest improvements.