What’s New in PyCharm 2022.2

Support for Python 3.11, Improved HTTP Client, and UX enhancements

Python 3.11

Code insight for exception groups and except* operator (PEP 654)

PyCharm will warn you about forbidden combinations, like except and except* operators in the same try statement, or continue, break, and return operators inside except* clauses. Trying to catch an ExceptionGroup in a try* clause will also raise a warning.

Code insight for marking individual TypedDict items as required or potentially missing (PEP 655)

Python 3.11 adds the ability to mark individual keys of TypedDict as Required or NotRequired, so there’s no need to create complex class hierarchies using the total parameter. PyCharm 2022.2 understands Required[ ] and NotRequired[ ] notations and provides code insight for them.

Initial support for Variadic Generics (PEP 646)

PyCharm 2022.2 recognizes star expressions in index operations (within brackets), and *args: *Ts in function definitions. If you’re not using Python 3.11, the IDE will remind you that variadic generics are not yet available.

HTTP Client Pro

Select a run environment before run

Now there is a convenient way to select a run environment using an icon on the gutter. To enable this feature, choose the Select Environment Before Run option from the Run with combo box.

Progress bar for the Response view

To help you track the downloading process, we’ve added a progress bar to the Response view.

Support for WebSocket endpoints in the HTTP Client

PyCharm 2022.2 supports WebSocket connections. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. PyCharm can now send queries over HTTP and WebSocket protocols out of the box. ws:// and wss:// are now delegated to the WebSocket executor.

Further improvements:

  • Support for GraphQL endpoints in the HTTP Client

    With the 2022.2 release, we’ve introduced support for GraphQL requests in the HTTP Client.


New UI for setting up remote interpreters

There is a new wizard for setting up interpreters at remote targets (WSL, SSH, Docker, Docker Compose, Vagrant). It makes the setup process more structured and easy to follow.

Run current file

To instantly run and debug a single file without a dedicated run configuration, use Run Current File, which is available from the Run/Debug widget. It features a secondary menu that offers applicable runners along with the Run with Parameters action, which lets you tune the run configuration parameters before running the file.

Code completion settings available from the code completion popup

You can now access Code Completion Settings and configure your preferences right from the kebab (three vertical dots) button in the code completion popup.

Enhanced configuration for highlighting inspections

With PyCharm 2022.2 you can configure how an inspection appears in the editor. Set it up using the new Highlighting in editor drop-down menu, which conveniently shows all available highlighting styles.

Clickable URLs in JSON, YAML, and .properties string values

JSON, YAML, and .properties files now feature automatically inserted web references inside values that start with http:// and https://. You can easily open these links in a web browser with one click, or you can generate a request in the HTTP client from the Context Actions menu (Alt + Enter).

Further improvements:

  • Cloning repository progress bar on the Welcome screen

    The Cloning repository progress bar is now shown right in the Projects list, which makes it clearer and easier to use.

  • New setting to control the insertion of automatic parentheses

    Choose whether you want the IDE to automatically insert parentheses on code completion: find the Insert parentheses automatically when applicable checkbox under Settings / Preferences | Editor | General | Code Completion.

  • New notification panel for tuning file type associations

    When your file is detected as plain text, the IDE now suggests resetting the potentially unwanted file type association right from the editor.

  • Merge All Project Windows action on macOS

    For macOS users, we’ve introduced the ability to merge all opened project windows into one, turning them into tabs. This action is available from the Window menu.

Initial support for PyScript Pro

PyScript is a framework for creating rich Python applications in the browser using HTML's interface and the power of Pyodide, WASM, and modern web technologies. PyScript provides users at every experience level with access to an expressive, easy-to-learn programming language with countless applications.

"PyScript is a key part of Anaconda’s vision of democratizing data science and Python. We are excited to see JetBrains embracing the potential of PyScript by adding initial support within their professional product."

Fabio Pliger,
Principal Software Architect at Anaconda, Inc.,
co-creator of PyScript

Code insight inside <py-script>

The <py-script> tag lets you execute multiline Python scripts and interact with the page. PyCharm 2022.2 recognizes Python syntax, including NumPy and Matplotlib libraries, for code inside <py-script> tags in HTML files and provides proper code completion and highlighting for it.

Syntax highlighting and code completion for tags and their attributes

Code completion and syntax highlighting are now available for PyScript tags such as <py-env> for declaring dependencies and <py-repl> for creating REPL components.

Support for PyScript in the built-in browser

You can preview your PyScript files directly in the PyCharm built-in browser in the same way you do for HTML files – with changes to the script displayed in the browser on each save.

Jupyter Notebooks Pro

Resizable image outputs

With PyCharm 2022.2 you can resize image outputs by simply dragging the output’s bottom border. This should improve the readability of such outputs.

For your convenience, the bottom border will be made more noticeable.

New cell copy-pasting actions on the toolbar

You will be able to cut, copy, and paste cells with the respective actions (buttons and icons) right from the Jupyter editor toolbar.

Docker Pro

Upload local Docker image to Minikube and other connections

You can now easily copy images from one Docker daemon to another using the new Copy Docker Image action that saves the image to a file and then pushes it to the chosen connection.

Docker connection options for different docker daemons

PyCharm integrates with Colima and Rancher to support more options for establishing connections to a Docker daemon.

Further improvements:

  • Docker auto-connection at IDE restart

    PyCharm 2022.2 automatically connects to Docker after you restart the IDE. This new setting is enabled by default or it can be switched in Settings / Preferences | Advanced Settings | Docker.

Database management Pro

Option to import multiple CSV files

PyCharm 2022.2 lets you import multiple CSVs into new or existing database tables. To do so, select multiple files in the Project view and drag them to a database schema or select Import to database in the context menu.

Playground and Script resolve modes

There are two resolve modes for your SQL scripts in PyCharm 2022.2. In Playground mode, objects are resolved according to the context. It is now the default for query consoles. In Script mode, the beginning of the file is resolved to the context, but any SET CURRENT SCHEMA statements in the script change the context for the resolve. Script mode is now the default for local files. To switch between the modes, just use the drop-down on the toolbar.

Further improvements:

  • Basic DB support for DuckDB, Mimer SQL, and Apache Ignite

    PyCharm 2022.2 now offers basic support for 3 additional databases: DuckDB, Mimer SQL, and Apache Ignite.

  • New Modify UI

    In PyCharm 2022.2, all of a table’s child objects can be added and edited using the new Modify UI. The old UI will remain available via the context menu.