02-14-2019, 06:57 PM
Python 3.8 alpha in Fedora
![[Image: python-3-8-alpha-in-fedora.png]](http://www.sickgaming.net/blog/wp-content/uploads/2019/02/python-3-8-alpha-in-fedora.png)
The Python developers have released the first alpha of Python 3.8.0 and you can already try it out in Fedora! Test your Python code with 3.8 early to avoid surprises once the final 3.8.0 is out in October.
Install Python 3.8 on Fedora
If you have Fedora 29 or newer, you can install Python 3.8 from the official software repository with dnf:
As more alphas, betas and release candidates of Python 3.8 will be released, the Fedora package will receive updates. No need to compile your own development version of Python, just install it and have it up to date. New features will be added until the first beta.
Test your projects with Python 3.8
Run the python3.8 command to use Python 3.8 or create virtual environments with the builtinvenvmodule, tox or with pipenv. For example:
What’s new in Python 3.8
So far, only the first alpha was released, so more features will come. You can however already try out the new walrus operator:
And stay tuned for Python 3.8 as python3 in Fedora 31!
![[Image: python-3-8-alpha-in-fedora.png]](http://www.sickgaming.net/blog/wp-content/uploads/2019/02/python-3-8-alpha-in-fedora.png)
The Python developers have released the first alpha of Python 3.8.0 and you can already try it out in Fedora! Test your Python code with 3.8 early to avoid surprises once the final 3.8.0 is out in October.
Install Python 3.8 on Fedora
If you have Fedora 29 or newer, you can install Python 3.8 from the official software repository with dnf:
Code:
$ sudo dnf install python38As more alphas, betas and release candidates of Python 3.8 will be released, the Fedora package will receive updates. No need to compile your own development version of Python, just install it and have it up to date. New features will be added until the first beta.
Test your projects with Python 3.8
Run the python3.8 command to use Python 3.8 or create virtual environments with the builtinvenvmodule, tox or with pipenv. For example:
Code:
$ git clone https://github.com/benjaminp/six.gitCloning into 'six'...$ cd six/$ tox -e py38py38 runtests: commands[0] | python -m pytest -rfsxX================== test session starts ===================platform linux -- Python 3.8.0a1, pytest-4.2.1, py-1.7.0, pluggy-0.8.1collected 195 items test_six.py ...................................... [ 19%].................................................. [ 45%].................................................. [ 70%]..............................................s... [ 96%]....... [100%]========= 194 passed, 1 skipped in 0.25 seconds ==========________________________ summary _________________________ py38: commands succeeded congratulationsSo far, only the first alpha was released, so more features will come. You can however already try out the new walrus operator:
Code:
$ python3.8Python 3.8.0a1 (default, Feb 7 2019, 08:07:33) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> while not (answer := input('Say something: ')):... print("I don't like empty answers, try again...")... Say something: I don't like empty answers, try again...Say something: Fedora>>>And stay tuned for Python 3.8 as python3 in Fedora 31!

