{"id":9205,"date":"2022-11-03T08:33:40","date_gmt":"2022-11-03T16:33:40","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=9205"},"modified":"2022-11-03T08:37:16","modified_gmt":"2022-11-03T16:37:16","slug":"python-in-visual-studio-code-november-2022-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-november-2022-release\/","title":{"rendered":"Python in Visual Studio Code &#8211; November 2022 Release"},"content":{"rendered":"<p>We\u2019re excited to announce that the November 2022 release of the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">Python<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-toolsai.jupyter\">Jupyter<\/a> extensions for Visual Studio Code are now available!<\/p>\n<p>This release includes the following announcements:<\/p>\n<ul>\n<li>Migration to isort extension<\/li>\n<li>Auto imports turned off by default with Pylance<\/li>\n<li>Pylint and flake8 extensions recommendation<\/li>\n<li>&#8220;Just My Code&#8221; for notebook cell debugging<\/li>\n<\/ul>\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\/releases\">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<p>&nbsp;<\/p>\n<h2>Migration to isort extension<\/h2>\n<p>In our May 2022 <a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-may-2022-release\/\">release<\/a>, we announced a new <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.isort\">isort<\/a> extension that works alongside the Python extension to sort imports. For example, when you open a file and the imports do not follow isort&#8217;s standards, it will display an error diagnostic and provide a code action to fix the import order. In this release, we are migrating users off of the built-in isort support by automatically installing the isort extension. This will make updates smaller and faster for users as we will only have to update the isort extension as needed, compared to shipping all isort-related files in the Python extension regardless of whether they changed.<\/p>\n<p>&nbsp;<\/p>\n<h2>Auto imports turned off by default with Pylance<\/h2>\n<p>Since auto imports were first implemented in Pylance, we\u2019ve been getting a lot of feedback about how confusing and, sometimes, annoying it could be to have an import automatically added to a file when, for example, suggestions are accepted by accident. Starting this release, packages will no longer be imported automatically by default when using Pylance. If you\u2019d like to re-enable auto imports for your Python projects, you can do so by adding the following setting to your settings.json file ( View &gt; Command Palette\u2026 and run \u201cPreferences: Open User Settings (JSON)): <code>\"python.analysis.autoImportCompletions\": true<\/code>, or by looking for <code>python.analysis.autoImportCompletions<\/code> in the settings UI (File &gt; Preferences &gt; Settings).<\/p>\n<p>&nbsp;<\/p>\n<h2>Pylint and flake8 extensions recommendation<\/h2>\n<p>In our <a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-april-2022-release\/#pylint-extension\">previous<\/a> <a href=\"https:\/\/devblogs.microsoft.com\/python\/pvsc-sept-2022\/#flake8-extension\">releases<\/a>, we announced new <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.pylint\">Pylint<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.flake8\">Flake8<\/a> extensions that work in tandem with the Python extension through the Language Server Protocol (LSP) to provide linting. In this release, we\u2019re starting to roll-out a notification that suggests those who are still using the pylint and flake8 features built into the Python extension to install these new extensions. Our long-term plan is to eventually remove the built-in support in favor of these separate extensions.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/11\/Nov2022-PylintPrompt.png\" alt=\"Use and install the Pylint extension prompt\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>&#8220;Just My Code&#8221; for notebook cell debugging<\/h2>\n<p>The &#8220;Just My Code&#8221; debug feature allows the user to determine whether the debugger will step through code from Python libraries, or will only step through user code. This has been enabled by default when debugging a notebook cell, and you can now set <code>\"jupyter.debugJustMyCode\": false<\/code> to disable it and allow stepping through library code. For the best experience, upgrade debugpy in your environment to &gt;1.6.3. Previously, this setting was only respected for debugging using the Interactive Window. Now, it is respected in notebook editors as well.<\/p>\n<p>&nbsp;<\/p>\n<h2>Other Changes and Enhancements<\/h2>\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>A new <code>python.analysis.packageIndexDepths<\/code> setting you can use to control Pylance&#8217;s indexing behavior. Check out <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/settings-reference#_python-language-server-settings\">Pylance&#8217;s settings documentation<\/a> to learn more (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/discussions\/2681\">pylance-release#2681<\/a>).<\/li>\n<li>You can now restart Jupyter notebook cell debug sessions. This feature is especially useful in a workflow where you debug, edit the cell, then restart the debug session to debug the cell again with your edits applied (<a href=\"https:\/\/github.com\/microsoft\/vscode-jupyter\/issues\/7670\">vscode-jupyter#7670<\/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\/jjmacklin\">@jjmacklin<\/a>: Feature\/trailing whitespace <a href=\"https:\/\/github.com\/microsoft\/vscode-pylint\/pull\/203\">(pylint#203)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/anu-ka\">@anu-ka<\/a>: Added quick fix for &#8220;tab after keyword&#8221; <a href=\"https:\/\/github.com\/microsoft\/vscode-flake8\/pull\/65\">(flake8#65)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Bobronium\">@Bobronium<\/a>: Settings to notify user of formatting errors <a href=\"https:\/\/github.com\/microsoft\/vscode-black-formatter\/pull\/59\">(black-formatter#59)<\/a><\/li>\n<\/ul>\n<p>Try out these new improvements by downloading the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">Python extension<\/a> and 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 + Shift + X or \u2318 + \u21e7 + X). You can learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/python-tutorial\">Python support in Visual Studio Code<\/a> in the documentation. If you run into any problems or have suggestions, <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/new\/choose\">please file an issue<\/a> on the <a href=\"https:\/\/github.com\/Microsoft\/vscode-python\">Python VS Code GitHub page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The November 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes automatic installation of the isort extension, auto imports turned off by default with Pylance, &#8220;just my code&#8221; cell debugging in Jupyter and more!<\/p>\n","protected":false},"author":99209,"featured_media":10119,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[17],"class_list":["post-9205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"acf":[],"blog_post_summary":"<p>The November 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes automatic installation of the isort extension, auto imports turned off by default with Pylance, &#8220;just my code&#8221; cell debugging in Jupyter and more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9205","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\/99209"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=9205"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9205\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/10119"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=9205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=9205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=9205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}