Changes in Fedora 41 For Developers

Python 3.13

Fedora 41 provides Python 3.13, the latest major release of the Python language. For a list of changes in this release, see the upstream documentation, especially the Porting to Python 3.13 section.

In addition, PythonC is now built with the -03 compiler flag in Fedora, which aligns with how Python is built upstream, and provides a noticeable performance improvement (for example, 1.04x faster pyperformance geometric mean). This only affects the interpreter and standard Python library, not any third party extension modules built as RPMs or on developer systems.

Notes on migrating user-installed pip packages

When you upgrade from Fedora 40 to Fedora 41, the main Python interpreter version changes from 3.12 to 3.13. If you have any Python packages installed using pip, you must complete the following procedure to migrate them to the new version:

  1. Install the previously main Python version:

    sudo dnf install python3.12
  2. Get pip for the previously main Python version:

    python3.12 -m ensurepip --user
  3. Observe the installed packages:

    python3.12 -m pip list
  4. Save the list with specific versions:

    python3.12 -m pip freeze > installed.txt
  5. Install the same packages for the now default version:

    python3 -m pip install --user -r installed.txt
  6. Uninstall user-installed packages for 3.12; this ensures proper removal of files in ~/.local/bin:

    python3.12 -m pip uninstall $(python3.12 -m pip list --user | cut -d" " -f1)
  7. Optionally, clean up the now empty directory structure:

    rm -rf ~/.local/lib/python3.12/
  8. Optionally, remove the unneeded Python version:

    sudo dnf remove python3.12

Additionally, if you have any pip packages installed using sudo, run the following commands before running the final step above which removes `python3.12`, or install it again temporarily:

  1. Get pip for the previously main Python version for root:

    sudo python3.12 -m ensurepip
  2. Observe the system-installed packages:

    sudo python3.12 -m pip list
  3. Uninstall installed packages for 3.12; this ensures proper removal of files in /usr/local/bin:

    sudo python3.12 -m pip uninstall $(python3.12 -m pip list | cut -d" " -f1)
  4. Optionally, clean up now empty directory structure:

    sudo rm -rf /usr/local/lib*/python3.12/

If you followed the first procedure, the packages are already installed for your user account, which is the preferred option. Avoid using sudo pip in the future; these instructions are only intended to recover users who already used sudo pip in the past.

Pytest 8

Pytest is a testing framework for Python-based projects. With Pytest you can write simple and scalable test cases for your code. Pytest 8 is now available, which removes a lot of deprecated functions and introduces some breaking changes. The notable updates include:

  • Improved differences that pytest prints when assertion fails.

  • The internal FixtureManager.getfixtureclosure method has changed. Plugins that use this method or that subclass the FixtureManager component and overwrite FixtureManager.getfixtureclosure, will need to adapt.

  • The new-style hook wrappers are now used internally.

  • Sanitized the handling of the default parameter when defining configuration options.

  • Some packages will likely fail to build.

For more details, see the upstream release notes.

PyTorch 2.4

Fedora 41 provides PyTorch version 2.4, the latest upstream of this popular Python library for deep learning using CPUs and GPUs.

For more information, see the upstream release announcement and release notes.

ROCm 6.2

ROCm 6.2 is the latest iteration of AMD’s compute libraries that work with the linux kernel to allow users to run compute workloads on their GPUs. As many GPU’s as possible are enabled so open acceleration is available and easy for to as wide an audience as possible. It is also integrated with PyTorch in Fedora 41. See the upstream release notes for details.

Python 2 retired

The python2.7 package has been retired without replacement from Fedora Linux 41. There will be no Python 2 in Fedora 41 or later, other than PyPy. Packages requiring python2.7 on runtime or buildtime will have to be updated to use Python 3, or be retired as well.

Golang 1.23

The latest stable release of this programming language is now available in Fedora 41. Notable changes include:

  • The range clause in the for-range loop accepts iterator functions as range expressions. The supported types of iterator functions are:

    • func(func() bool)

    • func(func(K) bool)

    • func(func(K, V) bool)

    Calls of the iterator argument function produce the iteration values for the for-range loop.

  • The Go toolchain can collect usage and breakage statistics. These are referred to as "Go telemetry" and represent an opt-in-system controlled by the go telemetry command.

  • The GOROOT_FINAL environment variable no longer works. Install a symbolic link instead of relocating or copying the go binary if your distribution installs the go command to a location other than $GOROOT/bin/go.

  • The traceback message printed by the runtime after a fatal error now indents the second and subsequent lines of the message by a single tab.

  • Significant changes to the implementation of the time.Timer and time.Ticker types.

For more details, see the upstream release notes.

Perl 5.40

The latest stable release of this programming language is now available in Fedora 41. Notable changes include:

  • New CLASS keyword

  • :reader attribute for field variables. This requests that an accessor method be automatically created that returns the value of the field variable from the given instance.

  • When processing command-line options, Perl allows a space between the -M switch and the name of the module after it.

  • The inf and nan functions (experimental) have been added to the builtin namespace. They act as constants that yield the floating-point infinity and Not-a-Numer value respectively.

  • Calling the import method of an unknown package produces a warning.

  • The syntax of the return operator now rejects indirect objects.

  • Using goto to jump from an outer scope into an inner scope is deprecated and will be removed completely in Perl 5.42.

For more details, see the upstream release notes.

NodeJS 22.0

Fedora 41 now ships with Node.js 22.x as the default Node.js JavaScript server-side engine. If your applications are not yet ready for this newer version, they will need to be modified to depend on the compatibility package nodejs20 and to rely on /usr/bin/node20 instead of /usr/bin/node for operation.

Haskell GHC 9.6 and Stackage LTS 22

For Fedora 41, the main GHC Haskell compiler package have been from version 9.4.5 to the latest stable 9.6.6 release (rebasing the ghc package from the ghc9.6 package). Along with this, Haskell packages in Stackage (the stable Haskell source package distribution) have been updated from the versions in LTS 21 to latest LTS 22 release. Haskell packages not in Stackage have been updated to the latest appropriate version in the upstream Hackage package repository.

For full information about this release, see the upstream release notes and migration guide.

GNU Toolchain update

The GNU toolchain in Fedora 41 has been updated to:

  • GNU C Compiler (gcc) 14.1+

  • GNU Binary Utilities (binutils) 2.42+

  • GNU C Library (glibc) 2.40

  • GNU Debugger (gdb) 14+

Also see the upstream release notes for GCC, Binutils, GLibC NEWS, and GDB NEWS.

LLVM 19

LLVM sub-projects in Fedora have been updated to version 19.

Compatibility packages clang18, llvm18, lld18, compiler-rt18, and libomp18 have been added to ensure that packages that currently depend on clang and llvm version 18 libraries will continue to work. Previous compatibility packages present in Fedora 40, such as llvm17, clang17, etc. have been retired.

See the LLVM 19 Release Notes for additional information about this release.