Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed all assignments being added to the module in the limited API #3501

merged 2 commits into from Apr 12, 2020


Copy link

In the old version any assignment to a name (most significantly any functions or attributes of classes) was added to the module dictionary rather than wherever target was intended. This version largely reverts to the original assignment code (which looked to be limited-api-safe anyway).

The only extra thing it has to do is get the module dictionary since this isn't a global variable in limited-api mode.

I've not added any tests since this should be adequate covered by the main test-suite when it's enabled for the limited API (I really hope...)

I'm not intending to try to fix much limited API stuff, but this was very low-hanging fruit.

Mainly helps for adding attributes to classes, but undoubtedly
fixes other things too
Copy link

@scoder scoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Yeah, let's go for simple fixes first, before we try to optimise.

Cython/Compiler/ Outdated Show resolved Hide resolved
@scoder scoder added this to the 3.0 milestone Apr 12, 2020
@scoder scoder added the defect label Apr 12, 2020
@scoder scoder merged commit 92a2da0 into cython:master Apr 12, 2020
@da-woods da-woods deleted the limited_api_assignment branch April 12, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants