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

Fix imports binding sys to a local #712

Open
evhub opened this issue Dec 28, 2022 · 1 comment
Open

Fix imports binding sys to a local #712

evhub opened this issue Dec 28, 2022 · 1 comment

Comments

@evhub
Copy link
Owner

evhub commented Dec 28, 2022

We need to use the actual variable name sys because mypy requires it, so our only real option here is to make sys an unredefinable built-in, like _coconut names, so that we can guarantee that the name sys will always globally refer to what we want and thus we don't have to redefine it locally.

@evhub evhub modified the milestone: v2.2.0 Dec 28, 2022
@evhub
Copy link
Owner Author

evhub commented Dec 28, 2022

We can even only allow import sys as the method of defining sys, only allow it at the top level, and enforce that any references to sys have to come after import sys.

@evhub evhub modified the milestones: v2.2.0, v3.0.0 Dec 28, 2022
@evhub evhub modified the milestone: v3.0.0 Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant