Create an account


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

#1
Python 3.8 alpha in Fedora

<div style="margin: 5px 5% 10px 5%;"><img src="http://www.sickgaming.net/blog/wp-content/uploads/2019/02/python-3-8-alpha-in-fedora.png" width="72" height="72" title="" alt="" /></div><div><p>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.</p>
<h2>Install Python 3.8 on Fedora</h2>
<p>If you have Fedora 29 or newer, you can install Python 3.8 from the official software repository with <em>dnf</em>:</p>
<pre class="wp-block-preformatted">$ sudo dnf install python38</pre>
<p>As more alphas, betas and release candidates of <a href="https://www.python.org/dev/peps/pep-0569/">Python 3.8 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.</p>
<h2>Test your projects with Python 3.8</h2>
<p>Run the <em>python3.8</em> command to use Python 3.8 or create virtual environments with the <a href="https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html">builtin </a><em><a href="https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html">venv</a></em><a href="https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html"> module,&nbsp;<em>tox</em></a> or with <a href="https://fedoramagazine.org/install-pipenv-fedora/"><em>pipenv</em></a>. For example:</p>
<pre class="wp-block-preformatted">$ git clone https://github.com/benjaminp/six.git<br />Cloning into 'six'...<br />$ cd six/<br />$ <strong>tox -e py38</strong><br />py38 runtests: commands[0] | python -m pytest -rfsxX<br />================== test session starts ===================<br />platform linux -- <strong>Python 3.8.0a1</strong>, pytest-4.2.1, py-1.7.0, pluggy-0.8.1<br />collected 195 items <br /><br />test_six.py ...................................... [ 19%]<br />.................................................. [ 45%]<br />.................................................. [ 70%]<br />..............................................s... [ 96%]<br />....... [100%]<br />========= 194 passed, 1 skipped in 0.25 seconds ==========<br />________________________ summary _________________________<br /> py38: commands succeeded<br /> congratulations <img src="http://www.sickgaming.net/blog/wp-content/uploads/2019/02/python-3-8-alpha-in-fedora.png" alt="?" class="wp-smiley" style="height: 1em;max-height: 1em" /> </pre>
<h2>What’s new in Python 3.8</h2>
<p>So far, only the first alpha was released, so <a href="https://docs.python.org/3.8/whatsnew/3.8.html">more features will come</a>. You can however already try out the <a href="https://www.python.org/dev/peps/pep-0572/">new walrus operator</a>:</p>
<pre class="wp-block-preformatted">$ <strong>python3.8</strong><br />Python 3.8.0a1 (default, Feb 7 2019, 08:07:33) <br />[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux<br />Type "help", "copyright", "credits" or "license" for more information.<br />&gt;&gt;&gt; while not (<strong>answer := input</strong>('Say something: ')):<br />... print("I don't like empty answers, try again...")<br />... <br />Say something: <br />I don't like empty answers, try again...<br />Say something: Fedora<br />&gt;&gt;&gt;</pre>
<p>And stay tuned for <a href="https://fedoraproject.org/wiki/Changes/Python3.8">Python 3.8 as <em>python3</em> in Fedora 31</a>!</p>
</div>
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Fedora - Contribute to Fedora 39 Upgrade, Virtualization, and Cloud Test Day xSicKxBot 0 2,076 09-30-2023, 03:56 AM
Last Post: xSicKxBot
  Fedora - Share your game achievements with Gamerzilla xSicKxBot 0 1,029 09-27-2023, 09:59 AM
Last Post: xSicKxBot
  Fedora - Using Cockpit to graphically manage systems, without installing Cockpit on xSicKxBot 0 915 09-26-2023, 06:41 AM
Last Post: xSicKxBot
  Fedora - Announcing Fedora Linux 39 Beta xSicKxBot 0 937 09-20-2023, 09:48 AM
Last Post: xSicKxBot
  Fedora - Contribute at Passkey Auth, Fedora CoreOS and IoT Test Week xSicKxBot 0 914 09-19-2023, 12:23 PM
Last Post: xSicKxBot
  Fedora - Quick Fedora shirt update and sale of last stock with the old logo xSicKxBot 0 974 09-16-2023, 12:28 PM
Last Post: xSicKxBot
  Fedora - Contribute at the Fedora Linux Test Week for Kernel 6.5 and Toolbx Test Day xSicKxBot 0 982 09-11-2023, 02:47 PM
Last Post: xSicKxBot
  Fedora - Fedora Linux Flatpak cool apps to try for September xSicKxBot 0 954 09-10-2023, 04:59 PM
Last Post: xSicKxBot
  Fedora - Contribute at the Test Week for the Anaconda WebUI Installer for Fedora Wor xSicKxBot 0 955 09-09-2023, 11:54 PM
Last Post: xSicKxBot
  Fedora - Docs workshop: Virtually writing together xSicKxBot 0 998 09-09-2023, 05:08 AM
Last Post: xSicKxBot

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016