Skip to content
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

Test failure with Python 3.14 alpha 2 #544

Open
frenzymadness opened this issue Nov 25, 2024 · 2 comments
Open

Test failure with Python 3.14 alpha 2 #544

frenzymadness opened this issue Nov 25, 2024 · 2 comments

Comments

@frenzymadness
Copy link
Contributor

When testing cloudpickle with Python 3.14 alpha 2, it fails with the following error:

_____________________ CloudPickleFileTests.test_empty_file _____________________
self = <cloudpickle.cloudpickle.Pickler object at 0x7f5616c94220>
obj = <_io.TextIOWrapper name='/tmp/tmpfi2sfxwg/testfile' mode='r' encoding='UTF-8'>
    def dump(self, obj):
        try:
>           return super().dump(obj)
cloudpickle/cloudpickle.py:1295: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cloudpickle/cloudpickle.py:1380: in reducer_override
    return self._function_reduce(obj)
cloudpickle/cloudpickle.py:1258: in _function_reduce
    return self._dynamic_function_reduce(obj)
cloudpickle/cloudpickle.py:1243: in _dynamic_function_reduce
    state = _function_getstate(func)
cloudpickle/cloudpickle.py:719: in _function_getstate
    f_globals_ref = _extract_code_globals(func.__code__)
cloudpickle/cloudpickle.py:307: in _extract_code_globals
    out_names = _extract_code_globals_cache.get(co)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <WeakKeyDictionary at 0x7f56178d3a80>
key = <code object _make_function at 0x7f5617715e90, file "/builddir/build/BUILD/python-cloudpickle-3.1.0-build/cloudpickle-3.1.0/cloudpickle/cloudpickle.py", line 505>
default = None
    def get(self, key, default=None):
>       return self.data.get(ref(key),default)
E       RecursionError: maximum recursion depth exceeded in comparison
E       when serializing function reconstructor
E       when serializing function object
E       when serializing function reconstructor
E       when serializing function object
E       when serializing function reconstructor
E       when serializing function object
…
@vstinner
Copy link

vstinner commented Dec 4, 2024

It reported the issue to Python upstream: python/cpython#127597 It's not a Python regression.

vstinner added a commit to vstinner/cloudpickle that referenced this issue Dec 4, 2024
* _getattribute() API changed in Python 3.14.
* itertools.count() no longer supports pickle on Python 3.14:
  https://docs.python.org/dev/whatsnew/3.14.html#itertools
* Fix annotations test.
@vstinner
Copy link

vstinner commented Dec 4, 2024

I proposed #545 to port cloudpickle to Python 3.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants