{"id":9361,"date":"2023-06-09T08:04:29","date_gmt":"2023-06-09T16:04:29","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=9361"},"modified":"2023-06-13T11:13:36","modified_gmt":"2023-06-13T19:13:36","slug":"python-in-visual-studio-code-june-2023-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-june-2023-release\/","title":{"rendered":"Python in Visual Studio Code &#8211; June 2023 Release"},"content":{"rendered":"<p>We\u2019re excited to announce that the June 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 are now available!<\/p>\n<p>This release includes the following announcements:<\/p>\n<ul>\n<li>Test Discovery and Execution Rewrite<\/li>\n<li>Run Python File in Dedicated Terminal<\/li>\n<li>Preview: Intellisense support for overloaded operators<\/li>\n<li>Configurable indexing limits with Pylance<\/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>Test Discovery and Execution Rewrite<\/h2>\n<p>This month, we are beginning the roll out of our testing rewrite behind an experimental feature. This rewrite redesigns the architecture behind test discovery and execution for both unittest and pytest in the extension. While it does not provide any additional functionality exposed to the user, it provides a faster and more stable experience, and opens up new functionality opportunities moving forward.\nThe rewrite will be rolled out behind the experimental <code>\"pythonTestAdapter\"<\/code> flag, which you can opt into with <code>\"python.experiments.optInto\"<\/code> in your <code>settings.json<\/code>.\nEventually, we plan to remove the setting and adopt this new architecture. If you have any comments or suggestions regarding this experiment or rewrite, please share them in the <a href=\"https:\/\/github.com\/microsoft\/vscode-python\">vscode-python<\/a> repo.<\/p>\n<h2>Run Python File in Dedicated Terminal<\/h2>\n<p><strong>UPDATE<\/strong> (13 June 2023) &#8211; This feature has been rolled back due to a bug tracked by <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/21393\">vscode-python#21393<\/a>.<\/p>\n<p>The Python extension will now create a new terminal for each file you run using the run button in the top right corner of the editor or the <strong>Python: Run Python File in Terminal<\/strong> command. This also means the Python extension will keep using this file&#8217;s &#8220;dedicated&#8221; terminal every time you re-run the file.<\/p>\n<p>Any time you wish to run the same file in a separate terminal, you can run select <strong>Python: Run Python File in Dedicated Terminal<\/strong> under the run button menu.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/06\/run-python-file-dedicated-terminal-option.png\"><img decoding=\"async\" class=\"alignnone wp-image-9363\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/06\/run-python-file-dedicated-terminal-option-300x161.png\" alt=\"Run python file dedicated terminal option in dropdown menu\" width=\"483\" height=\"259\" srcset=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/06\/run-python-file-dedicated-terminal-option-300x161.png 300w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/06\/run-python-file-dedicated-terminal-option-1024x549.png 1024w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/06\/run-python-file-dedicated-terminal-option-768x412.png 768w, https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2023\/06\/run-python-file-dedicated-terminal-option.png 1028w\" sizes=\"(max-width: 483px) 100vw, 483px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Preview: IntelliSense support for overloaded operators with Pylance<\/h2>\n<p>Overloaded operators allow you to redefine the behavior of built-in operators for your custom objects or data types. When using the latest pre-release version of the Pylance extension, you are now able to use IntelliSense to explore and utilize overloaded operators with ease and efficiency.<\/p>\n<p>This functionality provides code completion, parameter information, and signature help for overloaded operators, whether you&#8217;re working with mathematical vectors, complex numbers, or any other custom classes.<\/p>\n<p><img decoding=\"async\" class=\"alignnone\" src=\"https:\/\/github-production-user-asset-6210df.s3.amazonaws.com\/60238438\/244510518-b43dfcfd-a2b2-4ab9-bd80-8698f9f253c6.gif\" alt=\"Intellisense on overeloaded operators gif\" width=\"3119\" height=\"1768\" \/><\/p>\n<h2>Configurable indexing limits with Pylance<\/h2>\n<p>There&#8217;s a new Pylance setting that allows you to configure the file count limit for indexing: <code>\"python.analysis.userFileIndexingLimit\"<\/code>, which is set to 2000 by default. This setting can be particularly helpful when you&#8217;re working with very large projects and are willing to compromise performance for an enhanced IntelliSense experience.<\/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>New experimental <code>createEnvironment.contentButton<\/code> setting to disable the Create Environment button in dependency files <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21212\">(vscode-python#21212)<\/a><\/li>\n<li>Detect installed packages in the selected environment <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21231\">(vscode-python#21231)<\/a><\/li>\n<li>New <code>python.analysis.inlayHints.callArgumentNames<\/code> setting to enable inlay hints for call argument names with Pylance<\/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\/PeterJCLaw\">@PeterjClaw<\/a> Disable &#8220;snippers&#8221; expansion in Jedi LSP <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21194\">(vscode-python#21194)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/JonathanRayner\">@JonathanRayner<\/a> Add option for pyenv interpreters when creating environments with venv <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21219\">(vscode-python#21219)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/cpinamtz\">@cpinamtz<\/a> Fix typo in a type declaration of MultiStepInput module <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21156\">(vscode-python#21156)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/cpinamtz\">@cpinamtz<\/a> Insert debug configuration function on every quick pick item <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21165\">(vscode-python#21165)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/cpinamtz\">@cpinamtz<\/a> Add more coverage to utils function <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21026\">(vscode-python#21026)<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/cpinamtz\">@cpinamtz<\/a> Remove IS_WINDOWS constant in favor of PlatformService <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/pull\/21157\">(vscode-python#21157)<\/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 June 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes a test discovery and execution rewrite, an option to run your Python file in a dedicated terminal, a preview of IntelliSense on overloaded operators, and configurable index limits with Pylance. 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],"tags":[17],"class_list":["post-9361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"acf":[],"blog_post_summary":"<p>The June 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes a test discovery and execution rewrite, an option to run your Python file in a dedicated terminal, a preview of IntelliSense on overloaded operators, and configurable index limits with Pylance. Keep reading to learn more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9361","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=9361"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/9361\/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=9361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=9361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=9361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}