{"id":8928,"date":"2022-05-05T13:49:06","date_gmt":"2022-05-05T21:49:06","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=8928"},"modified":"2022-05-05T13:49:06","modified_gmt":"2022-05-05T21:49:06","slug":"python-in-visual-studio-code-may-2022-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-may-2022-release\/","title":{"rendered":"Python in Visual Studio Code \u2013 May 2022 Release"},"content":{"rendered":"<p>We\u2019re excited to announce that the May 2022 release of the <strong>Python<\/strong> and <strong>Jupyter<\/strong> Extensions for Visual Studio Code are now available!<\/p>\n<p>With this release we\u2019re introducing three new extensions: <strong>Black<\/strong>, <strong>isort<\/strong>, and <strong>Jupyter Powertoys<\/strong>.<\/p>\n<p>If you\u2019re interested, you can check the full list of improvements in our changelogs for the <a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/blob\/master\/CHANGELOG.md\">Python<\/a>, <a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter\/blob\/main\/CHANGELOG.md\">Jupyter<\/a> and <a href=\"https:\/\/github.com\/microsoft\/pylance-release\/blob\/main\/CHANGELOG.md\">Pylance<\/a> extensions.<\/p>\n<h3>Black extension<\/h3>\n<p>As <a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-april-2022-release\/\">mentioned before<\/a>, our team is working towards breaking the tools support we offer in the Python extension into separate extensions, with the intent of improving performance and stability.<\/p>\n<p>We now have a <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.black-formatter\">new extension<\/a> for <a href=\"https:\/\/pypi.org\/project\/black\/\">Black<\/a>, the Python formatter. Similar to the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.pylint\">pylint extension<\/a>, this new extension uses the <a href=\"https:\/\/microsoft.github.io\/language-server-protocol\">Language Server Protocol<\/a> to provide formatting support, and it ships with the latest version of Black \u2013 so you&#8217;re no longer required to have it installed in a Python environment.<\/p>\n<p>You can try this new extension out today by\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.black-formatter\">installing it from the marketplace<\/a>. Then open a Python file, right-click on the editor and select \u201cFormat document with\u2026\u201d. You can also run the \u201cFormat document with\u2026\u201d command from the Command Palette (Ctrl\u00a0+\u00a0Shift\u00a0+\u00a0P \u00a0or\u00a0\u2318\u00a0+\u00a0\u21e7\u00a0+\u00a0P). If you have any issues or feature requests, you can file them at the\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\">extension\u2019s GitHub repository<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/05\/vscode-black-formatter.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8935\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/05\/vscode-black-formatter.gif\" alt=\"Formatting a Python file with Black formatter by right clicking on the editor and selecting &quot;Format document with...&quot;\" width=\"1827\" height=\"1174\" \/><\/a><\/p>\n<h3>isort extension<\/h3>\n<p>We also have a <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.isort\">new extension for sorting imports<\/a> with <a href=\"https:\/\/pypi.org\/project\/isort\/\">isort<\/a>. When you open a file and your imports don\u2019t follow isort\u2019s standards, it will display an error diagnostic and provide a code action to fix the import order.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/05\/vscode-isort.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8934\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/05\/vscode-isort.gif\" alt=\"Sorting imports from isort error message in VS Code Problem's window \" width=\"967\" height=\"618\" \/><\/a><\/p>\n<h3>Jupyter Notebooks on the browser<\/h3>\n<p>The\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/itemdetails?itemName=ms-toolsai.jupyter\">Jupyter extension<\/a>\u00a0can now be installed as a web extension for use with\u00a0<a href=\"https:\/\/vscode.dev\/\">vscode.dev<\/a>. Functionality is currently limited with support only for notebooks (.ipynb\u00a0files) being run on Jupyter servers that do not require https.<\/p>\n<p>If you&#8217;d like to experiment with the functionality, launch Jupyter from your local machine with:<\/p>\n<pre>jupyter --no-browser --NotebookApp.allow_origin_pat=https:\/\/.*\\.vscode-cdn\\.net<\/pre>\n<p>And connect to it using the command\u00a0<strong>Jupyter: Specify Jupyter server for connections<\/strong>.<\/p>\n<p>There are a number of features the team will be enabling in coming releases, including:<\/p>\n<ul>\n<li>&#8216;https&#8217; based servers<\/li>\n<li>IntelliSense<\/li>\n<li>Data viewing<\/li>\n<li>Variable viewing<\/li>\n<li>Interactive window<\/li>\n<li>IPyWidgets<\/li>\n<li>Plot viewing<\/li>\n<li>Exporting<\/li>\n<\/ul>\n<h3>Jupyter Powertoys extension<\/h3>\n<p>The Jupyter team is excited to announce the\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-toolsai.vscode-jupyter-powertoys\">Jupyter Powertoys<\/a>\u00a0extension that provides experimental functionality for working with Jupyter notebooks. In its first release, the follow features have been prototyped:<\/p>\n<ul>\n<li>Kernel management panel<\/li>\n<li>Contextual help<\/li>\n<li>Execution grouping<\/li>\n<\/ul>\n<p>We&#8217;d love for you to take these for a spin and let the team know what you think so that they can become a supported feature someday!<\/p>\n<p>For more information, refer to the README in the\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter-powertoys\">vscode-jupyter-powertoys<\/a>\u00a0repository.<\/p>\n<h3>Jupyter kernel improvements<\/h3>\n<p>A number of updates were made to kernel handling:<\/p>\n<ul>\n<li>To make it more obvious when a kernel has crashed, the extension now displays this information in cell output.<\/li>\n<li>There is now troubleshooting guidance in cell output when certain known errors are detected during execution.<\/li>\n<li>Solving kernel execution problems can be a tricky and time-consuming process. So, we&#8217;ve put together a\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter\/wiki\">troubleshooting section<\/a>\u00a0on our wiki that we hope can help guide you to a solution quicker. Of course, our\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter\/discussions\">GitHub Discussions forum<\/a>\u00a0can be a great resource for obtaining help as well.<\/li>\n<\/ul>\n<h3>Other Changes and Enhancements<\/h3>\n<p>We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python and Jupyter Notebooks in Visual Studio Code. Some notable changes include:<\/p>\n<ul>\n<li>Changing language servers no longer requires a window reload (<a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/18884\">vscode-python#18884<\/a>)<\/li>\n<li>Fix support for selecting shell-like interpreter paths which may not exist on filesystem (<a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/18920\">vscode-python#18920<\/a>)<\/li>\n<li>Renaming a method with Pylance will rename all overridden methods as well. (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/issues\/813\">pylance-release#813<\/a>)<\/li>\n<\/ul>\n<p>We would also like to extend special thanks to this month\u2019s contributors:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/quanzhuo\">Quan Zhuo<\/a>: Fix download failure for prebuilt ripgrep binary when build from source (<a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/19036\">https:\/\/github.com\/microsoft\/vscode-python\/issues\/19036<\/a><a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/19036\">vscode-python#19036<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Dr-Irv\">Dr-Irv<\/a>: Improved IntelliSense when using pandas thanks to several pandas stub fixes (<a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/186\">python-type-stubs#186<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/187\">python-type-stubs#187<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/188\">python-type-stubs#188<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/190\">python-type-stubs#190<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/sunyinqi0508\">sunyinqi0508<\/a>: Fix for errors when file paths contain special characters (<a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/18829\">vscode-python#18829<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/caphosra\">Caphosra<\/a>: Replace `Buffer` constructors with safer methods to reduce security concerns. (<a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter\/issues\/9562\">vscode-jupyter#9562<\/a>)<\/li>\n<\/ul>\n<p>Try out these new improvements by\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">downloading the Python extension<\/a>\u00a0and the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-toolsai.jupyter\">Jupyter extension<\/a> from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl\u00a0+\u00a0Shift\u00a0+\u00a0X\u00a0or\u00a0\u2318\u00a0+\u00a0\u21e7\u00a0+\u00a0X). You can learn more about\u00a0<a href=\"https:\/\/code.visualstudio.com\/docs\/python\/python-tutorial\">Python support in Visual Studio Code<\/a>\u00a0in the documentation. If you run into any problems or have suggestions,\u00a0<a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/new\/choose\">please file an issue<\/a>\u00a0on the\u00a0<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\">Python VS Code GitHub<\/a>\u00a0page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re excited to announce that the May 2022 release of the Python and Jupyter Extensions for Visual Studio Code are now available! With this release we\u2019re introducing three new extensions: Black, isort, and Jupyter Powertoys. If you\u2019re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance [&hellip;]<\/p>\n","protected":false},"author":997,"featured_media":8935,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4,1,6],"tags":[],"class_list":["post-8928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jupyter","category-python","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>We\u2019re excited to announce that the May 2022 release of the Python and Jupyter Extensions for Visual Studio Code are now available! With this release we\u2019re introducing three new extensions: Black, isort, and Jupyter Powertoys. If you\u2019re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/8928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/users\/997"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=8928"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/8928\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/8935"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=8928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=8928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=8928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}