Bug 2584094 - python3-openid fails to build with Python 3.16: ValueError: Port could not be cast to integer value as '80:90'
Summary: python3-openid fails to build with Python 3.16: ValueError: Port could not be...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python3-openid
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Troy Dawson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.16
TreeView+ depends on / blocked
 
Reported: 2026-11-25 11:52 UTC by Karolina Surma
Modified: 2026-11-30 19:35 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-11-25 11:52:51 UTC
python3-openid fails to build with Python 3.16.0a2.

ERROR: runTest (openid.test.trustroot._ParseTest.runTest)
Trust root parsing checking - Does not parse: 'http://*.foo.com:80:90/'
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-openid-3.1.0-build/python3-openid-3.1.0/openid/test/trustroot.py", line 17, in runTest
    tr = TrustRoot.parse(self.case)
  File "/builddir/build/BUILD/python3-openid-3.1.0-build/python3-openid-3.1.0/openid/server/trustroot.py", line 262, in parse
    url_parts = _parseURL(trust_root)
  File "/builddir/build/BUILD/python3-openid-3.1.0-build/python3-openid-3.1.0/openid/server/trustroot.py", line 85, in _parseURL
    proto, netloc, path, params, query, frag = urlparse(url)
                                               ~~~~~~~~^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 486, in urlparse
    scheme, netloc, url, params, query, fragment = _urlparse(url, scheme, allow_fragments)
                                                   ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 499, in _urlparse
    scheme, netloc, url, query, fragment = _urlsplit(url, scheme, allow_fragments)
                                           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 646, in _urlsplit
    _checknetloc(netloc)
    ~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 547, in _checknetloc
    _validate_port(port)
    ~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 166, in _validate_port
    raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as '80:90'

======================================================================
ERROR: runTest (openid.test.trustroot._ParseTest.runTest)
Trust root parsing checking - Does not parse: 'http://localhost:1900foo/'
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-openid-3.1.0-build/python3-openid-3.1.0/openid/test/trustroot.py", line 17, in runTest
    tr = TrustRoot.parse(self.case)
  File "/builddir/build/BUILD/python3-openid-3.1.0-build/python3-openid-3.1.0/openid/server/trustroot.py", line 262, in parse
    url_parts = _parseURL(trust_root)
  File "/builddir/build/BUILD/python3-openid-3.1.0-build/python3-openid-3.1.0/openid/server/trustroot.py", line 85, in _parseURL
    proto, netloc, path, params, query, frag = urlparse(url)
                                               ~~~~~~~~^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 486, in urlparse
    scheme, netloc, url, params, query, fragment = _urlparse(url, scheme, allow_fragments)
                                                   ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 499, in _urlparse
    scheme, netloc, url, query, fragment = _urlsplit(url, scheme, allow_fragments)
                                           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 646, in _urlsplit
    _checknetloc(netloc)
    ~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 547, in _checknetloc
    _validate_port(port)
    ~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.16/urllib/parse.py", line 166, in _validate_port
    raise ValueError(f"Port could not be cast to integer value as {port!r}")
ValueError: Port could not be cast to integer value as '1900foo'


https://docs.python.org/3.16/whatsnew/3.16.html
urllib.parse.urlsplit() and urllib.parse.urlparse() now raise ValueError when the URL is parsed if the port is not a decimal number or is outside the range 0–65535. Previously, the error was only raised when the port attribute was read. This also affects urljoin(), and urldefrag() for URLs with a fragment. Code which never read port may now fail on URLs such as:

    SCP-style addresses given a scheme, such as git+ssh://git:org/repo.git;

    multi-host URLs with ports, such as mongodb://h1:27017,h2:27017/db or postgresql://h1:5432,h2:5433/db;

    URL templates with a placeholder port, such as http://localhost:{port}/.

These are not valid URLs under RFC 3986. To process them, split off the netloc yourself before calling urlsplit(), for example by replacing it with a placeholder host, or fill in templates before parsing them. (Contributed by Miguel Brito and Senthil Kumaran in gh-88037.)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359620-python3-openid/

For all our attempts to build python3-openid with Python 3.16, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/python3-openid/

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

Let us know here if you have any questions.

Python 3.16 is planned to be included in Fedora 47.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16.
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 Troy Dawson 2026-11-30 16:59:28 UTC
Several years ago I agreed to be the EPEL maintainer of this package.  At some point, the Fedora maintainer left and they made me the main admin.
What I didn't know when I agreed to be the EPEL maintainer is that this is no longer supported upstream and that Fedora has been providing patches to keep it running.

I'm not saying that we should abandon this package.
I'm saying that I don't have the time, or the expertise to get this fixed for Python 3.16.
It would be good if others on this bug got this updated / fixed.

Comment 2 Troy Dawson 2026-11-30 17:00:23 UTC
(In reply to Troy Dawson from comment #1)
> the Fedora maintainer left and they made me the main admin
... without me knowing.

Comment 3 Miro Hrončok 2026-11-30 18:37:34 UTC
> that this is no longer supported upstream

https://github.com/necaris/python3-openid/commits/main/ looks reasonable

Comment 4 Troy Dawson 2026-11-30 19:35:55 UTC
Ah, I only looked at https://github.com/necaris/python3-openid/releases which hasn't had a release for over a decade, I didn't look at tags, which had a tag ... 6 years ago. :)
But for those wondering, there are many commits past that, including some this month.


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