{"id":9464,"date":"2023-09-08T07:43:10","date_gmt":"2023-09-08T15:43:10","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=9464"},"modified":"2023-09-08T07:43:10","modified_gmt":"2023-09-08T15:43:10","slug":"python-in-visual-studio-code-september-2023-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-september-2023-release\/","title":{"rendered":"Python in Visual Studio Code &#8211; September 2023 Release"},"content":{"rendered":"<p>We\u2019re excited to announce the September 2023 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!<\/p>\n<p>This release includes the following announcements:<\/p>\n<ul>\n<li>&#8220;Recreate&#8221; or &#8220;Use Existing&#8221; options added to the <strong>Python: Create Environment<\/strong> command<\/li>\n<li>Experimental terminal activation using environment variables<\/li>\n<li>Community-contributed yapf extension<\/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<h2>&#8220;Recreate&#8221; or &#8220;Use Existing&#8221; options when using <strong>Python: Create Environment<\/strong> with existing <code>.venv<\/code><\/h2>\n<p>When working within a workspace that already contains a <code>.venv<\/code> folder, the <strong>Python: Create Environment<\/strong> command has been updated to provide you with options to either recreate or use the existing environment. If you opt-in to recreate the environment, your current <code>.venv<\/code> will be deleted, allowing you to recreate a new environment named <code>.venv<\/code>. You can customize this new environment by following the <strong>Python: Create Environment<\/strong> flow, selecting your preferred interpreter, and specifying any dependency files for installation. In the case the environment cannot be deleted, for example, due to it being active, you will be prompted to delete the environment manually.<\/p>\n<p>Alternatively, if you opt to use the existing environment, the environment will be selected for your workspace.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/09\/env_recreate_use_existing.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-9465\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/09\/env_recreate_use_existing.gif\" alt=\"Gif demonstrating &quot;recreate&quot; and &quot;use existing&quot; commands with Create Environment \" width=\"2489\" height=\"1585\" \/><\/a><\/p>\n<h2>Experimental terminal activation using environment variables<\/h2>\n<p>This month, we are beginning the rollout of terminal activation using environment variables that activate the selected environment in the terminal without requiring any activation commands. With this new experience, the Python extension uses environment variables to activate terminals, which is done implicitly on terminal launch, resulting in a faster experience, particularly for conda users. This experiment will serve as the default experience for 25% of Pre-release users behind the experimental <code>[\"pythonTerminalEnvVarActivation\"]<\/code> flag. You can opt into or out of this experiment in your <strong>User<\/strong> settings by modifying <code>\"python.experiments.optInto\"<\/code> or <code>\"python.experiments.optOutFrom\"<\/code> respectively in your <code>settings.json<\/code>. If you have any comments or suggestions regarding this experience, please share them in <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/11039\">vscode-python#11039<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/09\/terminalautoactivation-scaled.gif\"><img decoding=\"async\" class=\"alignnone size-full wp-image-9466\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/09\/terminalautoactivation-scaled.gif\" alt=\"Gif demonstrating terminal auto activation.\" width=\"2500\" height=\"1571\" \/><\/a><\/p>\n<h2>Community-contributed yapf extension<\/h2>\n<p>There is now a community-contributed (<a href=\"https:\/\/github.com\/EeyoreLee\">@EeyoreLee<\/a>) <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=eeyore.yapf\">yapf formatter extension<\/a> available! This extension provides yapf formatting support for Python files and Notebook cells. Yapf support built into the Python extension will be deprecated in favor of the extension support. Subsequently, the corresponding setting <code>python.formatting.yapf<\/code> will be removed from the Python extension.<\/p>\n<p>This corresponds to the work <a href=\"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-april-2022-release\/#pylint-extension\">announced in April 2022<\/a> to break out the tools support we offer in the Python extension for Visual Studio Code into separate extensions, with the intent of improving performance, and stability and no longer requiring the tools to be installed in a Python environment \u2013 as they can be shipped alongside an extension.<\/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>Unresolved import errors now indicate in which environment Pylance is looking for packages (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/issues\/4368\">pylance-release#4368<\/a>)<\/li>\n<li>There&#8217;s a new experimental setting called <code>python.analysis.enableSyncServer<\/code> that enables multi-file IntelliSense support in <a href=\"https:\/\/vscode.dev\/\">vscode.dev<\/a>. Support for <a href=\"https:\/\/github.dev\">github.dev<\/a> and virtual workspaces is coming soon!<\/li>\n<li>Pylance no longer crashes on Jupyter Notebook cell deletion (<a href=\"https:\/\/github.com\/microsoft\/pylance-release\/issues\/4685\">@pylance-release#4685<\/a>)<\/li>\n<li>There is a new dedicated topic on <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/formatting\">Python formatting<\/a> in our docs where you&#8217;ll learn how to set a default formatter such as <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.autopep8\">autopep8<\/a> or <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.black-formatter\">Black formatter<\/a> and customize it through various settings.<\/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\/chrissiwaffler\">@chrissiwaffler<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/126\">vscode-python-tools-extension-template#126<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/oliversen\">@oliversen<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/145\">vscode-python-tools-extension-template#145<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/EeyoreLee\">@EeyoreLee<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/155\">vscode-python-tools-extension-template#155<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rachfop\">@rachfop<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/41\">vscode-python-tools-extension-template#41<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/34j\">@34j<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/59\">vscode-python-tools-extension-template#59<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/augb\">@augb<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/72\">vscode-python-tools-extension-template#72<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/eddyg\">@eddyg<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/84\">vscode-python-tools-extension-template#84<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/ischaojie\">@ischaojie<\/a> made their first contribution in <a href=\"https:\/\/github.com\/microsoft\/vscode-python-tools-extension-template\/pull\/92\">vscode-python-tools-extension-template#92<\/a><\/li>\n<\/ul>\n<h2>Call for Community Feedback<\/h2>\n<p>As we are planning and prioritizing future work, we value your feedback! Below are a few issues we would love feedback on:<\/p>\n<ul>\n<li>Future Design of Python Testing Output <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/21861\">(vscode-python#21861)<\/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 September 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. This month&#8217;s updates include updates to the Create Environment command, a new terminal auto-activation experiment, and a new yapf extension. Keep reading to learn 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,6],"tags":[14,1252,17,1261],"class_list":["post-9464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-visual-studio-code","tag-jupyter","tag-pylance","tag-python","tag-release"],"acf":[],"blog_post_summary":"<p>The September 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. This month&#8217;s updates include updates to the Create Environment command, a new terminal auto-activation experiment, and a new yapf extension. Keep reading to learn more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9464","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=9464"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9464\/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=9464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=9464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=9464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}