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 for Converge360.

comments powered by Disqus


Subscribe on YouTube