Python
Actualizado el paquete Python a la última versión
El paquete python3 se ha actualizado a la última versión, la 3.9, en Fedora 33. Anteriormente en Fedora 32 python3 se soportaba en su versión 3.8 lo que se actualiza ahora.
Esta última actualización de Python 3.9 proporcionará muchas mejoras. Algunas de las principales son:
-
Añade los operadores de unión unir (
|) y actualizar (|=) para la clasedict. -
Escribe sugerencias de genéricos en colecciones estándar.
-
Admite funciones más flexibles y anotaciones variables.
-
Proporciona restricciones gramaticales relajantes al permitir que los decoradores sean cualquier expresión válida.
-
Support for the IANA time zone database in the
zoneinfomodule. -
removeprefixandremovesuffixstring methods will remove prefixes and suffixes from a string. -
CPython now uses a new parser based on parsing expression grammar (PEG).
Notas en migrar paquetes pip de usuario-instalado
When you upgrade Fedora from versions 32 to Fedora 33, the main Python interpreter version changes from 3.8 to 3.9. If you have any Python packages installed using pip, you must complete the following procedure to migrate them to the new version:
-
Install previous version of
python3package:sudo dnf install python3.8
-
Get
pipfor the previous Python version:python3.8 -m ensurepip --user
-
Observe los paquetes instalados:
python3.8 -m pip list
-
Guarde el listado con versiones específicas:
python3.8 -m pip freeze > installed.txt
-
Install the same packages for the now default version:
python3 -m pip install --user -r installed.txt
-
Uninstall user-installed packages for Python 3.8; this ensures proper removal of files in
~/.local/bin:python3.8 -m pip uninstall $(python3.8 -m pip list --user | cut -d" " -f1)
-
Opcionalmente, vacíe la estructura del directorio vacío ahora:
rm -rf ~/.local/lib/python3.8/
-
Opcionalmente, quite la versión de Python no necesaria:
sudo dnf remove python3.8
Additionally, if you have any pip packages installed using sudo, run the following commands before running the final step above which removes `python3.8`, or install it again temporarily:
-
Get
pipfor the previous Python version forrootuser:sudo python3.8 -m ensurepip
-
Observe los paquetes instalados del sistema:
sudo python3.8 -m pip list
-
Uninstall installed packages for 3.8; this ensures proper removal of files in
/usr/local/bin:sudo python3.8 -m pip uninstall $(python3.8 -m pip list | cut -d" " -f1)
-
Opcionalmente, vacía ahora la estructura del directorio vacío:
sudo rm -rf /usr/local/lib*/python3.8/
|
If you followed the first procedure, the packages are already installed for your user account, which is the preferred option. Avoid using |
Retire Python 3.4 and Python 2.6
The python34 and python26 packages are retired without replacement from Fedora 33. The packages will no longer be available from the repositories, but it may remain on existing installations. Both packages have been kept in Fedora for legacy reasons, and their continued maintenance has been proving more and more difficult while providing a decreasing benefit to the distribution, which is why they are now gone.
Want to help? Learn how to contribute to Fedora Docs ›