Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adding generator_stop to compile_future_features #5320

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

Merged
merged 3 commits into from
May 13, 2024

Conversation

matheusfgoncalves95
Copy link
Contributor

@matheusfgoncalves95 matheusfgoncalves95 commented May 13, 2024

As well as some mild formatting.

Fix #4060

Comment on lines 2913 to 2914
| "compile_future_features" => {}
"generator_stop" => {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work?

Suggested change
| "compile_future_features" => {}
"generator_stop" => {}
| "compile_future_features"
| "generator_stop" => {}

Copy link
Contributor Author

@matheusfgoncalves95 matheusfgoncalves95 May 13, 2024

Choose a reason for hiding this comment

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

Oops, my autoformatter led to that silly mistake. I also somehow introduced compile_future_features there!

To answer your question: it seems to work.

I did a quick check on the Python interpreter and the import succeeds. The module also looks okay via dir() inspection.

Anyhow, I will fix it. Thanks for pointing that out.

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Thank you for contributing! Your patch also fixed a test in test_contextlib. Could you also update the test? Removing @unittest.expectedFailure will fix the CI failure

@youknowone youknowone merged commit 515f0bf into RustPython:main May 13, 2024
@matheusfgoncalves95 matheusfgoncalves95 deleted the generator-stop branch May 13, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow from __future__ import generator_stop
3 participants