Opened 12 months ago

Closed 11 months ago

Last modified 8 months ago

#22244 closed enhancement (fixed)

python3-3.14.0

Reported by: Bruce Dubbs Owned by: Douglas R. Reno
Priority: normal Milestone: 13.0
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

New minor version.

Change History (33)

comment:1 by martyj19, 12 months ago

html5lib does not build and as a consequence qtwebengine does not build. I worked around it by downloading a binary wheel but this is not suitable for the book.

        File "/home/martyj/Build/html5lib-1.1/setup.py", line 93, in <module>
          isinstance(a.value, ast.Str)):
                              ^^^^^^^
      AttributeError: module 'ast' has no attribute 'Str'

comment:3 by Joe Locash, 12 months ago

Thunderbird needs the same Firefox patches.

Node.js also needs changes to configure:

--- node-v22.20.0/configure.orig	2025-09-24 00:12:08.000000000 -0400
+++ node-v22.20.0/configure	2025-10-09 13:21:59.437190202 -0400
@@ -4,6 +4,7 @@
 # Note that the mix of single and double quotes is intentional,
 # as is the fact that the ] goes on a new line.
 _=[ 'exec' '/bin/sh' '-c' '''
+command -v python3.14 >/dev/null && exec python3.14 "$0" "$@"
 command -v python3.13 >/dev/null && exec python3.13 "$0" "$@"
 command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"
 command -v python3.11 >/dev/null && exec python3.11 "$0" "$@"
@@ -23,7 +24,7 @@ except ImportError:
   from distutils.spawn import find_executable as which
 
 print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info))
-acceptable_pythons = ((3, 13), (3, 12), (3, 11), (3, 10), (3, 9), (3, 8))
+acceptable_pythons = ((3,14), (3, 13), (3, 12), (3, 11), (3, 10), (3, 9), (3, 8))
 if sys.version_info[:2] in acceptable_pythons:
   import configure
 else:

comment:4 by Douglas R. Reno, 12 months ago

The html5lib build failure can be fixed by applying ​https://github.com/html5lib/html5lib-python/pull/589

comment:5 by Douglas R. Reno, 12 months ago

Sphinx has three new test failures. I am unsure if this affects it at runtime, but the test failures are:

FAILED tests/test_extensions/test_ext_autodoc.py::test_autodoc_special_members - 
AssertionError: assert ['.. py:class...al1__()', ...] == ['.. py:class...al1__()', ...]

FAILED tests/test_extensions/
test_ext_autosummary.py::test_autosummary_generate_content_for_module_imported_members - 
AssertionError: assert ['Class', 'Foo', 'Union'] == ['Class', 'Foo']

FAILED tests/test_util/test_util_typing.py::test_is_invalid_builtin_class - 
AssertionError: assert dict_keys([('...th', 'Path')]) == {('_contextva...'Union'), ...}

comment:7 by Douglas R. Reno, 12 months ago

Summary: python3-3.14.0 (Wait for LFS) → python3-3.14.0

LFS now has Python 3.14.

comment:8 by Douglas R. Reno, 12 months ago

SWIG appears to be having some problems:

checking python testcase sneaky1 (with run test)
checking python testcase string_simple
checking python testcase struct_rename (with run test)
checking python testcase struct_initialization (with run test)
checking python testcase typedef_classforward_same_name (with run test)
checking python testcase typedef_struct
checking python testcase typemap_subst
checking python testcase union_parameter
checking python testcase unions (with run test)
checking python testcase python_runtime_data (with run test)
checking python testcase clientdata_prop
checking python testcase import_stl (with run test)
checking python testcase imports (with run test)
python_runtime_data_builtin_wrap.cxx:8802:1: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘void*’ in initialization
 8802 | };
      | ^
python_runtime_data_builtin_wrap.cxx:9183:1: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘void*’ in initialization
 9183 | };
      | ^
make[2]: *** [../../../Examples/Makefile:1379: python_cpp] Error 1
make[1]: *** [Makefile:149: python_runtime_data.multicpptest] Error 2
checking python testcase mod (with run test)
checking python testcase multi_import (with run test)
checking python testcase packageoption
checking python testcase template_typedef_import (with run test)
make[1]: Target 'check' not remade because of errors.
make: *** [Makefile:259: check-python-test-suite] Error 1
make: Target 'check' not remade because of errors.

There's a Python 3.14 support patch that I am testing now.

comment:9 by Douglas R. Reno, 12 months ago

Owner: changed from blfs-book to Douglas R. Reno
Status: new → assigned

comment:10 by Douglas R. Reno, 12 months ago

The Python 3.14 support for SWIG patch (​https://github.com/swig/swig/pull/3159) works perfectly.

comment:11 by Douglas R. Reno, 12 months ago

The next package I've run into problems with is Subversion. I've got a set of patches I'll try applying, but first want to update libarchive and apply yesterday's updates.

comment:12 by Douglas R. Reno, 12 months ago

Now that I'm done with those, I'm going to try and get my patch combined together for subversion and test them.

Subversion ends up running into memory leaks when doing reference counts. I was able to pick that up during runtime as well as in the tests, while checking out the Subversion repository on this machine it engaged a Python script and used over 20GB of RAM... for just their 1.14.x branch

comment:13 by Douglas R. Reno, 12 months ago

The patch I've developed does the trick!

Backporting patches out of a subversion repository is a bit tricky. In my case I had to do a 'svn diff -r [insert commit number here]:[second commit number]' and then make the changes manually. I'm hoping upstream fixes their ViewVC instance in the future, or makes a move to Github or Gitlab.

in reply to:  13 comment:14 by Joe Locash, 12 months ago

Replying to Douglas R. Reno:

I'm hoping upstream fixes their ViewVC instance in the future, or makes a move to Github or Gitlab.

Apache has a github mirror of subversion: ​https://github.com/apache/subversion

Last edited 12 months ago by Joe Locash (previous) (diff)

comment:15 by Douglas R. Reno, 12 months ago

That'll be really helpful for the future, thank you!

in reply to:  10 ; comment:16 by Xi Ruoyao, 12 months ago

Replying to Douglas R. Reno:

The Python 3.14 support for SWIG patch (​https://github.com/swig/swig/pull/3159) works perfectly.

It seems SWIG-4.4.0 has included it.

comment:17 by pierre, 12 months ago

Only discussed on IRC, so reporting it here. psutil tests hang at "test_reap_children". Note that right now the instructions for running tests in the book are wrong. You need to remove psutil/__init__.py in the build tree (so that the installed psutil is tested) before running the tests.

Last edited 12 months ago by pierre (previous) (diff)

comment:18 by pierre, 12 months ago

Last edited 12 months ago by pierre (previous) (diff)

in reply to:  18 ; comment:19 by Bruce Dubbs, 12 months ago

Replying to pierre:

for psutil: bug report at ​https://github.com/giampaolo/psutil/issues/2663, and PR submitted at ​https://github.com/giampaolo/psutil/pull/2666

That PR only adds one line to psutil/tests/test_process_all.py. I did that.

I am still using Python 3.13.7, but using the pyutil instructions that were in the book

python3 -m venv --system-site-packages testenv                            &&
testenv/bin/pip3 install pytest-{instafail,subtests,xdist} pyperf pypinfo &&
testenv/bin/python3 -m pytest

I still get:

=========================== short test summary info ============================
ERROR psutil/tests/test_aix.py
ERROR psutil/tests/test_bsd.py
ERROR psutil/tests/test_connections.py
ERROR psutil/tests/test_contracts.py
ERROR psutil/tests/test_linux.py
ERROR psutil/tests/test_memleaks.py
ERROR psutil/tests/test_misc.py
ERROR psutil/tests/test_osx.py
ERROR psutil/tests/test_posix.py
ERROR psutil/tests/test_process.py
ERROR psutil/tests/test_process_all.py
ERROR psutil/tests/test_scripts.py
ERROR psutil/tests/test_sudo.py
ERROR psutil/tests/test_sunos.py
ERROR psutil/tests/test_system.py
ERROR psutil/tests/test_testutils.py
ERROR psutil/tests/test_unicode.py
ERROR psutil/tests/test_windows.py

The errors all look like "ImportError: cannot import name '_psutil_linux' from 'psutil'"

in reply to:  19 comment:20 by pierre, 12 months ago

Replying to Bruce Dubbs:

Replying to pierre:

for psutil: bug report at ​https://github.com/giampaolo/psutil/issues/2663, and PR submitted at ​https://github.com/giampaolo/psutil/pull/2666

That PR only adds one line to psutil/tests/test_process_all.py. I did that.

You also need to rm psutil/init.py. See comment:17

comment:21 by Bruce Dubbs, 12 months ago

OK, now I get

FAILED psutil/tests/test_posix.py::TestSystemAPIs::test_disk_usage - assert 8...
FAILED psutil/tests/test_process_all.py::TestFetchAllProcesses::test_all - As...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_coverage - File...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_cpu_distribution
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_disk_usage - Ru...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_free - RuntimeE...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_ifconfig - Runt...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_iotop - FileNot...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_killall - FileN...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_meminfo - Runti...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_netstat - Runti...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_nettop - FileNo...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_pidof - Runtime...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_pmap - RuntimeE...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_procinfo - Runt...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_procsmem - Runt...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_ps - RuntimeErr...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_pstree - Runtim...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_temperatures - ...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_top - FileNotFo...
FAILED psutil/tests/test_scripts.py::TestExampleScripts::test_who - RuntimeEr...
FAILED psutil/tests/test_scripts.py::TestInternalScripts::test_import_all - F...
FAILED psutil/tests/test_scripts.py::TestInternalScripts::test_syntax_all - F...
FAILED psutil/tests/test_scripts.py::TestSetupScript::test_invocation - FileN...
FAILED psutil/tests/test_system.py::TestNetAPIs::test_net_if_addrs - KeyError...
FAILED psutil/tests/test_testutils.py::TestFakePytest::test_main - Permission...
======= 26 failed, 504 passed, 164 skipped, 462 subtests passed in 4.10s =======

BTW, this really should be discussed in ticket #22287 which is the psutil ticket.

comment:22 by pierre, 11 months ago

attrs test have new failures with python-3.14. See ​https://github.com/python-attrs/attrs/issues/1480. I guess they are harmless for us (change in the representation of the "union" type). But reporting here for completeness (I'm building all python modules with 3.14 presently).

in reply to:  22 comment:23 by pierre, 11 months ago

Replying to pierre:

attrs test have new failures with python-3.14. See ​https://github.com/python-attrs/attrs/issues/1480. I guess they are harmless for us (change in the representation of the "union" type). But reporting here for completeness (I'm building all python modules with 3.14 presently).

Upstream answer is to upgrade to attrs-25.4.0. Will do that.

in reply to:  16 comment:24 by Douglas R. Reno, 11 months ago

Replying to Xi Ruoyao:

Replying to Douglas R. Reno:

The Python 3.14 support for SWIG patch (​https://github.com/swig/swig/pull/3159) works perfectly.

It seems SWIG-4.4.0 has included it.

Very nice, thank you for checking on this!

comment:25 by pierre, 11 months ago

Some update on this:

  • some urllib3 tests are broken and may hang, but this was also the case with Python-3.13.7; added a timeout to the pytest command, and documented the failures.
  • mercurial has 15 failures, some of which are due to Deprecation warnings about invalid escape sequences, which are not expected. Two others seem to come from subversion. Will investigate.
  • in addition to some adaptation to Python-3.14 dating back to June, looks like there has been recent commits about adapting subversion to SWIG-4.4.0 (​https://github.com/apache/subversion/commit/bf72420e86059a89 and maybe some preceding commits). Not really a python thing, but subversion needs SWIG for generating python modules.

comment:26 by Douglas R. Reno, 11 months ago

A couple notes from today:

  • Six does have a test suite, so I've added it to the book
  • The new version of iniconfig going in has a test suite, so I've added it locally
  • html5lib does have a test suite, but installing the modules it needs fails because the version identifiers lock them to around the Python 3.6 era.
  • html5lib fixed at 8b1a61def3d03acc2849867287a92a090c88e3aa
  • Working on Cython at the moment and documenting it's test suite

comment:28 by Douglas R. Reno, 11 months ago

Today's progress:

  • Documented test failures in sphinx at 3c5e95b06868ce469ee05ab9a918d01d52ac5feb. Five of them are related to us using docutils-0.22.x. The remaining one is Python 3.14 related, but requires a major refactor from upstream of the autodoc code to fix. For now, I'm going to just document it - but if we encounter problems with it later, I'll try to backport all of the required changes.
  • Updated the Python dependencies chapter to new versions for compatibility purposes. See Ticket #22387.
  • Heading towards Firefox and Thunderbird after I wake up in the morning. I will fix Subversion along the way.
  • Commented out an outdated note at 3b3fccb54115247874358898e95069393b42eb39 regarding rebuilding Python with SQLite.
  • Built/ran tests against the following modules when available: setuptools_scm, sphinxcontrib-jquery, markdown, charset-normalizer, idna, roman-numerals-py, snowballstemmer, attrs, hatch-fancy-pypi-readme, trove-classifiers, certifi, urllib3, babel, iniconfig, sphinxcontrib-htmlhelp, iniconfig, sphinxcontrib-applehelp, sphinxcontrib-devhelp, sphinxcontrib-qthelp, sphinxcontrib-serializinghtml, pluggy, imagesize, hatchling, pyproject_hooks, msgpack, sphinxcontrib-jsmath, alabaster, pyproject_metadata, webencodings, editables, hatch_vcs, meson_python, pathspec, pytz, pytest, sphinx, psutil, pyyaml, cython, requests, numpy, pygments, build, six, docutils, and cachecontrol.
  • Updated test expectations for all sphinxcontrib-* modules.
  • Updated numpy, cachecontrol, pytest, idna, charset_normalizer, certifi, markdown, iniconfig, setuptools_scm, trove_classifiers, msgpack.
  • Added setuptools_rust, semantic_version, maturin, uv_build required for the cachecontrol update.

After waking up in the morning, I will begin my trek towards Firefox/Thunderbird and take care of subversion and pycairo along the way.

comment:29 by Douglas R. Reno, 11 months ago

PyXDG is broken with Python 3.14 due to the usage of ast.Str. Working on a patch now...

comment:30 by Douglas R. Reno, 11 months ago

Fixed PyXDG at cd1337d697988f400b5f45431e9a6550bf0881ae

Also tested chardet, commonmark, typogrify, asciidoc, mako, ply, py3c, pygdbmi, pyserial, recommonmark, scour, sentry_sdk, and sphinx_rtd_theme so far. Now to begin working towards Firefox/Thunderbird and bring in a fix for subversion along the way...

comment:31 by Douglas R. Reno, 11 months ago

Subversion fixed at 86668c91aa4e09c5a6a2b985bf93f9ef743f79c0

Several more packages built/tested today and a lot of progress towards Firefox/Thunderbird!

comment:32 by Douglas R. Reno, 11 months ago

Resolution: → fixed
Status: assigned → closed

Spidermonkey fixed at 202a529ab6601cc0b5e4d817433cab8ead0d2d69

Firefox fixed at acb13a4910d0433cd02f14eaa85294f391359ef0

Thunderbird fixed at eafcc56922aa4bfd3d56e27c0ed284b99deb62b5

Finished at 41fec42a54dc8bd6f7f9809bbfba80bcd4fbc1fe

At this time, all modules and dependencies are known to work. I have a few more packages to test, mostly related to stuff that uses dbusmock - but that will come probably tomorrow. It's been adventure, but this is done!

comment:33 by Bruce Dubbs, 8 months ago

Milestone: 12.5 → 13.0

Milestone renamed

Note: See TracTickets for help on using tickets.