forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/cloudpickle: Enable py3.13
Signed-off-by: Michał Górny <[email protected]>
- Loading branch information
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
dev-python/cloudpickle/files/cloudpickle-3.0.0-py313.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 3dc53183e86bb9f0ee9d45ff9d4971036c61ecba Mon Sep 17 00:00:00 2001 | ||
From: Lumir Balhar <[email protected]> | ||
Date: Wed, 15 May 2024 10:43:50 +0200 | ||
Subject: [PATCH] Fix test_extract_class_dict for Python 3.13 beta 1 | ||
|
||
Resolves: https://github.com/cloudpipe/cloudpickle/issues/533 | ||
Closes: https://github.com/cloudpipe/cloudpickle/pull/534 | ||
--- | ||
tests/cloudpickle_test.py | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/tests/cloudpickle_test.py b/tests/cloudpickle_test.py | ||
index 4041bf7..6d0d915 100644 | ||
--- a/tests/cloudpickle_test.py | ||
+++ b/tests/cloudpickle_test.py | ||
@@ -108,7 +108,12 @@ def test_extract_class_dict(): | ||
return "c" | ||
|
||
clsdict = _extract_class_dict(C) | ||
- assert sorted(clsdict.keys()) == ["C_CONSTANT", "__doc__", "method_c"] | ||
+ expected_keys = ["C_CONSTANT", "__doc__", "method_c"] | ||
+ # New attribute in Python 3.13 beta 1 | ||
+ # https://github.com/python/cpython/pull/118475 | ||
+ if sys.version_info >= (3, 13): | ||
+ expected_keys.insert(2, "__firstlineno__") | ||
+ assert sorted(clsdict.keys()) == expected_keys | ||
assert clsdict["C_CONSTANT"] == 43 | ||
assert clsdict["__doc__"] is None | ||
assert clsdict["method_c"](C()) == C().method_c() | ||
-- | ||
2.45.2 | ||
|