File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
graalpython/lib-graalpython/patches/cloudpickle/whl Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/cloudpickle/cloudpickle.py b/cloudpickle/cloudpickle.py
2
+ index 317be69..4e409e4 100644
3
+ --- a/cloudpickle/cloudpickle.py
4
+ +++ b/cloudpickle/cloudpickle.py
5
+ @@ -512,6 +512,8 @@ def _walk_global_ops(code):
6
+ """
7
+ Yield referenced name for all global-referencing instructions in *code*.
8
+ """
9
+ + # GraalPy change: we don't support dis
10
+ + yield from code.co_names
11
+ for instr in dis.get_instructions(code):
12
+ op = instr.opcode
13
+ if op in GLOBAL_OPS:
14
+ diff --git a/cloudpickle/cloudpickle_fast.py b/cloudpickle/cloudpickle_fast.py
15
+ index 63aaffa..65ff18c 100644
16
+ --- a/cloudpickle/cloudpickle_fast.py
17
+ +++ b/cloudpickle/cloudpickle_fast.py
18
+ @@ -21,6 +21,7 @@ import struct
19
+ import types
20
+ import weakref
21
+ import typing
22
+ + import platform
23
+
24
+ from enum import Enum
25
+ from collections import ChainMap, OrderedDict
26
+ @@ -663,7 +664,7 @@ class CloudPickler(Pickler):
27
+ self.globals_ref = {}
28
+ assert hasattr(self, 'proto')
29
+
30
+ - if pickle.HIGHEST_PROTOCOL >= 5 and not PYPY:
31
+ + if pickle.HIGHEST_PROTOCOL >= 5 and platform.python_implementation() == 'CPython':
32
+ # Pickler is the C implementation of the CPython pickler and therefore
33
+ # we rely on reduce_override method to customize the pickler behavior.
34
+
You can’t perform that action at this time.
0 commit comments