Bug 2479751 - python-netaddr fails to build with Python 3.15: test failures related to changes in pprint output
Summary: python-netaddr fails to build with Python 3.15: test failures related to chan...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-netaddr
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: John Eckersberg
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-05-19 08:19 UTC by Karolina Surma
Modified: 2026-05-25 13:16 UTC (History)
4 users (show)

Fixed In Version: python-netaddr-1.3.0-12.fc45
Clone Of:
Environment:
Last Closed: 2026-05-19 22:05:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github netaddr netaddr pull 402 0 None open Fix doctest failures with Python 3.15 pprint changes 2026-05-19 20:59:23 UTC

Description Karolina Surma 2026-05-19 08:19:49 UTC
python-netaddr fails to build with Python 3.15.0b1.

__________________________ [doctest] tutorial_01.rst ___________________________
339 ... IPAddress('192.0.2.130'),
340 ... IPAddress('10.0.0.1'),
341 ... IPNetwork('192.0.2.128/28'),
342 ... IPNetwork('192.0.3.0/24'),
343 ... IPNetwork('192.0.2.0/24'),
344 ... IPNetwork('fe80::/64'),
345 ... IPAddress('::')]
346 >>> random.shuffle(ip_list)
347 >>> ip_list.sort()
348 >>> pprint.pprint(ip_list)
Differences (unified diff with -expected +actual):
    @@ -1,7 +1,9 @@
    -[IPAddress('10.0.0.1'),
    - IPNetwork('192.0.2.0/24'),
    - IPNetwork('192.0.2.128/28'),
    - IPAddress('192.0.2.130'),
    - IPNetwork('192.0.3.0/24'),
    - IPAddress('::'),
    - IPNetwork('fe80::/64')]
    +[
    +    IPAddress('10.0.0.1'),
    +    IPNetwork('192.0.2.0/24'),
    +    IPNetwork('192.0.2.128/28'),
    +    IPAddress('192.0.2.130'),
    +    IPNetwork('192.0.3.0/24'),
    +    IPAddress('::'),
    +    IPNetwork('fe80::/64'),
    +]

/builddir/build/BUILD/python-netaddr-1.3.0-build/netaddr-1.3.0/docs/source/tutorial_01.rst:348: DocTestFailure
__________________________ [doctest] tutorial_02.rst ___________________________
180 
181 Here is how you query an IAB with the EUI interface.
182 
183 >>> mac = EUI('00-50-C2-00-0F-01')
184 >>> mac.is_iab()
185 True
186 >>> iab = mac.iab
187 >>> iab
188 IAB('00-50-C2-00-00-00')
189 >>> iab.registration()
Differences (unified diff with -expected +actual):
    @@ -1,6 +1,8 @@
    -{'address': ['1241 Superieor Ave E', 'Cleveland  OH  44114', 'US'],
    - 'iab': '00-50-C2-00-00-00',
    - 'idx': 84680704,
    - ...
    - 'org': 'T.L.S. Corp.',
    - 'size': 537}
    +{
    +    'address': ['1241 Superieor Ave E', 'Cleveland  OH  44114', 'US'],
    +    'iab': '00-50-C2-00-00-00',
    +    'idx': 84680704,
    +    'offset': 457557,
    +    'org': 'T.L.S. Corp.',
    +    'size': 537,
    +}

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/10475259-python-netaddr/

For all our attempts to build python-netaddr with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-netaddr/

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.

Comment 1 John Eckersberg 2026-05-19 13:05:14 UTC
Quick glance at this, looks like netaddr upstream is falling off in maintenance a bit.  The latest supported version declared on pypi is 3.11.  There are a few open issues requesting new releases [1][2].  An attempt[3] to do so by a contributor was abandoned due to lack of response from maintainers.

Ideally we'd fix the tests upstream but given the current state I don't know how feasible that is going to be, so we might have to just propose an upstream fix and then carry it as a downstream patch.

[1] https://github.com/netaddr/netaddr/issues/396
[2] https://github.com/netaddr/netaddr/issues/398
[3] https://github.com/netaddr/netaddr/pull/400

Comment 2 Fedora Update System 2026-05-19 21:10:32 UTC
FEDORA-2026-dfec1a3d96 (python-netaddr-1.3.0-12.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-dfec1a3d96

Comment 3 Fedora Update System 2026-05-19 22:05:14 UTC
FEDORA-2026-dfec1a3d96 (python-netaddr-1.3.0-12.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Karolina Surma 2026-05-25 09:35:43 UTC
Thank you. After more upstream discussion about the breakages, this will be reverted in beta2: https://github.com/python/cpython/pull/150249 - once that is out, I'll check a build with a reverted commit.

Comment 5 Miro Hrončok 2026-05-25 13:16:52 UTC
Revert in https://src.fedoraproject.org/rpms/python-netaddr/pull-request/6


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