{"id":34794,"date":"2021-10-06T17:02:32","date_gmt":"2021-10-06T17:02:32","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=34794"},"modified":"2021-10-06T17:02:32","modified_gmt":"2021-10-06T17:02:32","slug":"python-3-10-officially-released","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/10\/python-3-10-officially-released\/","title":{"rendered":"Python 3.10 Officially Released with New Syntax \/ Typing Features [PPA]"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon-250x250.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-34796\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python-feature-icon.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>After several alpha, beta and rc tests, the Python programming language finally released version 3.10 today!<\/p>\n<p>Python 3.10 will receive bug-fix updates in next 18 months. After that, it&#8217;s supported with 5-year security updates until October 2026.<\/p>\n<h3>What&#8217;s New in Python 3.10:<\/h3>\n<ul>\n<li>Pattern matching syntax, inspired by similar syntax found in Scala, Erlang, and other languages.<\/li>\n<li>Support using enclosing parentheses for continuation across multiple lines in context managers<\/li>\n<li>Allow writing union types as X | Y<\/li>\n<li>Add optional length-checking to zip<\/li>\n<li>Precise line numbers for debugging and other tools<\/li>\n<li>Require OpenSSL 1.1.1 or newer<\/li>\n<li>Remove Py_UNICODE encoder APIs<\/li>\n<li>Add optional EncodingWarning<\/li>\n<li>Explicit Type Aliases<\/li>\n<li>Parameter Specification Variables<\/li>\n<\/ul>\n<p>See the <a href=\"https:\/\/docs.python.org\/3.10\/whatsnew\/3.10.html\" rel=\"noopener\" target=\"_blank\">release note<\/a> for more about Python 3.10.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python310-final.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python310-final.png\" alt=\"\" width=\"600\" height=\"260\" class=\"aligncenter size-full wp-image-34798\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python310-final.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/python310-final-300x130.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>How to Install Python 3.10 in Ubuntu:<\/h3>\n<p>The well trusted <a href=\"https:\/\/launchpad.net\/~deadsnakes\/+archive\/ubuntu\/ppa\">\u201cdeadsnakes\u201d team PPA<\/a> has made the packages for Ubuntu 20.04, Ubuntu 18.04, and derivatives, e.g., Linux Mint 20, Elementary OS 6 and Zorin OS 16.<\/p>\n<p>1.) Firstly, open terminal by either searching from overview screen or pressing Ctrl+Alt+T on keyboard. When it opens, run command to add the PPA:<\/p>\n<pre>sudo add-apt-repository ppa:deadsnakes\/ppa<\/pre>\n<p>2.) Then refresh system cache and install the language via command:<\/p>\n<pre>sudo apt update && sudo apt install python3.10<\/pre>\n<h3>Use Python 3.10 as default Python3:<\/h3>\n<p>It&#8217;s possible to make Python3 in Ubuntu to be Python3.10 via following commands. However, it causes issues, such as Gnome Terminal refuses to launch. Do it at your own risk!<\/p>\n<ul>\n<li>Check current Python3 version:\n<pre>python3 --version<\/pre>\n<\/li>\n<li>Use update-alternatives to create symbolic links to python3 (replace python3.8 in Ubuntu 16.04 with ):\n<pre>sudo update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.8 1<\/pre>\n<pre>sudo update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.10 2<\/pre>\n<\/li>\n<li>And choose which one to use as Python3 via command:\n<pre>sudo update-alternatives --config python3<\/pre>\n<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>After several alpha, beta and rc tests, the Python programming language finally released version 3.10 today! Python 3.10 will receive bug-fix updates in next 18 months. After that, it&#8217;s supported with 5-year security updates until October 2026. What&#8217;s New in Python 3.10: Pattern matching syntax, inspired by similar syntax found in Scala, Erlang, and other [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34796,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2045],"class_list":["post-34794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-python"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=34794"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34794\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34796"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=34794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=34794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=34794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}