Repository navigation
Python 3.14 support and dependency pinning and deprecation warning policies #4541
Description
Description
Please leave a brief description of the bug or feature request:
Fedora is proud to be an early adopter of Python 3.14 as part of our goal to help the ecosystem by testing and integrating new Python versions, and I worked on getting all dependencies functional and addressing test failures in the scancode stack. I am creating this issue to track supporting Python 3.14 officially upstream. We only run a subset of upstream scancode tests, but this reflects new failures after the Python 3.14 update.
There are also some concerns I have with dependency pinning and deprecation warning practices in the aboutcode projects that I mentioned that created extra friction when updating to Python 3.14. See the Commentary below.
scancode issues
-
packagedcode: don't use removed ast module attributes #4539 that I filed earlier today was needed due to ast module removals.
-
We ignored the remaining test failures in our scancode build:
# ERROR: 'sbin/fstrim' is a link to an absolute path # These two are due to the tarfile module defaulting to the data filter in py3.14. # Let upstream figure out what to do about this issue. test_can_get_installed_system_packages_with_license_from_alpine_container_layer test_can_scan_installed_system_package_in_alpine_container_layer # These test failures have to do with the handling of tempfiles in the CLI # and don't seem particularly important. Disable them for now test_scan_keep_temp_files_is_false_by_default test_scan_keep_temp_files_keeps_files and not
-
test_license_reference_to_file_beside_package_manifest test is broken #4540 is not directly caused by Python 3.14 but also impacted us while trying to update scancode to the latest version.
Commentary: Both the ast and tarfile issues were due to known deprecation that upstream seemingly ignored, so perhaps aboutcode should consider adopting a more proactive approach to addressing deprecation warnings (such as running pytest with -W error) and avoid pinning old dependency versions 1. I'm not sure what's going on with the temp_files tests. I didn't take the time to debug them, and I'm not sure if the issue is with the Fedora build environment.
dependency issues
- I replaced
pkginfo2withpkginfoin scancode with a downstream patch.pkginfo2seems to be an under-maintained fork ofpkginfoand has failures with new setuptools versions that prevented it from being rebuilt for Python 3.14. These were reported in Tests are failing with new setuptools due to new metadata version pkginfo2#5 but never addressed upstream. - Test failure on Python 3.14 commoncode#88 requires disabling an additional test in our commoncode package. This was also caused by tarfile changes.
- Issues with beartype prevented spdx-tools from being rebuilt. These were fixed in [Feature Request] Official Python 3.14 support! It do be like: ☢ ☣ ⚠ 🦖 beartype/beartype#537, but a new upstream release has not yet been created.
- Once we updated beartype to the latest git snapshot, I backported spdx/tools-python@6817ca7 for beartype compatibility and submitted relationship_writer: properly access __annotations__ dict spdx/tools-python#858 to spdx-tools to fix other issues that came up in the spdx-tools package. The spdx-tools maintainers have not yet applied my patch.
Commentary: The beartype issues were understandable due to major typing changes in Python 3.14. I'm not sure about the state of the pkginfo2 project or spdx-tools.
How To Reproduce
Tell us how to reproduce the issue.
Run scancode tests in an environment with Python 3.14. Make sure to install the latest git snapshots of https://github.com/gotmax23/tools-python/tree/py314-annotations and https://github.com/beartype/beartype that have the patches mentioned.
System configuration
For bug reports, it really helps us to know:
- What OS are you running on? (Windows/MacOS/Linux) Fedora Linux Rawhide (44)
- What version of scancode-toolkit was used to generate the scan file? 32.4.1
- What installation method was used to install/run scancode? (pip/source download/other) source
Thank you for reading my wall of text and for all the work you do on scancode!
Footnotes
-
EDIT: To be clear, I was referring to pinning of test dependencies for CI in requirements.txt, not the dependencies in the packaging metadata (setup.cfg) which are specified properly without excessive pinning for the most part. After looking again, it seems like requirements.txt does get updated on a somewhat regular basis but importlib-metadata was just held back in https://github.com/aboutcode-org/scancode-toolkit/commit/97bc9b5a6e752d06124280c66d5965b6be723293. Using something like dependabot or a Github Actions scheduled pipeline to automatically submit PRs to bump requirements.txt is still a good idea. ↩
Activity
reneleonhardt commentedon Sep 2, 2025
Great to see Python 3.14 support!
I can't even install it on Python 3.13 😅
bitarray v0.9.3 is 6 years old: https://pypi.org/project/bitarray/#history
I can only find outdated test data:
https://github.com/aboutcode-org/scancode-toolkit/blob/develop/tests/packagedcode/data/pypi/develop/scancode_toolkit.egg-info/requires.txt#L3
But of course nobody should use requirements pinning anymore, exactly why packages can't be installed on newer Python versions anymore when updates are forbidden.
https://iscinumpy.dev/post/bound-version-constraints/
gotmax23 commentedon Sep 2, 2025
The latest version of scancode-toolkit is 32.4.1 which should support Python 3.13. You are trying to install 21.2.9 from over four years ago. It looks like you are having a separate issue and should create a new ticket for that.
I was referring to the fact that tests are all run in upstream CI using library versions pinned in requirements.txt, which is generally a good practice, provided that they are updated on a regular basis and not pinned to versions that are significantly out of date.
Pinning
bitarray<1.0.0,>=0.8.1in the packaging metadata probably made sense at the time if it was expected that bitarray 1.0.0 would have breaking changes.reneleonhardt commentedon Sep 3, 2025
You can see my command line, that's what uvx resolves to when ommitting the version.
But
isn't much better for Python 3.13.
But I didn't want to steal your thread, didn't know that you don't support arm64 or Apple Silicon yet, typecode-libmagic doesn't seem to be maintained anymore, last release is 4 years old:
https://pypi.org/project/typecode-libmagic/#files.
I can only recommend using the standard cibuildwheel action if possible to build for all platforms and architectures.
https://github.com/pypa/cibuildwheel#example-setup
stefan6419846 commentedon Sep 4, 2025
This is a separate issue and is tracked in #3958.
pombredanne commentedon Sep 10, 2025
@gotmax23 Thanks for all this. This is awesome! As for pkginfo2, it needs to be updated, but the reason for the fork and patch is security: pkginfo does insecure evaluation of code that is possibly dangerous when processing random code at scale. It may be OK for pkginfor, but is not OK for ScanCode
AyanSinhaMahapatra commentedon Jan 22, 2026
Thanks++ for all your help @gotmax23, much appreciated.
python 3.14 is now supported in the latest scancode-toolkit release at https://github.com/aboutcode-org/scancode-toolkit/releases/tag/v32.5.0
Closing finally!
reneleonhardt commentedon Jan 22, 2026
Great to see Python 3.14 support 🥳
Did you already try 3.15, could something be improved to make the update process easier?
AyanSinhaMahapatra commentedon Jan 22, 2026
@reneleonhardt not really, python3.15 should not be ready for another half an year atleast: https://peps.python.org/pep-0790/#release-schedule so usually we don't plan on testing before we have release candidates on python3.15, because:
One thing which we could improve is:
Help is much welcome here, like @gotmax23 helped us a lot with the issues and PRs for the python3.14 support.
So if you want to play with python3.15 support even in the pre-releases, please do, and also let us know if you face any issues there
stefan6419846 commentedon Jan 23, 2026
In general, at least starting testing with the release candidate is recommended. From my experience, SCTK still lagged behind with support for new Python releases by some months in the past.
I tend to start testing my tools and libraries with the latest unreleased Python versions early and - apart from having to build some native libraries manually and some rather uncommon failures with less than a handful of packages - did not observe any of such hard issues. The most annoying packages tend to be Rust-based ones. At least my basic testing of the most relevant SCTK functionality for my use-case with Python 3.15.0-alpha.5 did not run into hard issues.
I guess this is one of the most important aspects to consider, as well as timely feedback from maintainers about reported issues and PRs. While I understand that this might be a lot of work to start with, it could lower the burden for new or interested contributors (although this seems to have changed lately, with multiple persons wanting to work on newly reported issues and pinging maintainers constantly). At the moment it sometimes feels like issues or PRs go unnoticed for multiple months, especially in dependencies maintained as part of the organization. Nevertheless, this is something which probably should not be discussed here, but in a dedicated issue or across the current maintainers (which I am not, just a user and library consumer occasionally opening issues or PRs).
reneleonhardt commentedon Jan 23, 2026
Never heard of massive problems from betas or release candidates.
Just a food for thought, official testing starts with beta1 to reduce upgrade efforts and delays to a minimum.
https://pythoninsider.blogspot.com/2025/05/python-3140-beta-1-is-here.html (May 7, 2025)