Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1806318 - python-cloudpickle fails to build with Python 3.9: Waiting for next pre-release (no action needed)
Summary: python-cloudpickle fails to build with Python 3.9: Waiting for next pre-relea...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cloudpickle
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-02-23 18:57 UTC by Miro Hrončok
Modified: 2020-03-03 23:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-03 23:30:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-02-23 18:57:24 UTC
python-cloudpickle fails to build with Python 3.9.0a3.

=================================== FAILURES ===================================
____________ CloudPickleTest.test_reducer_override_reference_cycle _____________
self = <tests.cloudpickle_test.CloudPickleTest testMethod=test_reducer_override_reference_cycle>
    @pytest.mark.skipif(
            platform.python_implementation() != "CPython" or
            (sys.version_info >= (3, 8, 0) and sys.version_info < (3, 8, 2)),
            reason="Underlying bug fixed upstream starting Python 3.8.2")
    def test_reducer_override_reference_cycle(self):
        # Early versions of Python 3.8 introduced a reference cycle between a
        # Pickler and it's reducer_override method. Because a Pickler
        # object references every object it has pickled through its memo, this
        # cycle prevented the garbage-collection of those external pickled
        # objects. See #327 as well as https://bugs.python.org/issue39492
        # This bug was fixed in Python 3.8.2, but is still present using
        # cloudpickle and Python 3.8.0/1, hence the skipif directive.
        class MyClass:
            pass
    
        my_object = MyClass()
        wr = weakref.ref(my_object)
    
        cloudpickle.dumps(my_object)
        del my_object
>       assert wr() is None, "'del'-ed my_object has not been collected"
E       AssertionError: 'del'-ed my_object has not been collected
E       assert <tests.cloudpickle_test.CloudPickleTest.test_reducer_override_reference_cycle.<locals>.MyClass object at 0x7f9a2e83c3a0> is None
E        +  where <tests.cloudpickle_test.CloudPickleTest.test_reducer_override_reference_cycle.<locals>.MyClass object at 0x7f9a2e83c3a0> = <weakref at 0x7f9a324179a0; to 'MyClass' at 0x7f9a2e83c3a0>()
tests/cloudpickle_test.py:131: AssertionError
________ Protocol2CloudPickleTest.test_reducer_override_reference_cycle ________
self = <tests.cloudpickle_test.Protocol2CloudPickleTest testMethod=test_reducer_override_reference_cycle>
    @pytest.mark.skipif(
            platform.python_implementation() != "CPython" or
            (sys.version_info >= (3, 8, 0) and sys.version_info < (3, 8, 2)),
            reason="Underlying bug fixed upstream starting Python 3.8.2")
    def test_reducer_override_reference_cycle(self):
        # Early versions of Python 3.8 introduced a reference cycle between a
        # Pickler and it's reducer_override method. Because a Pickler
        # object references every object it has pickled through its memo, this
        # cycle prevented the garbage-collection of those external pickled
        # objects. See #327 as well as https://bugs.python.org/issue39492
        # This bug was fixed in Python 3.8.2, but is still present using
        # cloudpickle and Python 3.8.0/1, hence the skipif directive.
        class MyClass:
            pass
    
        my_object = MyClass()
        wr = weakref.ref(my_object)
    
        cloudpickle.dumps(my_object)
        del my_object
>       assert wr() is None, "'del'-ed my_object has not been collected"
E       AssertionError: 'del'-ed my_object has not been collected
E       assert <tests.cloudpickle_test.CloudPickleTest.test_reducer_override_reference_cycle.<locals>.MyClass object at 0x7f9a2ed11c10> is None
E        +  where <tests.cloudpickle_test.CloudPickleTest.test_reducer_override_reference_cycle.<locals>.MyClass object at 0x7f9a2ed11c10> = <weakref at 0x7f9a2ebb6cc0; to 'MyClass' at 0x7f9a2ed11c10>()
tests/cloudpickle_test.py:131: AssertionError


This seems like something that will naturally go away with the next 3.9.0 pre-release, according to the long skipif comment and investigating the CPython bug.
a4 is scheduled for tomorrow, hence I propose we wait for that and re-test.



For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01249349-python-cloudpickle/

For all our attempts to build python-cloudpickle with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-cloudpickle/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-03-03 23:30:55 UTC
3.9.0a4 indeed fixes this. Sorry for the noise.


Note You need to log in before you can comment on or make changes to this bug.