{"id":8901,"date":"2022-03-30T14:43:32","date_gmt":"2022-03-30T22:43:32","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=8901"},"modified":"2022-04-01T10:07:22","modified_gmt":"2022-04-01T18:07:22","slug":"python-in-visual-studio-code-april-2022-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-april-2022-release\/","title":{"rendered":"Python in Visual Studio Code \u2013 April 2022 Release"},"content":{"rendered":"<p>The April 2022 release of the Python Extension for Visual Studio Code is now available.<\/p>\n<p>In this release we\u2019re introducing the following changes:<\/p>\n<ul>\n<li>Pylint extension<\/li>\n<li>Interpreter display in the status bar moved to the right<\/li>\n<li>Simpler way to create empty Python and Jupyter Notebook files<\/li>\n<li>Fix for running and debugging files with conda environments<\/li>\n<\/ul>\n<p>If you are 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<h2>Pylint extension<\/h2>\n<p>Our team is working towards breaking the tools support we offer in the Python extension into separate extensions, with the intent of improving performance, stability and no longer requiring the tools to be installed in a Python environment &#8211; as they can be shipped alongside an extension. The first one we started to work on is <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.pylint\">Pylint<\/a>.<\/p>\n<p>This new extension uses the <a href=\"https:\/\/microsoft.github.io\/language-server-protocol\">Language Server Protocol<\/a> to provide linting support, and it ships with the latest version of <a href=\"https:\/\/pypi.org\/project\/pylint\/\">pylint.<\/a><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/pylint-extension.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8902\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/pylint-extension.gif\" alt=\"Pylint errors and warnings being displayed on Python code in Visual Studio Code.\" width=\"1957\" height=\"1247\" \/><\/a><\/p>\n<p>It also provides additional ways to configure the severity levels of the issues reported via pylint. For example:<\/p>\n<pre class=\"prettyprint\">\u201cpylint.severity\u201d : {\r\n    \"convention\": \"Information\",\r\n    \"error\": \"Error\",\r\n    \"fatal\": \"Error\",\r\n    \"refactor\": \"Hint\",\r\n    \"warning\": \"Warning\",\r\n    \"info\": \"Information\",\r\n    \"W0611\": \"Error\", \/\/per error code\r\n    \"unused-import\": \"Error\" \/\/per error diagnostic\r\n}\r\n<\/pre>\n<p><strong>Note<\/strong>: You may see two entries for the same problem in the\u00a0<strong>Problems<\/strong> panel if you also have Pylint enabled in the Python extension. You can disable the built-in linting functionality by setting\u00a0&#8220;python.linting.pylintEnabled&#8221;: false.<\/p>\n<p>You can try this new extension out today by <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.pylint\">installing it from the marketplace<\/a>. If you have any issues or feature requests, you can file them at the <a href=\"https:\/\/github.com\/microsoft\/vscode-pylint\">Pylint extension\u2019s GitHub repository<\/a>.<\/p>\n<h2>Interpreter display in the status bar moved to the right<\/h2>\n<p>To be more consistent with other extensions in VS Code, we moved the selected interpreter version display towards the right side in the status bar, next to the language status item <strong>Python<\/strong>. It is now only displayed when a Python or a settings.json file is currently open, to avoid cluttering the status bar:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/April2022-StatusBarRight.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8903\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/April2022-StatusBarRight.png\" alt=\"Interpreter information displayed on the bottom-right of the editor, on the status bar.\" width=\"484\" height=\"84\" srcset=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/April2022-StatusBarRight.png 484w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/April2022-StatusBarRight-300x52.png 300w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/a><\/p>\n<h2>Simpler way to create empty Python and Jupyter Notebook files<\/h2>\n<p>You can now create empty Python or Jupyter notebook files by running the \u201cFile: Create New\u2026\u201d command in the command palette, or by clicking on \u201cNew File\u2026\u201d\u00a0 from VS Code\u2019s welcome page:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/April2022-NewFilev2.gif\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-8904\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2022\/03\/April2022-NewFilev2.gif\" alt=\"Clicking on &quot;new file...&quot; from VS Code's welcome page and selecting &quot;Python&quot; and &quot;Notebook&quot;\" width=\"1782\" height=\"1184\" \/><\/a><\/p>\n<h2>Fix for running and debugging files with conda environments<\/h2>\n<p>In the February 2022 release, <a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-february-2022-release\/#improvements-when-using-anaconda\">we made some improvements<\/a> to the experience when using Anaconda environments, which caused a <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/18634\">regression<\/a> when running files in activated conda environments. These issues are now fixed in this release.<\/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 \u00a0 and Jupyter Notebooks in Visual Studio Code. Some notable changes include:<\/p>\n<ul>\n<li>Add support for detection and selection of conda environments lacking a python interpreter. When selecting such environment, the Python extension will automatically install a Python interpreter. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/18357\">vscode-python#18357<\/a>)<\/li>\n<li>Improved Kernel support when using .env files. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-jupyter\/issues\/9127\">vscode-jupyter#9127<\/a>)<\/li>\n<li>Support Kernel installation for more conda environments. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-jupyter\/issues\/9133\">vscode-jupyter#9133<\/a>)<\/li>\n<li>Add support for named index in dataframe viewer for DataFrames and Series. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-jupyter\/issues\/5348\">vscode-jupyter#5348<\/a>)<\/li>\n<li>Support symbol rename on untitled Python files. (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/issues\/2468\">pylance-release#2468<\/a>)<\/li>\n<li>Better indication when renaming symbols (F2) isn\u2019t supported. (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/issues\/441\">pylance-release#441<\/a>)<\/li>\n<li>debugpy\u00a0updated to version\u00a0v1.6.0. In this new version, Python 2.7 and Python 3.6 are no longer supported. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/18795\">vscode-python#18795<\/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\/sisoe24\">Virgil Sisoe<\/a>: Properly dismiss the error popup dialog when having a linter error.\u00a0 (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/18553\">vscode-python#18553<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/cdce8p\/\">Marc Mueller<\/a>: Python files are no longer excluded from Pytest arguments during test discovery.\u00a0 (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/18562\">vscode-python#18562<\/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\/171\">python-type-stubs\/#171<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/172\">python-type-stubs\/#172<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/173\">python-type-stubs\/#173<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/174\">python-type-stubs\/#174<\/a>, <a href=\"https:\/\/github.com\/microsoft\/python-type-stubs\/pull\/177\">python-type-stubs\/#177)<\/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>The April 2022 release of the Python Extension for Visual Studio Code is now available. In this release we\u2019re introducing a Pylint extension, a simpler way to create empty Python and Jupyter Notebook files, fixes for running and debugging files with conda environment and moving the interpreter display in the status bar to the right.<\/p>\n","protected":false},"author":87590,"featured_media":8902,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-8901","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>The April 2022 release of the Python Extension for Visual Studio Code is now available. In this release we\u2019re introducing a Pylint extension, a simpler way to create empty Python and Jupyter Notebook files, fixes for running and debugging files with conda environment and moving the interpreter display in the status bar to the right.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/8901","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\/87590"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=8901"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/8901\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/8902"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=8901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=8901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=8901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}