파이썬(Python)

개선된 파이썬 성능

Depending on the workload, up to 27% improved performance is now observed in Python-based software. The improved performance is accomplished by building the Python interpreter with -fno-semantic-interposition. Because there is no semantic interposition now, the internal symbol look-ups from libpython to libpython library are direct and faster.

As a consequence, if Fedora users need to use LD_PRELOAD to override symbols in libpython, the recommended way is to build a custom Python build without -fno-semantic-interposition. However, it is still possible to use LD_PRELOAD to override symbols in other libraries (for example in glibc).

파이썬 2가 제거되었습니다

파이썬 업스트림은 2020년 1월 1일에서 파이썬 2 지원이 멈췄습니다. 이런 이유로, 페도라 32는 파이썬 2 꾸러미를 제거합니다.

다음 꾸러미는 더 이상 사용 할 수 없습니다:

  • 파이썬 2 꾸러미와 모든 이 하위 꾸러미.

  • 파이썬 2를 실행하는데 필요한 모든 꾸러미.

  • 파이썬 2를 빌드하는데 필요한 모든 꾸러미.

Fedora 32 still provides a legacy python27 package. This package is intended for developers who need to support Python 2 and for users who need to use software that depends on Python 2.

The python27 package has several limitations compared to the original python2 package:

  • The package has no subpackages. All content is stored in the single package.

  • The package provides no debug build, which was previously available as python2-debug.

  • The package does not provide the /usr/bin/python binary.

  • Any special backwards compatible Provides are removed (this package is not intended to be depended upon).

Deprecated support for Nose

Support for Nose is now deprecated. However for now, the python3-nose package continues to be available in the Fedora repositories. No specific release it yet targeted to remove the python3-nose package.

Users and packagers of dependent packages are encouraged to switch to python3-pytest or python3-nose2.

Notes on migrating user-installed pip packages

When you upgrade from Fedora 30 or 31 to Fedora 32, the main Python interpreter version changes from 3.7 to 3.8. 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.7
  2. Get pip for the previously main Python version:

    python3.7 -m ensurepip --user
  3. 설치된 꾸러미를 관찰합니다:

    python3.7 -m pip list
  4. 특정 버전으로 목록을 저장합니다:

    python3.7 -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.7; this ensures proper removal of files in ~/.local/bin:

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

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

    sudo dnf remove python3.7

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

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

    sudo python3.7 -m ensurepip
  2. 시스템-설치된 꾸러미를 관찰합니다:

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

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

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

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.