Luciana Abud, Author at Microsoft for Python Developers Blog https://devblogs.microsoft.com/python/author/luabud/ Read the latest updates about all things Python at Microsoft Thu, 13 Nov 2025 18:41:50 +0000 en-US hourly 1 https://devblogs.microsoft.com/python/wp-content/uploads/sites/12/2018/10/Microsoft-Favicon.png Luciana Abud, Author at Microsoft for Python Developers Blog https://devblogs.microsoft.com/python/author/luabud/ 32 32 Python in Visual Studio Code – November 2025 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-november-2025-release/ Thu, 13 Nov 2025 18:41:50 +0000 https://devblogs.microsoft.com/python/?p=10225 The November 2025 release brings new Pylance features including improvements to Copilot Hover Summaries and a Code Action to convert wildcard imports to explicit imports. Keep on reading to learn more!

The post Python in Visual Studio Code – November 2025 Release appeared first on Microsoft for Python Developers Blog.

]]>
We’re excited to announce that the November 2025 release of the Python extension for Visual Studio Code is now available!

This release includes the following announcements:

  • Add Copilot Hover Summaries as docstring
  • Localized Copilot Hover Summaries
  • Convert wildcard imports Code Action
  • Debugger support for multiple interpreters via the Python Environments Extension

If you’re interested, you can check the full list of improvements in our changelogs for the Python and Pylance extensions.

Add Copilot Hover Summaries as docstring

You can now add your AI-generated documentation directly into your code as a docstring using the new Add as docstring command in Copilot Hover Summaries. When you generate a summary for a function or class, navigate to the symbol definition and hover over it to access the Add as docstring command, which inserts the summary below your cursor formatted as a proper docstring.

This streamlines the process of documenting your code, allowing you to quickly enhance readability and maintainability without retyping.

Add as docstring command in Copilot Hover Summaries

Localized Copilot Hover Summaries

GitHub Copilot Hover Summaries inside Pylance now respect your display language within VS Code. When you invoke an AI-generated summary, you’ll get strings in the language you’ve set for your editor, making it easier to understand the generated documentation.

Copilot Hover Summary generated in Portuguese

Convert wildcard imports into Code Action

Wildcard imports (from module import *) are often discouraged in Python because they can clutter your namespace and make it unclear where names come from, reducing code clarity and maintainability. Pylance now helps you clean up modules that still rely on from module import * via a new Code Action. It replaces the wildcard with the explicit symbols, preserving aliases and keeping the import to a single statement. To try it out, you can click on the line with the wildcard import and press Ctrl + . (or Cmd + . on macOS) to select the Convert to explicit imports Code Action.

Convert wildcard imports Code Action

Debugger support for multiple interpreters via the Python Environments Extension

The Python Debugger extension now leverages the APIs from the Python Environments Extension (vscode-python-debugger#849). When enabled, the debugger can recognize and use different interpreters for each project within a workspace. If you have multiple folders configured as projects—each with its own interpreter – the debugger will now respect these selections and use the interpreter shown in the status bar when debugging.

To enable this functionality, set “python.useEnvironmentsExtension”: true in your user settings. The new API integration is only active when this setting is turned on.

Please report any issues you encounter to the Python Debugger repository.

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:

  • Resolve unexpected blocking during PowerShell command activation (vscode-python-environments#952)
  • The Python Environments Extension now respects the existing python.poetryPath user setting to specify which Poetry executable to use (vscode-python-environments#918)
  • The Python Environments Extension now detects both requirements.txt and dev-requirements.txt files when creating a new virtual environment for automatic dependency installation (vscode-python-environments#506)

We would also like to extend special thanks to this month’s contributors:

Try out these new improvements by downloading the Python extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – November 2025 Release appeared first on Microsoft for Python Developers Blog.

]]>
Python in Visual Studio Code – October 2025 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-october-2025-release/ Fri, 10 Oct 2025 17:55:26 +0000 https://devblogs.microsoft.com/python/?p=10209 The October 2025 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes improvements to the Python Environments extension, Copy Test ID functionality, and enhanced environment activation when using Copilot Chat. Keep on reading to learn more!

The post Python in Visual Studio Code – October 2025 Release appeared first on Microsoft for Python Developers Blog.

]]>
We’re excited to announce that the October 2025 release of the Python extensions for Visual Studio Code are now available!

This release includes the following announcements:

  • Python Environments extension improvements
  • Enhanced testing workflow with Copy Test ID in gutter menu
  • Shell startup improvements for Python environment activation

If you’re interested, you can check the full list of improvements in our changelogs for the Python and Pylance extensions.

Python Environments Extension Improvements

The Python Environments extension received several fixes and updates to enhance your Python development experience in VS Code. Highlights include improved performance and reliability when working with conda environments – now lauching code directly without conda run, a smoother environment flow with Python versions now sorted in descending order for easier acces to the latest releases, fixes for crashes when running Python files that use input(), and improvements to false-positive environment configuration warnings.

The extension also now automatically refreshes environment managers when expanding tree nodes, keeping your environment list up to date without any extra steps.

We appreciate the community feedback that helped identify and prioritize these improvements. Please continue to share your thoughts, suggestions and bug reports on the Python Environments GitHub repository as we continue rolling out this extension.

Enhanced Testing Workflow with Copy Test ID

We’ve improved the testing experience by adding a “Copy Test ID” option to the gutter icon context menu for test functions. This feature allows you to quickly copy test identifiers in pytest format directly from the editor gutter, making it easier to run specific tests from the command line or share test references with teammates.

Copy test id

Improved Shell Startup for Python Environment Activation

We have made improvements to shell start up to reduce issues where terminals created by GitHub Copilot weren’t properly activating Python virtual environments. With the new shell startup approach, you’ll get a more reliable environment activation across terminal creation methods while reducing redundant permission prompts.

Additionally, virtual environment prompts such as (.venv) now appear correctly when PowerShell is activated through shell integration, and we have resolved issues with activation in WSL.

To benefit from these improvements, set your python-envs.terminal.autoActivationType to shellStartup in your VS Code settings.

Other Changes and Enhancements

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:

  • Enhanced contributor experience with new Copilot Chat instruction files that provide guidance for testing features and understanding VS Code components when contributing to the Python extension (#25473, #25477)
  • Updated debugpy to version 1.8.16 (#795)

We would also like to extend special thanks to this month’s contributors:

  • Morikko: Upgraded jedi-language-server to 0.45.1 (#25450)
  • cnaples79: Fixed mypy diagnostics parsing from stderr in non-interactive mode (#375)
  • renan-r-santos: Display activate button when a terminal is moved to the editor window (#764)
  • lev-blit: Added py.typed to debugpy distributed package (#1960)

Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – October 2025 Release appeared first on Microsoft for Python Developers Blog.

]]>
Python in Visual Studio Code – September 2025 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-september-2025-release/ Mon, 15 Sep 2025 18:22:18 +0000 https://devblogs.microsoft.com/python/?p=10141 The September 2025 release includes pipenv support in the Python Environment Extension, a new experimental hover feature with GitHub Copilot and Pylance, and more!

The post Python in Visual Studio Code – September 2025 Release appeared first on Microsoft for Python Developers Blog.

]]>
We’re excited to announce the September 2025 release of the Python, Pylance and Jupyter extensions for Visual Studio Code!

This release includes the following announcements:

  • Experimental AI-powered hover summaries with Pylance
  • Run Code Python Snippet AI tool
  • Python Environments extension improvements, including pipenv support

If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.

This month you can also help shape the future of Python typing by filling out the 2025 Python Type System and Tooling Survey: https://jb.gg/d7dqty

Experimental AI-powered hover summaries with Pylance

A new experimental AI Hover Summaries feature is now available for Python files when using the pre-release version of Pylance with GitHub Copilot. When you enable the setting(python.analysis.aiHoverSummaries) setting, you can get helpful summaries on the fly for symbols that do not already have documentation. This makes it easier to understand unfamiliar code and boosts productivity as you explore Python projects. At the moment, AI Hover Summaries are currently available to GitHub Copilot Pro, Pro+, and Enterprise users.

We look forward to bringing this experimental experience to the stable version soon!

AI-powered hover summaries with Pylance

Run Code Snippet AI tool

The Pylance Run Code Snippets tool is a powerful feature designed to streamline your Python experience with GitHub Copilot. Instead of relying on terminal commands like python -c "code" or creating temporary files to be executed, this tool allows GitHub Copilot to execute Python snippets entirely in memory. It automatically uses the correct Python interpreter configured for your workspace, and it eliminates common issues with shell escaping and quoting that sometimes arise during terminal execution.

One of the standout benefits is the clean, well-formatted output it provides, with both stdout and stderr interleaved for clarity. This makes it ideal when using Agent mode with GitHub Copilot to test small blocks of code, run quick scripts, validate Python expressions, or checking imports, all within the context of your workspace.

To try it out, make sure you’re using the latest pre-release version of Pylance. Then, you can select the pylancerunCodeSnippet tool via the Add context… menu in the VS Code Chat panel.

Note: As with all AI-generated code, please make sure to inspect the generated code before allowing this tool to be executed. Reviewing the logic and intent of the code ensures it aligns with your project’s goals and maintains safety and correctness.

pylance-run-code-snippet

Python Environments extension improvements

We appreciate your feedback and are excited to share several enhancements to the Python Environments extension. Thank you to everyone who submitted bug reports and suggestions to help us improve!

Improvements to Conda experience

We focused on removing friction and unexpected behavior when working with Conda environments:

  • When creating a new Conda environment through the UI, you can now pick the Python version up front.
  • Conda activation and sourcing has been improved across different OS and shell types, with clearer logging.
  • The Copy Interpreter Path action now returns the actual Python binary instead of a conda run wrapper
  • The proper Conda and Pixi executables are used when debugging.

Pipenv support

Pipenv environments are now discovered and listed in the Environments Manager view.

Better diagnostics and control

We’ve made it easier to identify and resolve environment-related issues. When there are issues with the default environment manager, such as missing executables, clear warnings are now surfaced to guide you through resolution.

Additionally, there’s a new Run Python Environment Tool (PET) in Terminal command which gives you direct access to running the back-end environment tooling by hand. This tool simplifies troubleshooting by allowing you to manually trigger detection operations, making it easier to diagnose and fix edge cases in environment setup.

Quality of life improvements

We also reduced paper cuts to make your experience with the extension smoother. These include:

  • Add as Python project menu item is now always available, enabling a more consistent flow for setting a folder as a Python project.
  • Interpreter paths with spaces are now properly handled when debugging.
  • Environments are now always refreshed on new project creation.
  • Conda activation logic is consolidated with clearer logging.
  • We audited and removed shell profile edits which are outdated or no longer needed given VS Code core shell integration improvements.
  • We tightened the logic that resolves the default interpreter so it honors your defaultInterpreterPath (including script wrappers) without silently “correcting” it.
  • We have a new setting called python.useEnvFile which controls whether environment variables from .env files and the python.envFile setting are injected into terminals when the Python Environments extension is enabled.
  • venvFolders are now included in the extension’s search path. Please note that we plan to deprecate the python.venvFolders setting in favour of a new one in the future, to enable better flexibility when setting up environment search paths.

We are continuing to roll-out the extension. To use it, make sure the extension is installed and add the following to your VS Code settings.json file: "python.useEnvironmentsExtension": true. If you are experiencing issues with the extension, please report issues in our repo, and you can disable the extension by setting "python.useEnvironmentsExtension": false in your settings.json file.

Call for Community Feedback

This month, the Python community is coming together to gather insights on how type annotations are used in Python. Whether you’re a seasoned user or have never used types at all, your input is valuable! Take a few minutes to help shape the future of Python typing by participating in the 2025 Python Type System and Tooling Survey: https://jb.gg/d7dqty.

Other Changes and Enhancements

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:

  • The python.analysis.supportAllPythonDocuments setting has been removed, making Pylance IntelliSense now enabled in all Python documents by default, including diff views and Python terminals.

We would also like to extend special thanks to this month’s contributors:

Try out the new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – September 2025 Release appeared first on Microsoft for Python Developers Blog.

]]>
Microsoft at EuroPython 2022 https://devblogs.microsoft.com/python/microsoft-at-europython-2022/ Mon, 11 Jul 2022 13:20:09 +0000 https://devblogs.microsoft.com/python/?p=8997 We’re thrilled to be a Platinum Sponsor of EuroPython this year, happening from July 11th-17th in Dublin, Ireland. If you can’t make it in person, you can still attend the conference remotely, as EuroPython is a hybrid event this year!    Our team members will be giving a variety of talks during the conference:  July 13th […]

The post Microsoft at EuroPython 2022 appeared first on Microsoft for Python Developers Blog.

]]>
We’re thrilled to be a Platinum Sponsor of EuroPython this year, happening from July 11th-17th in Dublin, Ireland. If you can’t make it in person, you can still attend the conference remotely, as EuroPython is a hybrid event this year!   

Our team members will be giving a variety of talks during the conference: 

Make sure you don’t miss them!  We’ll also be at the Microsoft booth talking about the hard work our teams have been doing to continue supporting the Python community, and to improve the experience for Python developers across our products over the past year. 

For instance, Visual Studio Code, which has become the most used editor for Python developers in 2021, has a new and improved experience when working with Jupyter notebooks, a revamped test explorer via the Python extension, and now comes with new Python dev tools extensions (such as pylint, black and isort). We have also enabled a smooth and lightweight editing experience on the web with vscode.dev and github.dev, and a feature-rich one in GitHub Codespaces 

On the cloud front, Python 3.10 and 3.11 support will be coming in a few months to Azure App Service. There are also new features to help with troubleshooting high CPU and memory utilization in Python apps. For Azure Functions, we are working on a new programming model to write functions in Python. The new programming model drives a simpler function creation process, including having triggers and bindings represented as decorators, and fewer files. We’re expecting to make this experience available soon, so stay tuned to our blog!  

The new, open-source Azure Developer CLI accelerates the time it takes you to go from code to cloud, all from the command line with idiomatic Python application templates. The CLI provides simple ways to provision the right resources for your application and deploy them seamlessly on Azure, monitor application performance, create and manage GitHub Actions to automate CI/CD with every commit to your application’s repository, and more.

In the machine learning and data science realm, notebooks in Azure Machine Learning allows you to run and track experiments in a machine learning studio using the familiar interface of Jupyter notebooks. In addition to the existing coding tools, several new features have been released to boost productivity, including highlighting the code line that caused an error during run and scanning GitHub for examples for unfamiliar methods. On top of that, its integration with VS Code has been improved to provide: 

  • A new, more secure and fluid (no-ssh), transition between using the Azure ML Studio and VS Code to edit Jupyter notebooks running on Azure ML Compute Instances. 
  • Enhanced authoring support for Azure Machine Learning specification files within VS Code, including completions and validations. 
  • A new Azure ML Inference extension to help you test and debug online endpoints locally before deploying them to Azure. 

Last year, we also announced a collaboration with Anaconda to license our customers to use Anaconda’s packages across all of cloud hosted services, and have been filling our Conda channel with our popular packages such as the Azure SDKs and Playwright. And a couple of months ago at Microsoft Build 2022 we announced upcoming new Windows ARM64 devices, and we are working on making sure Python is available and works great natively on those devices.  

Last but not least, we’re proud of the work Guido van Rossum and the CPython performance team at Microsoft has been doing on improvements to the core runtime, which will make Python 3.11 10-60% faster than Python 3.10, depending on the workload – and you can learn more about that by checking Mark Shannon’s talk on “How we are making Python 3.11 faster” on July 14th at 11:20am.   

These are only some of the many things we look forward to chatting with you at EuroPython. But if you can’t make it there, no problem – you can always connect to us through our Discord channel. 

Whether it’s in person or virtually, we all look forward to meeting you!  

The post Microsoft at EuroPython 2022 appeared first on Microsoft for Python Developers Blog.

]]>
Python in Visual Studio Code – July 2022 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-july-2022-release/ https://devblogs.microsoft.com/python/python-in-visual-studio-code-july-2022-release/#comments Thu, 07 Jul 2022 23:25:07 +0000 https://devblogs.microsoft.com/python/?p=8981 We’re excited to announce that the July 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available. This release includes inlay type hints with Pylance and improvements to the setup experience with Jupyter notebooks. If you’re interested, you can check the full list of improvements in our changelogs for the […]

The post Python in Visual Studio Code – July 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
We’re excited to announce that the July 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available.

This release includes inlay type hints with Pylance and improvements to the setup experience with Jupyter notebooks. If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.

Inlay Type Hints

Inlay hints add inline information to your code in the editor to help you understand the meaning of a variable or a function at a glance.

In this release, we have added two types of inlay hints when using Pylance: for variable types and for return types.

Return type inlay hints show the return types of functions that don’t have an explicit annotation. To enable it, you can set “python.analysis.inlayHints.functionReturnTypes”: true to your user settings (Preferences: Open Settings (JSON) command).

Similarly, variable type inlay hints show the types of variables that don’t have explicit type annotations. You can enable it by setting “python.analysis.inlayHints.variableTypes”: true.

Type hint information displayed next to variables and functions in VS CodeTheme: Horizon Extended

It’s worth noting these hints don’t cause changes to your code, they only add information to the editor’s user interface. However, we are working on adding support for adding the suggested annotations to your code, so stay tuned!

Improvements to the setup experience with Jupyter notebooks

We have improved the extension recommendation flow from within a notebook to help improve the getting started experience when you don’t have the Python or Jupyter extensions installed. Once you open a Jupyter notebook in VS Code, you will see a “install suggested extensions” entry when you try to run a cell or select a kernel:

Option to install suggested extensions (Python and Jupyter) when clicking on select kernel or run cell buttons.

This change greatly reduces the number of steps needed to get the first notebook cell run within VS Code.

Other Changes and Enhancements

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:

We would like to extend special thanks to this month’s contributors:

Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – July 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
https://devblogs.microsoft.com/python/python-in-visual-studio-code-july-2022-release/feed/ 2
Python in Visual Studio Code – June 2022 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-june-2022-release/ Thu, 09 Jun 2022 19:58:32 +0000 https://devblogs.microsoft.com/python/?p=8956 We’re excited to announce that the June 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available.  This release includes improvements to:  Localization support   Python interpreter discovery  Jupyter extension support on vscode.dev/github.dev   Insiders program for Pylance   If you’re interested, you can check the full list of improvements in our changelogs […]

The post Python in Visual Studio Code – June 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
We’re excited to announce that the June 2022 release of the Python and Jupyter extensions for Visual Studio Code are now available. 

This release includes improvements to: 

  • Localization support  
  • Python interpreter discovery 
  • Jupyter extension support on vscode.dev/github.dev  
  • Insiders program for Pylance  

If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions. 

Improved localization support  

The Python extension now supports translations in all the languages that VS Code supports. We have updated the way we get the text of our commands, notifications, and titles to use translations that are maintained by a localization team, to ensure that they are up to date and correct. 

VS Code Python commands translated to Portuguese (Brazil) Theme: Horizon Extended. Language mode: Portuguese (Brazil). 

To try it out, you can change the display language in VS Code by running the Configure Display Language command in the command palette (Ctrl+Shift+P or ++P).

Improvements in Python interpreter discovery 

We also made improvements to when discovery of Python interpreters is triggered.  

Previously, the Python extension would try to find Python interpreters every time it activated/loaded. Starting in this release, interpreter discovery is only triggered when a new folder or workspace is opened for the first time, when the “Python: Select Interpreter” command is triggered, and when the interpreters list is refreshed. This leads to much faster load times and startup of features like the language server.  

Note that if the Jupyter  extension is installed/enabled, discovery is still triggered by Jupyter at startup. We’re working towards improving this flow in the future.  

New Jupyter extension features on vscode.dev/github.dev  

We’ve made progress on supporting more of the core functionality in the new web version of the Jupyter  extension. 

This month we ported the following features to the web extension: 

  • https support 
  • kernel completions 
  • ipywidgets 
  • notebook debugging 
  • variable viewing 
  • exporting 
  • interactive window 

If you’d like to experiment with the functionality, you can launch Jupyter from your local machine with the following:  

jupyter notebook --no-browser --NotebookApp.allow_origin_pat=https://.*\.vscode-cdn\.net

You can then connect to it using the “Jupyter: Specify Jupyter server for connections” command from within vscode.dev. 

For more information and for providing feedback, see this discussion item. 

Pre-release Pylance extension 

The Pylance extension offers an Insiders program, where you can get preview updates and try the latest features and bug fixes earlier on. Before this release, one would opt into it via a setting, and then every week a new build would be downloaded and installed, and a prompt would be displayed to reload the window to enable the new update. 

Given that the Python extension successfully migrated its insiders program in the March 2022 release to pre-release versions, we’re now doing the same for Pylance to provide a smoother opt-in and upgrade experience. You can install a pre-release version by opening the extension’s view in VS Code (Ctrl + Shift + X or ⌘ + ⇧ + X), searching for Pylance, and opening the Pylance extension. If you already have the extension installed, you will be able to click on the “Switch to Pre-Release Version” button next to the “Uninstall” button: 

Switch to pre-release version button in VS Code's extension view when opening the Pylance extension

If you don’t have it installed, you will be able to click on the down arrow next to the Install button and select “Install Pre-Release Version”: 

Switch to pre-release version option when Pylance is not installed in VS Code

If you were part of the Insiders program and had the “pylance.insidersChannel” setting set to “daily”, you will automatically start using the pre-release versions of the Pylance extension. The setting will also be removed as it’s no longer supported. 

If you’re also interested in getting the latest Python and Jupyter notebook features and bug fixes early on, you can similarly install pre-release versions of the Python and the Jupyter extension. 

What would Brett do? 

The Engineering Manager of the Python extension and Python Steering Council member Brett Cannon has created a new experimental extension for setting up Python environments, called WWBD (which stands for “What would Brett do?”).  

Through a command called “WWBD: Create environment”, it offers a very opinionated flow of creating a virtual environment using venv, and automatically installing dependencies if they’re listed in a requirements file on the workspace. 

We’re looking for feedback on this experience at the repository, as we explore the possibility of integrating this flow into the Python extension itself in the future.  

Other Changes and Enhancements 

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: 

  • Experimental Feature: Pylance now treats each Jupyter notebook cell as a separate document rather than concatenating the cells together into a single document. It has the potential to fix a lot of Pylance notebook behaviors. It can be enabled by setting ”python.pylanceLspNotebooksEnabled”: true. 
  • Improve information collected by the “Python: Report Issue” command. (vscode-python#19067) .
  • Jupyter notebooks no longer freeze on typing or executing (pylance-release#2783).  
  • Show completion suggestions for overriding inherited class variables (pylance-release#2059). 
  • Pylance now gets the stubs from the repo maintained by pandas-dev. Please open pandas stub issues there going forward (python-type-stubs#208). 

We would also like to extend special thanks to this month’s contributors: 

Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or  +  + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the  Python VS Code GitHub page. 

The post Python in Visual Studio Code – June 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
Python in Visual Studio Code – March 2022 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-march-2022-release/ https://devblogs.microsoft.com/python/python-in-visual-studio-code-march-2022-release/#comments Fri, 04 Mar 2022 01:02:35 +0000 https://devblogs.microsoft.com/python/?p=8872 The March 2022 release of the Python Extension for Visual Studio Code is now available and it includes support for pre-release versions and changes to the interpreter selector on the status bar.

The post Python in Visual Studio Code – March 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
The March 2022 release of the Python Extension for Visual Studio Code is now available.

This is a short release as during the past month our team has largely focused on features and changes that will be landing in the next couple of releases. Nevertheless, it still includes new functionality such as support for pre-release versions and changes to the interpreter selector on the status bar.

If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.

Pre-release extension

The Python extension offers an Insiders program, where you can get daily updates so you can try our latest features and bug fixes early on. Before this release, one would opt into it via a setting, and then every day a new build would be downloaded, and a prompt would be displayed to reload the window to enable the new update.

For a smoother opt-in and upgrade experience, we’re migrating our Insiders program to pre-release versions of the Python extension. You can install a pre-release version by opening the extension’s view in VS Code (Ctrl + Shift + X or ⌘ + ⇧ + X), searching for Python, and opening the Python extension. If you already have the extension installed, you will be able to click on the “Switch to Pre-Release Version” next to the “Uninstall” button:

Install pre-release button on Python extension page.

If you don’t have it installed, you will be able to click on the down arrow next to the Install button and select “Install Pre-Release Version”:

Install pre-release version button under drop down menu next to install button on the Python extension page

If you were part of our Insiders program and had the “python.insidersChannel” setting set to “daily”, you will automatically start using the pre-release versions of the Python extension. If you had the “python.insidersChannel” setting set to weekly, you will be prompted to choose whether to install the pre-release version or to switch to the stable version. These settings will also be removed as they are no longer supported.

And if you’re interested in getting the latest notebook features and bug fixes early on, you can also install pre-release versions of the Jupyter extension.

Changes to the interpreter selector on the status bar

To be more consistent with other language extensions, we are also changing the location of the interpreter information/selector on the status bar and experimenting with two potential approaches. One experience simply moves the interpreter information to the bottom right, next to the Language Mode selector:Python interpreter version displayed on the bottom right on the status bar, instead of in the left as in previous releases.

Alternatively, we are placing all interpreter-specific information behind the language status icon (as represented by the { } marker), on the left side of the Language Mode selector. You can click on the language status icon to bring up interpreter details, which you can choose to pin on the status bar by clicking the pin icon to the right of “Select Interpreter”:

Clicking on the { } marker on the bottom right on the status bar shows the selected interpreter path, an option to select another interpreter and to pin the interpreter information on the status bar.

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python and Jupyter Notebooks in VS Code. Some notable changes include:

We would also like to extend special thanks to this month’s contributors:

Try out these new improvements by downloading the Python extension and the Jupyter extension from the Marketplace, or install them directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – March 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
https://devblogs.microsoft.com/python/python-in-visual-studio-code-march-2022-release/feed/ 1
Python in Visual Studio Code – February 2022 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-february-2022-release/ https://devblogs.microsoft.com/python/python-in-visual-studio-code-february-2022-release/#comments Thu, 03 Feb 2022 20:38:23 +0000 https://devblogs.microsoft.com/python/?p=8820 We are happy to announce that the February 2022 release of the Python Extension for Visual Studio Code is now available! This release includes smart selection, better folding support, improvements to the Python interpreters list and when using Anaconda. Keep on reading to learn more!

The post Python in Visual Studio Code – February 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
We are pleased to announce that the February 2022 release of the Python Extension for Visual Studio Code is now available. This release includes:

  • Smart Selection
  • Folding support
  • Improvements to the Python interpreters list
  • Improvements when using Anaconda

If you’re interested, you can check the list of improvements in our changelog.

Smart Selection

Selecting Python code using the keyboard takes fewer key presses now thanks to Smart Selection via Pylance. This was a highly requested feature, and it takes into account your code structure and heuristics to define the selection range. You can expand your code selection with Shift + Alt + Right Arrow or ⇧ + ⌥ + Right Arrow, and shrink it with Shift + Alt + Left Arrow or ⇧ + ⌥ + Left Arrow.

Expanding and shrinking code selection with keyboard short keys for smart selection. Theme: Monokai – High Contrast

Folding support

We’ve also made improvements to folding support via Pylance. Previously, the folding regions were defined just by indentation, which was not ideal for some cases, for example, with multi-line strings as pointed out in our issue tracker. Now folding regions take into account semantic information appropriately (this includes #region comments).

You can fold regions of source code using the folding icons on the gutter between line numbers and line start. Move the mouse over the gutter and click to fold and unfold regions. Use Shift + Click or ⇧ + Click on the folding icon to fold or unfold the region and all regions inside.

Folding and expanding sections of code in the editor Theme: Horizon Extended

Improvements to the Python interpreters list

Similarly to how kernels are display in the Jupyter extension, the Python extension’s interpreters list now displays Python interpreters grouped by type to make it easier to identify them:

List of interpreters grouped by type: workspace, venv, conda, pyenv and global.

Improvements when using Anaconda

This release includes several improvements to the experience when using Anaconda environments. Previously, there would be issues when debugging files and running tools using conda environments unless VS Code was initiated in an activated conda environment. To resolve several of these issues (#5559, #11205, #11638), the Python extension is using “conda run” to execute files and tools.

There are known issues when there are special characters in file paths, or when using custom command lines arguments in VS Code (although the Anaconda team is already working on fixing it). If you experience any of these issues, we recommend you check to see if conda has been released with a fix, otherwise start VS Code (“code .” command) from an activated conda environment from an external terminal.

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:

  • Improve select folder quickpick UI in multiroot workspaces. (#18256)
  • Drop support for Python 3.6 (as it reached end-of-life in December). (#18272)

We would also like to extend special thanks to this month’s contributors:

Try out these new improvements by downloading the Python extension from the Marketplace, or install it directly from the extensions view in Visual Studio Code (Ctrl + Shift + X or ⌘ + ⇧ + X). You can learn more about Python support in Visual Studio Code in the documentation. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – February 2022 Release appeared first on Microsoft for Python Developers Blog.

]]>
https://devblogs.microsoft.com/python/python-in-visual-studio-code-february-2022-release/feed/ 1
Python in Visual Studio Code – October 2021 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-october-2021-release/ https://devblogs.microsoft.com/python/python-in-visual-studio-code-october-2021-release/#comments Thu, 07 Oct 2021 22:20:58 +0000 https://devblogs.microsoft.com/python/?p=8720 We are pleased to announce that the October 2021 release of the Python Extension for Visual Studio Code is now available. This release introduces debugging support for Jupyter Notebooks, our new Python walkthrough and an improvement to the debugging experience for Python files and projects.

The post Python in Visual Studio Code – October 2021 Release appeared first on Microsoft for Python Developers Blog.

]]>
We are pleased to announce that the October 2021 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.

In this release we closed a total of 88 issues, and it includes:

  • Debugging support for Jupyter Notebooks
  • A new Python walkthrough
  • Improvements to the debugging experience for Python files and projects

If you’re interested, you can check the full list of improvements in our changelog.

Debugging support for Jupyter Notebooks

We’re excited to announce that you can now debug your Python cells on Jupyter notebooks!

Debugging a Jupyter notebook cell

To try it out, make sure you have ipykernel v6+ installed in your selected kernel. Then set a breakpoint, select the Debug Cell command from the drop-down menu next to the play button and start inspecting your code with all the features the debugger has to offer!

New Python walkthrough

We’re excited to announce that this release includes a walkthrough with some basic set up steps to improve the getting started experience for Python in VS Code.

Python walkthrough in VS Code with basic set up steps

The walkthrough covers steps such as Python installation, selection of an interpreter for your project and how to run and debug Python files in VS Code. We hope this will be a quick and helpful guide for those learning or starting Python for the first time in VS Code!

Improvements in the debugging experience for Python projects

When working with workspaces with no launch.json configuration present, the Python extension would display a debugger configuration menu every time you would debug your Python file or project. This could be particularly annoying when debugging a web application with custom arguments (like Flask, Django or FastAPI, for example).

Now you no longer need to provide a configuration every time you start debugging, as the first selection you make is reused for the rest of the session.

Caching of Python debug configuration

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:

  • python.testing.cwd setting is no longer ignored when discovering or running tests. (#8678)
  • Upgraded to Jedi 0.18 and enabled it behind the language server protocol. Remove Jedi-related settings python.jediMemoryLimit and python.jediPath, since they are not used with the new language server implementation. (#11995)
  • Removed support for rope, ctags and pylintMinimalCheckers setting. Refactoring, syntax errors and workspace symbols are now supported via language servers. (#10440, #13321, #16063)
  • Default value of python.linting.pylintEnabled has been changed to false. (#3007)

Special thanks to this month’s contributors:

  • Anupama Nadig: Fix casing of text in unittest patterns quickpick. (#17093)
  • Erik Demaine: Improve pattern matching for shell detection on Windows. (#17426)
  • ilexei: Changed the way of searching left bracket [ in case of subsets of tests. (#17461)

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – October 2021 Release appeared first on Microsoft for Python Developers Blog.

]]>
https://devblogs.microsoft.com/python/python-in-visual-studio-code-october-2021-release/feed/ 6
Python in Visual Studio Code – August 2021 Release https://devblogs.microsoft.com/python/python-in-visual-studio-code-august-2021-release/ Fri, 06 Aug 2021 18:09:36 +0000 https://devblogs.microsoft.com/python/?p=8608 In this release we’re excited to announce a revamped Jupyter notebooks experience, as well as our new and improved way of sorting Python interpreters on the selection list. Keep on reading to learn more!

The post Python in Visual Studio Code – August 2021 Release appeared first on Microsoft for Python Developers Blog.

]]>
We are pleased to announce that the August 2021 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about  Python support in Visual Studio Code in the documentation.

This was a short release as we are now adjusting our release cadence to match that of VS Code (speaking of which, make sure to check the VS Code release notes to see what’s new for all languages!). We’re excited to announce that the revamped Jupyter notebooks experience brought by the Jupyter extension is now out of preview, and that we have an improved way of sorting Python interpreters on the selection list.

If you’re interested, you can check the list of improvements in our changelog.

Revamped Jupyter Notebooks Experience

In July 2020, we had announced the preview of the new experience for Jupyter notebooks in VS Code. We’re excited that this much faster and feature-rich experience is now out of preview and available to all users of VS Code.

New Jupyter notebooks rendering and experience in VS Code
Theme: Eva Light Bold

With this revamped experience, all the things you love about VS Code are better integrated:

  • Source control diffing: cell changes are now easier to parse and to inspect in the source control view – you can even customize what types of changes you want displayed.
  • Key-bindings: default VS Code shortcuts as well as those provided by keymap extensions (e.g. VIM) are now supported on notebook files.
  • High customization ability: customization of appearance or placement of many of the UI notebook elements – you can check all available settings by opening the Settings UI (File > Preferences > Settings and search for “Notebook”.View of a few notebook customization settings

You can learn more about Jupyter notebook support in VS Code on the documentation.

Improved sorting of Python interpreters

Previously, when running the “Python: Select Interpreter” command, the Python extension would display the list of all the Python interpreters it could find ordered alphabetically. When there are many Python environments on a machine, this often led to additional steps for interpreter selection that involved searching and a lot of scrolling. To make that process faster, we are now displaying the list of interpreters in a way so that the one you are most likely to want for your project shows first on the list and is easier to find. The order in which they are now displayed is the following:

  1. Environments located in the same path as the workspace root;
  2. Globally-installed environments (e.g. $WORK_ON or conda);
  3. Global installs (e.g. /usr/bin/python3.9)

The Python interpreters with higher versions for each of those categories are displayed first.

List of Python interpreters listed in the new sorting order

Other Changes and Enhancements

We also want to thank the following people who contributed this month to the Python extension in Visual Studio Code:

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems or have suggestions, please file an issue on the Python VS Code GitHub page.

The post Python in Visual Studio Code – August 2021 Release appeared first on Microsoft for Python Developers Blog.

]]>