What’s New in PyCharm 2022.1

Authentication Support for Custom Package Repositories, Improved TypedDict Support, and a New Services UI for Docker

In this release, we focused on polishing some features to improve PyCharm’s overall user experience and help you become more productive. We prioritized finishing some previously implemented features and making certain workflows more straightforward.

IDE

Authentication support for custom package repositories

Configure basic HTTP authentication to access custom package repositories and easily manage dependencies via PyCharm without switching to the terminal for manual installation. Go to the Python Packages tool window, click on the gear icon, click the plus sign in the dialog window, add the repository URL and select the Basic HTTP option to enter the required credentials.

New Notifications tool window

The new Notifications tool window has replaced the old Event Log tool window. As a result, helpful suggestions and relevant notifications are organized in a simpler way to ensure that you don’t miss anything important.

Support for custom type renderers

Make your debugging session quicker and easier, especially when working with large or multi-attribute objects, by customizing the display format for various objects. Refer to the documentation for more.

Further improvements:

  • Reformat your code while in LightEdit mode. Do this by going to Code | Reformat Code in the main menu or by pressing Ctrl+Alt+L.
  • PyCharm can now install Python 3 on macOS when no Python 3 executable is found.

Jupyter Support Pro

Code cells remain in Edit mode after execution

When you use Run Cell and Insert Below, the just-added cell will now default to Edit mode so you can start writing code right away. The same is true when you edit and run your current cell: it will remain in Edit mode after being executed.

Optimized cell copy-pasting

Previously, when you copied and pasted a cell while in Command mode, whether it was to reorganize your notebook or for any other reason, only the cell itself was pasted to the new position, not its output. This behavior has changed in PyCharm 2022.1.

Further improvements:

  • Support for Jupyter runtime code completion.

Editor

Enhanced code completion for TypedDict

PyCharm makes it easy to use dict literals as arguments for functions or to instantiate objects from classes where TypedDict is expected by providing code completion for the available keys.

Improved TypedDict per-key warnings

When a dictionary created as a literal or by using the dict constructor is used where TypedDict is expected, PyCharm shows per-key error messages pointing to individual values that are wrong, missing, or not expected.

Run commands from Markdown files

When working with Markdown files that contain instructions with commands to execute (README files, for example), you can run those commands directly from the file using the run icons in the gutter.

Copy code snippet for Markdown

With the new Copy code snippet in Markdown blocks, you can effortlessly copy contents to the clipboard with a single click.

Further improvements:

  • Select headers, create lists, and more with the updated Markdown editor floating toolbar.
  • The Join Lines action now also covers nested if statements.

Remote Support Pro

New Services UI for Docker

Working with Docker can become messy very quickly. We’ve significantly reworked Docker’s UI in the Services tool window to give you much clearer control of your containers, images, networks, and volumes.

Docker Registry V2 support

We’ve added support for Docker Registry HTTP API V2 to use with Docker 1.6+. You can create simple or password-protected Docker V2 registries and perform all of the usual actions like viewing, pushing, and pulling images.

Custom path to kubectl

You can manually configure a path to kubectl if it is not in the standard location. To set your custom path, go to Settings / Preferences | Build, Execution, Deployment | Kubernetes | Path to kubectl executable.

Further improvements:

  • Kubernetes: Port forwarding functionality for pods is now available.
  • Kubernetes: There is a new Describe Resource action for all resources in the Services view.
  • Kubernetes: Modifying resources loaded from the cluster can now be done from the editor tab.

Frontend and Databases Pro

Better Next.js support

Thanks to the built-in support for React, all of the key features should have already been working in your Next.js projects. PyCharm 2022.1 adds support for some framework-specific things, such as pages. PyCharm will now resolve paths used in the href property of your Link components as well as in form and other tags. Code completion, navigation, and refactorings will work, too.

Support for Volta

PyCharm now has proper integration with Volta, a JavaScript tool manager, and will automatically recognize Yarn and npm installed using Volta.

MongoDB: Editing fields in results

You can now edit the results in MongoDB collections just as easily as in relational databases, as well as edit result sets obtained via .find(). This works even when cursor methods that modify the result, such as sort() or limit(), are executed after .find().