Update pickle.py from 3.14.2#6982
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (9)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| except NameError: | ||
| pass | ||
| else: | ||
| PYTHON2_EXCEPTIONS += ("JitError",) |
There was a problem hiding this comment.
probably we still need this for --features jit
_compat_pickle.py from 3.14.2pickle.py from 3.14.2
There was a problem hiding this comment.
@fanninpm can you please review? I've modified this slightly (renamed the class, and didn't use an if inside the check_output method)
Lib/test/support/rustpython.py
Outdated
|
|
||
| class DocTestChecker(doctest.OutputChecker): | ||
| """ | ||
| Custom output checker that lets us to add: `+EXPECTED_FAILURE` for doctest tests. |
There was a problem hiding this comment.
Minor grammar nitpick from a native speaker of English:
| Custom output checker that lets us to add: `+EXPECTED_FAILURE` for doctest tests. | |
| Custom output checker that lets us add: `+EXPECTED_FAILURE` for doctest tests. |
Also, consider expanding upon what exactly this option string does (allows us to mark doctest examples as currently failing, for accountability).
Lib/test/support/rustpython.py
Outdated
|
|
||
| def check_output(self, want, got, optionflags): | ||
| if optionflags & EXPECTED_FAILURE: | ||
| return want != got |
There was a problem hiding this comment.
I realized that if
- you have both
+EXPECTED_FAILUREand another doctest flag on a test that currently would fail without+EXPECTED_FAILURE - but later, something is changed elsewhere in the interpreter that makes it so that the aforementioned test would pass without the presence of
+EXPECTED_FAILURE
…then there's a risk of the current logic "covering up" the fact that +EXPECTED_FAILURE needs to be removed from the test.
I then came up with this:
| return want != got | |
| return not super().check_output(want, got, optionflags) |
See #6945 for an example of it in action.
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/pickle.py dependencies:
dependent tests: (69 tests)
[x] lib: cpython/Lib/copyreg.py dependencies:
dependent tests: (94 tests)
[ ] lib: cpython/Lib/pickletools.py dependencies:
dependent tests: (1 tests)
[ ] test: cpython/Lib/test/test_extcall.py (TODO: 31) dependencies: dependent tests: (no tests depend on extcall) Legend:
|
No description provided.