8000 bpo-37596: Make `set` and `frozenset` marshalling deterministic by brandtbucher · Pull Request #27926 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-37596: Make set and frozenset marshalling deterministic #27926

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 7 commits into from
Aug 25, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix comment
  • Loading branch information
brandtbucher committed Aug 24, 2021
commit 1aff762a31e97f3a892108dd03bad9a25689c594
2 changes: 1 addition & 1 deletion Lib/test/test_marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def test_deterministic_sets(self):
for kind in ("set", "frozenset"):
script = f"import marshal; print(marshal.dumps({kind}({elements})))"
with self.subTest(kind):
# {nan, b"b", "x", b'a', b'c', 'y', 'z'}
# {nan, b'b', 'x', b'a', b'c', 'y', 'z'}
_, a, _ = assert_python_ok("-c", script, PYTHONHASHSEED="0")
# {nan, 'x', b'a', 'z', b'b', 'y', b'c'}
_, b, _ = assert_python_ok("-c", script, PYTHONHASHSEED="1")
Expand Down
0