Fedora Account System
Red Hat Associate
Red Hat Customer
python-stdnum fails to build with Python 3.15.0b1. ____________________________ [doctest] stdnum.numdb ____________________________ 046 [('0', {'prop1': 'foo'}), ('200', {'prop2': 'bar', 'prop3': 'baz'}), ('6', {})] 047 >>> pprint.pprint(dbfile.info('03456')) 048 [('0', {'prop1': 'foo'}), ('345', {'prop2': 'bar', 'prop3': 'baz'}), ('6', {})] 049 >>> pprint.pprint(dbfile.info('902006')) 050 [('90', {'prop1': 'booz'}), ('20', {'prop2': 'foo'}), ('06', {})] 051 >>> pprint.pprint(dbfile.info('909856')) 052 [('90', {'prop1': 'booz'}), ('985', {'prop2': 'fooz'}), ('6', {})] 053 >>> pprint.pprint(dbfile.info('9889')) 054 [('98', {'prop1': 'booz'}), ('89', {'prop2': 'foo'})] 055 >>> pprint.pprint(dbfile.info('633322')) Expected: [('6', {'prop1': 'boo'}), ('333', {'prop2': 'bar', 'prop3': 'baz', 'prop4': 'bla'}), ('22', {})] Got: [ ('6', {'prop1': 'boo'}), ('333', {'prop2': 'bar', 'prop3': 'baz', 'prop4': 'bla'}), ('22', {}), ] /builddir/build/BUILD/python-stdnum-2.2-build/python-stdnum-2.2/stdnum/numdb.py:55: DocTestFailure https://docs.python.org/3.15/whatsnew/3.15.html: pprint now uses modern defaults: indent=4, width=88, and the default compact=False output is now formatted similar to pretty-printed json.dumps(). (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade in gh-112632 and gh-149189.) For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15-b1/fedora-rawhide-x86_64/10477977-python-stdnum/ For all our attempts to build python-stdnum with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-stdnum/ 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.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. 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.
This will be reverted in beta2: https://github.com/python/cpython/pull/150249 - I'll close the issue once verified.
Is there a way a user of the pprint module can stay compatible with future changes? I suppose upstream will attempt to change the defaults some time in future again.
My understanding is that they are reverting this exactly *not* to do that. There is no plan to change this in Python 3.16+. Instead, either they will change pprint.pp or introduce a new pprint function with new defaults (e.g. pprint2 or pprint_whatever).
Thanks for the info, Miro.