From 5789d0b216fd6eb2597c9a83294ed97ae1e0b261 Mon Sep 17 00:00:00 2001 From: KhushbuB Date: Oct 26 2020 20:08:35 +0000 Subject: [PATCH 1/3] Fixes Issue #424 --- diff --git a/modules/release-notes/pages/update-python.adoc b/modules/release-notes/pages/update-python.adoc new file mode 100644 index 0000000..a0d5aae --- /dev/null +++ b/modules/release-notes/pages/update-python.adoc @@ -0,0 +1,15 @@ += Update + +== Updated Python package to latest version + +The `python` package is now updated to latest version 3.9 in Fedora 33. Previously, Fedora 32 supported `python` version 3.8 which is now updated. + +This latest update of Python 3.9 will provide many enhancements. Some of the major highlights are: + +* Added merge (|) and update (|=) Union Operators To `dict` class. +* Type Hinting Generics In Standard Collections. +* Supports more flexible function and variable annotations. +* Provides relaxing grammar restrictions by allowing decorators to be any valid expression. +* Support for the IANA Time Zone Database in the `zoneinfo` module. +* `removeprefix` and `removesuffix` string methods will remove prefixes and suffixes from a string. +* CPython now uses a new parser based on parsing expression grammar[PEG]. From 4266a4740c4f411a30d9e51c46a2c7e28faa5362 Mon Sep 17 00:00:00 2001 From: KhushbuB Date: Oct 26 2020 20:08:35 +0000 Subject: [PATCH 2/3] Adding SME Reviews --- diff --git a/modules/release-notes/pages/update-python.adoc b/modules/release-notes/pages/update-python.adoc index a0d5aae..58c11fd 100644 --- a/modules/release-notes/pages/update-python.adoc +++ b/modules/release-notes/pages/update-python.adoc @@ -2,14 +2,98 @@ == Updated Python package to latest version -The `python` package is now updated to latest version 3.9 in Fedora 33. Previously, Fedora 32 supported `python` version 3.8 which is now updated. +The `python3` package is now updated to latest version 3.9 in Fedora 33. Previously, In Fedora 32 `python3` package version 3.8 was supported which is now updated. This latest update of Python 3.9 will provide many enhancements. Some of the major highlights are: -* Added merge (|) and update (|=) Union Operators To `dict` class. -* Type Hinting Generics In Standard Collections. +* Added merge (`|`) and update (`|=`) union operators to `dict` class. +* Type hinting generics in standard collections. * Supports more flexible function and variable annotations. * Provides relaxing grammar restrictions by allowing decorators to be any valid expression. -* Support for the IANA Time Zone Database in the `zoneinfo` module. +* Support for the IANA time zone database in the `zoneinfo` module. * `removeprefix` and `removesuffix` string methods will remove prefixes and suffixes from a string. -* CPython now uses a new parser based on parsing expression grammar[PEG]. +* CPython now uses a new parser based on parsing expression grammar (PEG). + +== Notes on migrating user-installed pip packages + +When you upgrade Fedora from previous versions to Fedora 32 or 33, 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: + +. Install the Python version with Python interpreter version 3.7: ++ +---- +sudo dnf install python3.7 +---- + +. Get `pip` for the previously main Python version: ++ +---- +python3.7 -m ensurepip --user +---- + +. Observe the installed packages: ++ +---- +python3.7 -m pip list +---- + +. Save the list with specific versions: ++ +---- +python3.7 -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 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) +---- + +. Optionally, clean up the now empty directory structure: ++ +---- +rm -rf ~/.local/lib/python3.7/ +---- + +. 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: + +. Get `pip` for the previously main Python version for `root`: ++ +---- +sudo python3.7 -m ensurepip +---- + +. Observe the system-installed packages: ++ +---- +sudo python3.7 -m pip list +---- + +. 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) +---- + +. Optionally, clean up now empty directory structure: ++ +---- +sudo rm -rf /usr/local/lib*/python3.7/ +---- + +[IMPORTANT] +==== +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. +==== From 785ba63efd1069b7596ed7c25ae8c01bb215ece8 Mon Sep 17 00:00:00 2001 From: KhushbuB Date: Oct 26 2020 20:08:35 +0000 Subject: [PATCH 3/3] addressing interpreter changes --- diff --git a/modules/release-notes/pages/update-python.adoc b/modules/release-notes/pages/update-python.adoc index 58c11fd..8b77298 100644 --- a/modules/release-notes/pages/update-python.adoc +++ b/modules/release-notes/pages/update-python.adoc @@ -16,81 +16,81 @@ This latest update of Python 3.9 will provide many enhancements. Some of the maj == Notes on migrating user-installed pip packages -When you upgrade Fedora from previous versions to Fedora 32 or 33, the main Python interpreter version changes from 3.7 to 3.8. +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 the Python version with Python interpreter version 3.7: +. Install previous version of `python3` package: + ---- -sudo dnf install python3.7 +sudo dnf install python3.8 ---- -. Get `pip` for the previously main Python version: +. Get `pip` for the previous Python version: + ---- -python3.7 -m ensurepip --user +python3.8 -m ensurepip --user ---- . Observe the installed packages: + ---- -python3.7 -m pip list +python3.8 -m pip list ---- . Save the list with specific versions: + ---- -python3.7 -m pip freeze > installed.txt +python3.8 -m pip freeze > installed.txt ---- -. Install the same packages for the now default version: +. Install the same packages for the *now* default version: + ---- python3 -m pip install --user -r installed.txt ---- -. Uninstall user-installed packages for 3.7; this ensures proper removal of files in `~/.local/bin`: +. Uninstall user-installed packages for Python 3.8; this ensures proper removal of files in `~/.local/bin`: + ---- -python3.7 -m pip uninstall $(python3.7 -m pip list --user | cut -d" " -f1) +python3.8 -m pip uninstall $(python3.8 -m pip list --user | cut -d" " -f1) ---- . Optionally, clean up the now empty directory structure: + ---- -rm -rf ~/.local/lib/python3.7/ +rm -rf ~/.local/lib/python3.8/ ---- . Optionally, remove the unneeded Python version: + ---- -sudo dnf remove python3.7 +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.7`_, or install it again temporarily: +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 `pip` for the previously main Python version for `root`: +. Get `pip` for the previous Python version for `root` user: + ---- -sudo python3.7 -m ensurepip +sudo python3.8 -m ensurepip ---- . Observe the system-installed packages: + ---- -sudo python3.7 -m pip list +sudo python3.8 -m pip list ---- -. Uninstall installed packages for 3.7; this ensures proper removal of files in `/usr/local/bin`: +. Uninstall installed packages for 3.8; this ensures proper removal of files in `/usr/local/bin`: + ---- -sudo python3.7 -m pip uninstall $(python3.7 -m pip list | cut -d" " -f1) +sudo python3.8 -m pip uninstall $(python3.8 -m pip list | cut -d" " -f1) ---- . Optionally, clean up now empty directory structure: + ---- -sudo rm -rf /usr/local/lib*/python3.7/ +sudo rm -rf /usr/local/lib*/python3.8/ ---- [IMPORTANT]