Skip to content

Commit 515f0bf

Browse files
Adding generator_stop to compile_future_features (RustPython#5320)
* Adding generator_stop to compile_future_features. * Removing expected failure from PEP 479 unit test.
1 parent 27a52a7 commit 515f0bf

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎Lib/test/test_contextlib.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ class StopIterationSubclass(StopIteration):
197197
else:
198198
self.fail(f'{stop_exc} was suppressed')
199199

200-
# TODO: RUSTPYTHON
201-
@unittest.expectedFailure
202200
def test_contextmanager_except_pep479(self):
203201
code = """\
204202
from __future__ import generator_stop

‎compiler/codegen/src/compile.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2904,8 +2904,7 @@ impl Compiler {
29042904
match feature.name.as_str() {
29052905
// Python 3 features; we've already implemented them by default
29062906
"nested_scopes" | "generators" | "division" | "absolute_import"
2907-
| "with_statement" | "print_function" | "unicode_literals" => {}
2908-
// "generator_stop" => {}
2907+
| "with_statement" | "print_function" | "unicode_literals" | "generator_stop" => {}
29092908
"annotations" => self.future_annotations = true,
29102909
other => {
29112910
return Err(self.error(CodegenErrorType::InvalidFutureFeature(other.to_owned())))

0 commit comments

Comments
 (0)