Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Python 3.9 alpha in Fedora

#1
Python 3.9 alpha in Fedora

<div><p>The Python developers have already released five alpha versions of Python 3.9.0 and you can already try the latest one in Fedora! Test your Python code with 3.9 early to avoid surprises once the final 3.9.0 is out in October.</p>
<h2>Install Python 3.9 on Fedora</h2>
<p>If you run Fedora, you can install Python 3.9 from the official software repository with <em>dnf</em>:</p>
<pre class="wp-block-preformatted">$ sudo dnf install python3.9</pre>
<p>In order to get the very latest pre-release, you might need to enable the&nbsp;<em>updates-testing</em>&nbsp;repository:</p>
<pre class="wp-block-preformatted">$ sudo dnf install --enablerepo=updates-testing python3.9
</pre>
<p>As more alphas, betas and release candidates of <a rel="noreferrer noopener" href="https://www.python.org/dev/peps/pep-0596/" target="_blank">Python 3.9 will be released</a>, 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 planned for mid May.</p>
<h2>Test your projects with Python 3.9</h2>
<p>Run the&nbsp;<em>python3.9</em>&nbsp;command to use Python 3.9 or create virtual environments with the&nbsp;<a href="https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html" target="_blank" rel="noreferrer noopener">builtin&nbsp;<em>venv</em>&nbsp;module, tox</a>&nbsp;or with&nbsp;<a href="https://fedoramagazine.org/install-pipenv-fedora/" target="_blank" rel="noreferrer noopener">pipenv</a>&nbsp;and&nbsp;<a href="https://python-poetry.org/" target="_blank" rel="noreferrer noopener">poetry</a>. For example:</p>
<pre class="wp-block-preformatted">$ git clone https://github.com/benjaminp/six.git
Cloning into 'six'...
$ cd six/
$ tox -e py39
py39 run-test: commands[0] | python -m pytest -rfsxX
================== test session starts ===================
platform linux -- Python 3.9.0a5, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
collected 200 items test_six.py ...................................... [ 19%]
.................................................. [ 44%]
.................................................. [ 69%]
.................................................. [ 94%]
............ [100%] ================== 200 passed in 0.43s ===================
________________________ summary _________________________ py39: commands succeeded congratulations Smile</pre>
<h2>What’s new in Python 3.9</h2>
<p>So far, the first five alphas were released,&nbsp;<a href="https://docs.python.org/3.9/whatsnew/3.9.html" target="_blank" rel="noreferrer noopener">more features will come</a>&nbsp;until the first beta. You can however already try out the new&nbsp;<a href="https://www.python.org/dev/peps/pep-0584/" target="_blank" rel="noreferrer noopener">dictionary merge &amp; update operators</a>:</p>
<pre class="wp-block-preformatted">$ python3.9
Python 3.9.0a5 (default, Mar 24 2020, 00:00:00) [GCC 10.0.1 20200311 (Red Hat 10.0.1-0.9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; d = {'spam': 1, 'eggs': 2, 'cheese': 3}
&gt;&gt;&gt; e = {'cheese': 'cheddar', 'aardvark': 'Ethel'}
&gt;&gt;&gt; d | e
{'spam': 1, 'eggs': 2, 'cheese': 'cheddar', 'aardvark': 'Ethel'}
&gt;&gt;&gt; e | d
{'cheese': 3, 'aardvark': 'Ethel', 'spam': 1, 'eggs': 2}
&gt;&gt;&gt; d |= e
&gt;&gt;&gt; d
{'spam': 1, 'eggs': 2, 'cheese': 'cheddar', 'aardvark': 'Ethel'}
</pre>
<p>And stay tuned for&nbsp;<a href="https://fedoraproject.org/wiki/Changes/Python3.9" target="_blank" rel="noreferrer noopener">Python 3.9 as&nbsp;<em>python3</em>&nbsp;in Fedora 33</a>!</p>
</div>


https://www.sickgaming.net/blog/2020/04/...in-fedora/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016