We’re excited to announce the December 2023 release of the Python and Jupyter extensions for Visual Studio Code!
This release includes the following announcements:
- Configurable debugging options added to Run button menu
- Show Type Hierarchy with Pylance
- Deactivate command support for automatically activated virtual environments in the terminal
- Setting to turn REPL Smart Send on/off and a message when it is unsupported
If you’re interested, you can check the full list of improvements in our changelogs for the Python, Jupyter and Pylance extensions.
Configurable debugging options added to Run button menu
The Python Debugger extension now has configurable debug options under the Run button menu. When you select Python Debugger: Debug using launch.json and there is an existing launch.json
in your workspace, it shows all available debug configurations you can pick to start the debugger. In the case you do not have an existing launch.json
, you will be prompted to select a debug configuration template to create a launch.json
file for your Python application, and then can run your application using this configuration.
Show Type Hierarchy with Pylance
You can now more conveniently explore and navigate through your Python projects’ types relationships when using Pylance. This can be helpful when working with large codebases with complex type relationships.
When you right-click on a symbol, you can select Show Type Hierarchy to open the type hierarchy view. From there you can navigate through the symbol’s subtypes as well as super-types.
Deactivate command support for automatically activated virtual environments in the terminal
The Python extension has a new activation mechanism that activates the selected environment in your default terminal without running any explicit activation commands. This is currently behind an experimental flag and can be enabled through the following User setting: "python.experiments.optInto": ["pythonTerminalEnvVarActivation"]
as mentioned in our August 2023 release notes.
However, one problem with this activation mechanism is that it didn’t support the deactivate
command because there is no inherent activation script. We received feedback that this is an important part of some users’ workflow, so we have added support for deactivate
when the selected default terminal is PowerShell or Command Prompt. We plan to add support for additional terminals in the future.
Setting to turn REPL Smart Send on/off and a message when it is unsupported
When attempting to use Smart Send via kbstyle(Shift+Enter)
on a Python file that contains unsupported Python code (e.g., Python 2 source code), there is now a warning message and a setting to deactivate REPL Smart Send. Users are also able to change their user and workspace specific behavior for REPL Smart Send via the python.REPL.enableREPLSmartSend
setting.
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 Pylance extension has adjusted its release cadence to monthly stable releases and nightly pre-release builds, similar to the Python extension release cadence. These changes will allow for more extensive testing on stable builds and a more reliable user experience.
- String inputs for numerical values are now supported in attach debug configurations with the Python Debugger extension (@vscode-python-debugger#115).
- The Python test adapter rewrite experiment has been rolled out to 100% of users. For the time being, you can opt-out by adding
"python.experiments.optOutFrom" : "pythonTestAdapter"
in yoursettings.json
, but we will soon drop this experimental flag and adopt this new architecture.
We would also like to extend special thanks to this month’s contributors:
- @zyxue Make version extraction more robust in vscode-black-formatter#306
- @loskutov Fixed mis-escaped string literal in vscode-black-formatter#312
- @bhagya-98 Improve setting description for default interpreter setting in vscode-black-formatter#324
- @Kelly-LC Remove Python 3.7 from test actions in vscode-black-formatter#322
- @aarushinair Update dependency packages in vscode-black-formatter#326
- @mvasilkov Fixed typo in README.md in vscode-black-formatter#358
- @kirankumarmanku Added workaround and early returning if file name matched excluded arg in vscode-autopep8#142
- @norasoliman Remove Python 3.7 from test actions in vscode-autopep8#165
- @wuyumin Fix config file setting in README.md in vscode-autopep8#156
- @vinitaparasrampuria Capitalize Python in README.md and settings description in vscode-autopep8#167
- @JamzumSum Improved shell identifier on case-insensitive system in vscode-python#22391
- @trysten Add consoleTitle to launch.json properties schema in vscode-python#22406
- @shanesaravia Resolve test suite discovery import errors due to path ordering in vscode-python#22454
- @johnhany97 Pass along Python interpreter to jedi-language-server in vscode-python#22466
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.
Thank you for the summary.
Just FYI, the link to the Jupyter extension change log https://github.com/microsoft/vscode-jupyter/blob/main/CHANGELOG.md says it has been deprecated.
Best regards,
-Witalij