Skip to content

Python 3.14 support and dependency pinning and deprecation warning policies #4541

@gotmax23

Description

@gotmax23

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

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

  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions