https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Bug ID: 2219334 Summary: python-cloudpickle: FTBFS in f39-python side tag with Python 3.12 Product: Fedora Version: rawhide URL: https://koschei.fedoraproject.org/package/python-cloud pickle Status: NEW Component: python-cloudpickle Assignee: lbalhar@redhat.com Reporter: thrnciar@redhat.com QA Contact: extras-qa@fedoraproject.org CC: epel-packagers-sig@lists.fedoraproject.org, jonathan@almalinux.org, lbalhar@redhat.com, python-packagers-sig@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
python-cloudpickle fails to build with Python 3.12.0b3 in f39-sidetag
For the build logs, see: https://koji.fedoraproject.org/koji/buildinfo?buildID=2218638
To reproduce this locally you can do: fedpkg mock-config --target f39-python > ~/.config/mock/f39-python.cfg fedpkg srpm mock -r f39-python --rebuild $SRPM
Or you can submit a scratch build in side tag with: fedpkg build --target=f39-python --scratch --srpm
Once fixed, please submit the real build into side tag with: fedpkg build --target=f39-python
=================================== FAILURES =================================== ____________________ CloudPickleTest.test_generic_subclass _____________________ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_generic_subclass> def test_generic_subclass(self): T = typing.TypeVar('T')
class Base(typing.Generic[T]): pass
class DerivedAny(Base): pass
class LeafAny(DerivedAny): pass
class DerivedInt(Base[int]): pass
class LeafInt(DerivedInt): pass
class DerivedT(Base[T]): pass
class LeafT(DerivedT[T]): pass
klasses = [ Base, DerivedAny, LeafAny, DerivedInt, LeafInt, DerivedT, LeafT ] for klass in klasses:
assert pickle_depickle(klass, protocol=self.protocol) is klass
tests/cloudpickle_test.py:2423: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError ______________________ CloudPickleTest.test_generic_type _______________________ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_generic_type> def test_generic_type(self): T = typing.TypeVar('T')
class C(typing.Generic[T]): pass
assert pickle_depickle(C, protocol=self.protocol) is C
tests/cloudpickle_test.py:2364: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError __________ CloudPickleTest.test_locally_defined_class_with_type_hints __________ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_locally_defined_class_with_type_hints> def test_locally_defined_class_with_type_hints(self): with subprocess_worker(protocol=self.protocol) as worker: for type_ in _all_types_to_test(): class MyClass: def method(self, arg: type_) -> type_: return arg MyClass.__annotations__ = {'attribute': type_}
def check_annotations(obj, expected_type, expected_type_str): assert obj.__annotations__["attribute"] == expected_type assert ( obj.method.__annotations__["arg"] == expected_type ) assert ( obj.method.__annotations__["return"] == expected_type ) return "ok"
obj = MyClass() assert check_annotations(obj, type_, "type_") == "ok"
assert (
worker.run(check_annotations, obj, type_, "type_") == "ok" ) tests/cloudpickle_test.py:2457: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/testutils.py:146: in run input_payload = dumps((func, args, kwargs), protocol=self.protocol) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _ CloudPickleTest.test_pickle_constructs_from_module_registered_for_pickling_by_value _ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_pickle_constructs_from_module_registered_for_pickling_by_value> def test_pickle_constructs_from_module_registered_for_pickling_by_value(self): # noqa _prev_sys_path = sys.path.copy() try: # We simulate an interactive session that: # - we start from the /path/to/cloudpickle/tests directory, where a # local .py file (mock_local_file) is located. # - uses constructs from mock_local_file in remote workers that do # not have access to this file. This situation is # the justification behind the # (un)register_pickle_by_value(module) api that cloudpickle # exposes. _mock_interactive_session_cwd = os.path.dirname(__file__)
# First, remove sys.path entries that could point to # /path/to/cloudpickle/tests and be in inherited by the worker _maybe_remove(sys.path, '') _maybe_remove(sys.path, _mock_interactive_session_cwd)
# Add the desired session working directory sys.path.insert(0, _mock_interactive_session_cwd)
with subprocess_worker(protocol=self.protocol) as w: # Make the module unavailable in the remote worker w.run( lambda p: sys.path.remove(p), _mock_interactive_session_cwd ) # Import the actual file after starting the module since the # worker is started using fork on Linux, which will inherits # the parent sys.modules. On Python>3.6, the worker can be # started using spawn using mp_context in ProcessPoolExectutor. # TODO Once Python 3.6 reaches end of life, rely on mp_context # instead. import mock_local_folder.mod as mod # The constructs whose pickling mechanism is changed using # register_pickle_by_value are functions, classes, TypeVar and # modules. from mock_local_folder.mod import ( local_function, LocalT, LocalClass )
# Make sure the module/constructs are unimportable in the # worker. with pytest.raises(ImportError): w.run(lambda: __import__("mock_local_folder.mod")) with pytest.raises(ImportError): w.run( lambda: __import__("mock_local_folder.subfolder.mod") )
for o in [mod, local_function, LocalT, LocalClass]: with pytest.raises(ImportError): w.run(lambda: o)
register_pickle_by_value(mod) # function assert w.run(lambda: local_function()) == local_function() # typevar
assert w.run(lambda: LocalT.__name__) == LocalT.__name__
tests/cloudpickle_test.py:2583: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/testutils.py:146: in run input_payload = dumps((func, args, kwargs), protocol=self.protocol) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:911: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~LocalT, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _________________ CloudPickleTest.test_pickle_dynamic_typevar __________________ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_pickle_dynamic_typevar> def test_pickle_dynamic_typevar(self): T = typing.TypeVar('T')
depickled_T = pickle_depickle(T, protocol=self.protocol)
tests/cloudpickle_test.py:2330: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError ___________ CloudPickleTest.test_pickle_dynamic_typevar_memoization ____________ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_pickle_dynamic_typevar_memoization> def test_pickle_dynamic_typevar_memoization(self): T = typing.TypeVar('T')
depickled_T1, depickled_T2 = pickle_depickle((T, T),
protocol=self.protocol) tests/cloudpickle_test.py:2345: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _____________ CloudPickleTest.test_pickle_dynamic_typevar_tracking _____________ self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_pickle_dynamic_typevar_tracking> def test_pickle_dynamic_typevar_tracking(self): T = typing.TypeVar("T")
T2 = subprocess_pickle_echo(T, protocol=self.protocol)
tests/cloudpickle_test.py:2340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/testutils.py:89: in subprocess_pickle_echo out = subprocess_pickle_string(input_data, tests/testutils.py:63: in subprocess_pickle_string pickle_string = dumps(input_data, protocol=protocol) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError ________________ Protocol2CloudPickleTest.test_generic_subclass ________________ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_generic_subclass> def test_generic_subclass(self): T = typing.TypeVar('T')
class Base(typing.Generic[T]): pass
class DerivedAny(Base): pass
class LeafAny(DerivedAny): pass
class DerivedInt(Base[int]): pass
class LeafInt(DerivedInt): pass
class DerivedT(Base[T]): pass
class LeafT(DerivedT[T]): pass
klasses = [ Base, DerivedAny, LeafAny, DerivedInt, LeafInt, DerivedT, LeafT ] for klass in klasses:
assert pickle_depickle(klass, protocol=self.protocol) is klass
tests/cloudpickle_test.py:2423: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError __________________ Protocol2CloudPickleTest.test_generic_type __________________ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_generic_type> def test_generic_type(self): T = typing.TypeVar('T')
class C(typing.Generic[T]): pass
assert pickle_depickle(C, protocol=self.protocol) is C
tests/cloudpickle_test.py:2364: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _____ Protocol2CloudPickleTest.test_locally_defined_class_with_type_hints ______ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_locally_defined_class_with_type_hints> def test_locally_defined_class_with_type_hints(self): with subprocess_worker(protocol=self.protocol) as worker: for type_ in _all_types_to_test(): class MyClass: def method(self, arg: type_) -> type_: return arg MyClass.__annotations__ = {'attribute': type_}
def check_annotations(obj, expected_type, expected_type_str): assert obj.__annotations__["attribute"] == expected_type assert ( obj.method.__annotations__["arg"] == expected_type ) assert ( obj.method.__annotations__["return"] == expected_type ) return "ok"
obj = MyClass() assert check_annotations(obj, type_, "type_") == "ok"
assert (
worker.run(check_annotations, obj, type_, "type_") == "ok" ) tests/cloudpickle_test.py:2457: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/testutils.py:146: in run input_payload = dumps((func, args, kwargs), protocol=self.protocol) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _ Protocol2CloudPickleTest.test_pickle_constructs_from_module_registered_for_pickling_by_value _ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_pickle_constructs_from_module_registered_for_pickling_by_value> def test_pickle_constructs_from_module_registered_for_pickling_by_value(self): # noqa _prev_sys_path = sys.path.copy() try: # We simulate an interactive session that: # - we start from the /path/to/cloudpickle/tests directory, where a # local .py file (mock_local_file) is located. # - uses constructs from mock_local_file in remote workers that do # not have access to this file. This situation is # the justification behind the # (un)register_pickle_by_value(module) api that cloudpickle # exposes. _mock_interactive_session_cwd = os.path.dirname(__file__)
# First, remove sys.path entries that could point to # /path/to/cloudpickle/tests and be in inherited by the worker _maybe_remove(sys.path, '') _maybe_remove(sys.path, _mock_interactive_session_cwd)
# Add the desired session working directory sys.path.insert(0, _mock_interactive_session_cwd)
with subprocess_worker(protocol=self.protocol) as w: # Make the module unavailable in the remote worker w.run( lambda p: sys.path.remove(p), _mock_interactive_session_cwd ) # Import the actual file after starting the module since the # worker is started using fork on Linux, which will inherits # the parent sys.modules. On Python>3.6, the worker can be # started using spawn using mp_context in ProcessPoolExectutor. # TODO Once Python 3.6 reaches end of life, rely on mp_context # instead. import mock_local_folder.mod as mod # The constructs whose pickling mechanism is changed using # register_pickle_by_value are functions, classes, TypeVar and # modules. from mock_local_folder.mod import ( local_function, LocalT, LocalClass )
# Make sure the module/constructs are unimportable in the # worker. with pytest.raises(ImportError): w.run(lambda: __import__("mock_local_folder.mod")) with pytest.raises(ImportError): w.run( lambda: __import__("mock_local_folder.subfolder.mod") )
for o in [mod, local_function, LocalT, LocalClass]: with pytest.raises(ImportError): w.run(lambda: o)
register_pickle_by_value(mod) # function assert w.run(lambda: local_function()) == local_function() # typevar
assert w.run(lambda: LocalT.__name__) == LocalT.__name__
tests/cloudpickle_test.py:2583: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/testutils.py:146: in run input_payload = dumps((func, args, kwargs), protocol=self.protocol) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:911: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~LocalT, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _____________ Protocol2CloudPickleTest.test_pickle_dynamic_typevar _____________ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_pickle_dynamic_typevar> def test_pickle_dynamic_typevar(self): T = typing.TypeVar('T')
depickled_T = pickle_depickle(T, protocol=self.protocol)
tests/cloudpickle_test.py:2330: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError _______ Protocol2CloudPickleTest.test_pickle_dynamic_typevar_memoization _______ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_pickle_dynamic_typevar_memoization> def test_pickle_dynamic_typevar_memoization(self): T = typing.TypeVar('T')
depickled_T1, depickled_T2 = pickle_depickle((T, T),
protocol=self.protocol) tests/cloudpickle_test.py:2345: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/cloudpickle_test.py:81: in pickle_depickle return pickle.loads(cloudpickle.dumps(obj, protocol=protocol)) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError ________ Protocol2CloudPickleTest.test_pickle_dynamic_typevar_tracking _________ self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_pickle_dynamic_typevar_tracking> def test_pickle_dynamic_typevar_tracking(self): T = typing.TypeVar("T")
T2 = subprocess_pickle_echo(T, protocol=self.protocol)
tests/cloudpickle_test.py:2340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/testutils.py:89: in subprocess_pickle_echo out = subprocess_pickle_string(input_data, tests/testutils.py:63: in subprocess_pickle_string pickle_string = dumps(input_data, protocol=protocol) cloudpickle/cloudpickle_fast.py:73: in dumps cp.dump(obj) cloudpickle/cloudpickle_fast.py:632: in dump return Pickler.dump(self, obj) cloudpickle/cloudpickle.py:909: in _typevar_reduce return (_make_typevar, _decompose_typevar(obj)) cloudpickle/cloudpickle.py:899: in _decompose_typevar _get_or_create_tracker_id(obj), cloudpickle/cloudpickle.py:107: in _get_or_create_tracker_id class_tracker_id = _DYNAMIC_CLASS_TRACKER_BY_CLASS.get(class_def) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <WeakKeyDictionary at 0xf6742fc0>, key = ~T, default = None def get(self, key, default=None):
return self.data.get(ref(key),default)
E TypeError: cannot create weak reference to 'typing.TypeVar' object /usr/lib/python3.12/weakref.py:452: TypeError ... =========================== short test summary info ============================ FAILED tests/cloudpickle_test.py::CloudPickleTest::test_generic_subclass - Ty... FAILED tests/cloudpickle_test.py::CloudPickleTest::test_generic_type - TypeEr... FAILED tests/cloudpickle_test.py::CloudPickleTest::test_locally_defined_class_with_type_hints FAILED tests/cloudpickle_test.py::CloudPickleTest::test_pickle_constructs_from_module_registered_for_pickling_by_value FAILED tests/cloudpickle_test.py::CloudPickleTest::test_pickle_dynamic_typevar FAILED tests/cloudpickle_test.py::CloudPickleTest::test_pickle_dynamic_typevar_memoization FAILED tests/cloudpickle_test.py::CloudPickleTest::test_pickle_dynamic_typevar_tracking FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_generic_subclass FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_generic_type FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_locally_defined_class_with_type_hints FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_pickle_constructs_from_module_registered_for_pickling_by_value FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_pickle_dynamic_typevar FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_pickle_dynamic_typevar_memoization FAILED tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_pickle_dynamic_typevar_tracking ==== 14 failed, 226 passed, 15 skipped, 5 deselected, 12 warnings in 21.86s ====
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Tomáš Hrnčiar thrnciar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |2168842 | |(F39FTBFS,RAWHIDEFTBFS), | |2135404 (PYTHON3.12)
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=2135404 [Bug 2135404] Python 3.12 https://bugzilla.redhat.com/show_bug.cgi?id=2168842 [Bug 2168842] Fedora 39 FTBFS Tracker
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Ben Beasley code@musicinmybrain.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |code@musicinmybrain.net Link ID| |Github | |cloudpipe/cloudpickle/issue | |s/507
--- Comment #1 from Ben Beasley code@musicinmybrain.net --- Submitted upstream: https://github.com/cloudpipe/cloudpickle/issues/507
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
--- Comment #2 from Ben Beasley code@musicinmybrain.net --- PR to work around distutils removal (the easy part): https://github.com/cloudpipe/cloudpickle/pull/508
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|unspecified |urgent CC| |mhroncok@redhat.com Assignee|lbalhar@redhat.com |python-maint@redhat.com
--- Comment #3 from Miro Hrončok mhroncok@redhat.com --- This is currently one of the biggest blockers for the Python 3.12 rebuild.
Also, Lumír is on vacation.
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
--- Comment #4 from Ben Beasley code@musicinmybrain.net --- (In reply to Miro Hrončok from comment #3)
This is currently one of the biggest blockers for the Python 3.12 rebuild.
Also, Lumír is on vacation.
Any idea what should be done about “TypeError: cannot create weak reference to 'typing.TypeVar' object”?
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
--- Comment #5 from Miro Hrončok mhroncok@redhat.com --- Not yet. Will discus with Petr Viktorin ASAP.
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Github | |python/cpython/issues/10640 | |3
--- Comment #6 from Miro Hrončok mhroncok@redhat.com ---
Any idea what should be done about “TypeError: cannot create weak reference to 'typing.TypeVar' object”?
Apparently, a CPython regression: https://github.com/python/cpython/issues/106403
Will see if we skip the tests, if joblib and others build.
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Miro Hrončok mhroncok@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|urgent |unspecified Status|NEW |MODIFIED Fixed In Version| |python-cloudpickle-2.2.1-2. | |fc39
--- Comment #7 from Miro Hrončok mhroncok@redhat.com --- Tests skipped. Leaving MODIFIED, we will want to unskip them later.
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Charalampos Stratakis cstratak@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cstratak@redhat.com Assignee|python-maint@redhat.com |mhroncok@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-6f2952f81d has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f2952f81d
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |ERRATA Fixed In Version|python-cloudpickle-2.2.1-2. |python-cloudpickle-2.2.1-2. |fc39 |fc39 | |python-cloudpickle-2.2.1-4. | |fc40 Last Closed| |2023-09-07 10:52:34
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-6f2952f81d has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2024-c4b2008a49 (python-cloudpickle-3.0.0-8.el10_0) has been submitted as an update to Fedora EPEL 10.0. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-c4b2008a49
https://bugzilla.redhat.com/show_bug.cgi?id=2219334
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|python-cloudpickle-2.2.1-2. |python-cloudpickle-2.2.1-2. |fc39 |fc39 |python-cloudpickle-2.2.1-4. |python-cloudpickle-2.2.1-4. |fc40 |fc40 | |python-cloudpickle-3.0.0-8. | |el10_0
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- FEDORA-EPEL-2024-c4b2008a49 (python-cloudpickle-3.0.0-8.el10_0) has been pushed to the Fedora EPEL 10.0 stable repository. If problem still persists, please make note of it in this bug report.
epel-packagers-sig@lists.fedoraproject.org