Bug 2040164 - python-pyrsistent fails to build with Python 3.11: pyrsistent/_pmap.py:216: DocTestFailure
Summary: python-pyrsistent fails to build with Python 3.11: pyrsistent/_pmap.py:216: D...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyrsistent
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-01-13 07:04 UTC by Tomáš Hrnčiar
Modified: 2022-01-14 20:19 UTC (History)
4 users (show)

Fixed In Version: python-pyrsistent-0.18.0-10.fc36
Clone Of:
Environment:
Last Closed: 2022-01-13 15:01:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github tobgu pyrsistent issues 238 0 None open PMap order changes in Python 3.11a3, causing a doctest failure 2022-01-13 14:43:06 UTC

Description Tomáš Hrnčiar 2022-01-13 07:04:30 UTC
python-pyrsistent fails to build with Python 3.11.0a3.

=================================== FAILURES ===================================
____________________ [doctest] pyrsistent._pmap.PMap.update ____________________
211 
212         Return a new PMap with the items in Mappings inserted. If the same key is present in multiple
213         maps the rightmost (last) value is inserted.
214 
215         >>> m1 = m(a=1, b=2)
216         >>> m1.update(m(a=2, c=3), {'a': 17, 'd': 35})
Expected:
    pmap({'c': 3, 'b': 2, 'a': 17, 'd': 35})
Got:
    pmap({'d': 35, 'c': 3, 'b': 2, 'a': 17})

/builddir/build/BUILD/pyrsistent-0.18.0/pyrsistent/_pmap.py:216: DocTestFailure
=========================== short test summary info ============================
FAILED pyrsistent/_pmap.py::pyrsistent._pmap.PMap.update
========================= 1 failed, 79 passed in 0.12s =========================

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03146641-python-pyrsistent/

For all our attempts to build python-pyrsistent with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-pyrsistent/

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.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 Ben Beasley 2022-01-13 14:43:07 UTC
Thanks. I’ve submitted this upstream as https://github.com/tobgu/pyrsistent/issues/238.

The root cause is probably a change in the order of entries in pyrsistent’s map type, probably due to a change in string hashing in 3.11a3 (https://docs.python.org/3.11/whatsnew/3.11.html#other-cpython-implementation-changes).

Until upstream has decided on a solution, I’ll skip the affected doctest.

Comment 2 Fedora Update System 2022-01-13 14:59:56 UTC
FEDORA-2022-b7f546b90e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b7f546b90e

Comment 3 Fedora Update System 2022-01-13 15:01:51 UTC
FEDORA-2022-b7f546b90e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Ben Beasley 2022-01-14 20:14:49 UTC
A PR is now merged upstream for this: https://github.com/tobgu/pyrsistent/pull/239

I’ll update the Fedora package to use that PR as a patch, rather than skipping the affected doctests.

Comment 5 Ben Beasley 2022-01-14 20:19:21 UTC
The fix is also now released in pyrsistent 0.18.1.


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