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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Lib/test/test_contextlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ class StopIterationSubclass(StopIteration):
else:
self.fail(f'{stop_exc} was suppressed')

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_contextmanager_except_pep479(self):
code = """\
from __future__ import generator_stop
Expand Down
3 changes: 1 addition & 2 deletions compiler/codegen/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2904,8 +2904,7 @@ impl Compiler {
match feature.name.as_str() {
// Python 3 features; we've already implemented them by default
"nested_scopes" | "generators" | "division" | "absolute_import"
| "with_statement" | "print_function" | "unicode_literals" => {}
// "generator_stop" => {}
| "with_statement" | "print_function" | "unicode_literals" | "generator_stop" => {}
"annotations" => self.future_annotations = true,
other => {
return Err(self.error(CodegenErrorType::InvalidFutureFeature(other.to_owned())))
Expand Down