News

VS Code Python Tooling Gets 'Most Requested' Feature: Poetry Support

The wildly popular Python extension for Visual Studio Code is previewing support for Poetry, which eases Python packaging and dependency management.

Microsoft's post announcing the April 2021 update to the open source-based, cross-platform code editor described it as the most requested feature in the GitHub repo for Python extension for Visual Studio Code ( with more than 34.5 million installs).

Poetry in Animated Action
[Click on image for larger, animated GIF view.] Poetry in Animated Action (source: Microsoft).

As it's a preview, developers can try it out by joining the Insiders program where the latest bits are made available for the daring.

"If you're using our Insiders build, you will be able select interpreters from environments created using Poetry, as they're now automatically discovered by the Python extension," said PM Luciana de Melo e Abud. "Once you select it, you can create a new terminal to have that environment automatically activated."

Poetry will also install packages.

Also new in the April 2021 update are:

  • Improved auto-completions for PyTorch 1.8.1 (an open source machine learning library) when using Pylance, the tool's new Python language server
  • Data Viewer improvements, such as:
    • Refresh functionality without having to close and reopen the viewer
    • Support for PyTorch and TensorFlow data types
    • An "aesthetically pleasing" visual update
    • Support for data slicing, "which allows you to view any 2D slice of your higher dimensional data. If you have 3-dimensional or greater data (numpy ndarray, PyTorch Tensor or TensorFlow EagerTensor types), you will now be able to view that multi-dimensional data in the Data Viewer and a new data slicing panel will open in the Data Viewer by default."

A host of other changes and enhancements is illustrated by pull requests:

  • Deprecate format on type since it isn't used in newer Language servers. (#15709)
  • Remove notification prompt to install pylint by default (#15465)
  • Prevent mypy errors for other files showing in current file. (thanks Steve Dignam) (#10190)
  • Ensure jedi processes are terminated on language server dispose. (#15644)
  • Add a refresh icon next to interpreter list (available in the Insiders build). (#15868)

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube