Bug 2578185 - jc fails to build with Python 3.16: ValueError: Port could not be cast to integer value as '%38{%38' and more
Summary: jc fails to build with Python 3.16: ValueError: Port could not be cast to int...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: jc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Artur Frenszek-Iwicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.16
TreeView+ depends on / blocked
 
Reported: 2026-11-20 12:46 UTC by Karolina Surma
Modified: 2026-11-20 12:46 UTC (History)
5 users (show)

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


Attachments (Terms of Use)

Description Karolina Surma 2026-11-20 12:46:43 UTC
jc fails to build with Python 3.16.0a2.

9 tests failed with two types of failures:

ERROR: test_url_http_encoded_host_and_invalid_port (tests.test_url.MyTests.test_url_http_encoded_host_and_invalid_port)
Test HTTP URL with encoded characters in the hostname and an invalid encoded port
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/jc-1.26.2-build/jc-1.26.2/tests/test_url.py", line 92, in test_url_http_encoded_host_and_invalid_port
    self.assertEqual(jc.parsers.url.parse(data, quiet=True), expected)
                     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/jc-1.26.2-build/jc-1.26.2/jc/parsers/url.py", line 314, in parse
    parts = urlsplit(unwrap(data))
  File "/usr/lib64/python3.16/urllib/parse.py", line 604, in urlsplit
    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 '%38{%38'

FAIL: test_csv_cities (tests.test_csv.MyTests.test_csv_cities)
Test 'cities.csv' file
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/jc-1.26.2-build/jc-1.26.2/tests/test_csv.py", line 150, in test_csv_cities
    self.assertEqual(jc.parsers.csv.parse(self.generic_csv_cities, quiet=True), self.generic_csv_cities_json)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: [{'LatD': '   41', ' "LatM"': '    5', ' "LatS"': ' [25676 chars]H '}] != [{'LatD': '41', 'LatM': '5', 'LatS': '59', 'NS': 'N'[18340 chars]H '}]

First differing element 0:
{'LatD': '   41', ' "LatM"': '    5', ' "LatS"': ' [144 chars] OH'}
{'LatD': '41', 'LatM': '5', 'LatS': '59', 'NS': 'N'[85 chars]'OH'}

Diff is 71475 characters long. Set self.maxDiff to None to see it.

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

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

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

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.


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