What’s New in PyCharm 2023.2

PyCharm 2023.2: New Live Templates for Django, Black Formatter Integration, Run Anything, and AI Assistant

Key Updates

Updates to Django support
Pro

New live templates for Django forms and models

New live templates for Django forms and models

PyCharm 2023.2 extends the list of Django live templates. New live templates will let you insert common code constructs for Django views, forms, and models (including admin) by typing short abbreviations. You can manage them in Settings | Editor | Live Templates | Django. To edit the existing templates or create a new one, refer to the PyCharm help page.

We’ve also expanded the list of live templates that can be used to quickly create Django tags in template files. You can find the updated list via Settings | Editor | Live Templates | Django Templates.

Endpoints tool window for Django

Endpoints tool window for Django

The Endpoints tool window now has initial support for the Django REST framework. You can search for endpoint declarations, navigate to specific endpoint declarations, and rename URL path segments. While working with the HTTP Client tab, you will get code completion when modifying endpoints. Try the feature and share what functionality you would like to see added in future PyCharm releases!

Black formatter integration

Black formatter integration

PyCharm 2023.2 includes integration with the Black formatter. If you already have Black installed, PyCharm will detect it and suggest setting it up for your project.

In PyCharm, Black works with .py and .pyi files. Whole files and file fragments can both be formatted. You can run Black instead of the built-in formatter either when you reformat your code manually (by pressing Ctrl+Alt+L or selecting Code | Reformat Code from the main menu) or when you save changes to your files. Learn more about configuration options for Black on the dedicated help page.

Run Anything

Run Anything

PyCharm 2023.2 introduces Run Anything – a tool that allows you to literally run anything, no matter which file is currently open. Use it to quickly create and launch run/debug configurations, launch the Python console, manage Python packages, or run applications, scripts, commands, and tasks. To open the Run Anything popup, press Ctrl twice.

AI Assistant

AI Assistant Limited access
Pro

With this release, we introduce a major addition to PyCharm Professional – AI Assistant. With the current starting set of AI-powered features, AI Assistant offers integrated AI chat and can do things like automatically write documentation comments for you, suggest names, generate commit messages, and more.

AI Assistant is powered by the JetBrains AI service, which can connect you to OpenAI for now and will include other language model providers in the future. To access the assistant’s AI features, you’ll need to install the JetBrains AI plugin and log into the JetBrains AI service using your JetBrains Account. The availability of the JetBrains AI service may vary initially. For more information on AI Assistant and instructions on how to access it, refer to this blog post.

Support for QML
Pro

QML syntax support

QML syntax support

If you use the Qt Modeling Language (QML) in your code, you will now benefit from QML syntax support in PyCharm. This includes:

  • Code highlighting and code completion.
  • The ability to search for usages.
  • The Structure view for easier navigation in QML files.
  • The Quick Documentation popup for information about symbols.
QML formatter and other settings

QML formatter and other settings

PyCharm uses built-in code style settings for QML code by default. You can configure Qt and QML paths, qmlformat as a formatting tool, and the QML language server in Settings | Languages & Frameworks | QML.

User Experience

Reworked Python Run/Debug Configurations dialog

Reworked Python Run/Debug Configurations dialog

We simplified the Run/Debug Configurations dialog for Python run configurations. Now, once the dialog is opened, you have immediate access to the most commonly used settings. All additional settings, such as Run with Python Console, Emulate terminal in output console, and Before Launch, now reside under the Modify options menu.

Option to update packages from the Python Packages tool window

Option to update packages from the Python Packages tool window

The Python Packages tool window is a quick and easy way to manage PyPI, Conda, or private packages for your project.

In PyCharm 2023.2, you will be able to see a list of new package versions on the left-hand side of the Python Packages tool window, and if necessary, you can download and install the new versions directly from that list.

Option to collapse Python type annotations

Option to collapse Python type annotations

To improve code readability, PyCharm 2023.2 provides an option to fold complicated type hints. If you prefer reading code without type annotations, you can toggle Settings | Editor | General | Code Folding | Python | Type annotations so your projects open with type annotations folded by default. You can also use the Collapse Python Type Annotations and Expand Python Type Annotations actions to quickly move type annotations out of your way or bring them back when needed.

Text search in Search Everywhere

Text search in Search Everywhere

Search Everywhere (Double Shift) is primarily used for searching through files, classes, methods, actions, and settings. Now, text search results are displayed when there are few or no other search results available for a given query.

Code Insight

Inlay parameter name hints

Inlay parameter name hints

To make function calls that contain a lot of arguments easier to read, PyCharm 2023.2 provides inlay parameter name hints. You can set up their behavior in Settings | Editor | Inlay Hints. You can disable parameter name hints for specific methods using the Ctrl+Click shortcut.

Type hint enhancements

Type hint enhancements

PyCharm 2023.2 recognizes function calls annotated with typing.NoReturn. The IDE now provides correct information about unreachable code and potentially uninitialized variables when you call such functions.

Support for fixture override in pytest

Support for fixture override in pytest

For overridden pytest fixtures, PyCharm 2023.2 provides correct type inference, navigation, and code completion. The IDE now resolves the fixtures in the same way pytest does: by checking the fixture first inside the test class, then inside the current file and in the import statements, and finally in the nearest conftest.py file.

Enhanced support for Jinja templates

Enhanced support for Jinja templates

As it does with .j2 and .jinja2, PyCharm 2023.2 now automatically recognizes files with the .jinja file extension as Jinja templates and provides the respective syntax highlighting and code completion.

Files with composite extensions, for example Ansible templates, now have proper syntax highlighting and code completion for both the template language and the data language. Among the recognized text-based formats are .xml, .yaml, and .properties. *-playbook.yaml files are now also detected as Jinja2 files with the YAML data language.

Further improvements

  • In pyproject.toml files, PyCharm 2023.2 now provides code completion for package names in dependencies and requires attributes. The IDE will also suggest installing missing packages from those attributes.
  • In PyCharm 2023.2, we’ve introduced an option to wrap your code in parentheses when breaking lines. This works for binary expressions, call chains, strings, and relative import statements.
  • PyCharm 2023.2 provides syntax highlighting for content inside the <py-config> tag. Additionally, inside the <py-script> tag PyCharm now provides code completion for the display, Element, and Element.write elements, and it checks the types of their arguments.

User Interface

Colored project headers in the new UI

Colored project headers in the new UI

You can now assign a unique color and icon to each of your projects, and you can customize the predefined colors of the headers. To do so, right-click on a header to access the context menu. Select the Change Project Color option and choose your desired color. To disable this feature, simply deselect the Show Project Gradient option in the context menu.

Light theme with light header in the new UI

Light theme with light header in the new UI

For v2023.2, we’ve refined the user experience with the Light theme by introducing the Light with Light Header alternative, which features matching light colors for window headers, tooltips, and notification balloons.

File sorting by modification time in the Project view

File sorting by modification time in the Project view

PyCharm 2023.2 brings the long-awaited ability to arrange your files in the Project view based on their modification times. This new functionality automatically reorders the files whenever the changes in your project are saved. To enable this feature, open the kebab menu (three vertical dots) in the Project view and then select Tree Appearance | Sort by Modification Time.

Pinned run configurations in the Run widget

Pinned run configurations in the Run widget

To make managing multiple run configurations easier, we’ve implemented the option to pin preferred configurations in the Run widget. To add a run configuration to the Pinned section, open the kebab menu (three vertical dots) next to its name and select Pin. If you have multiple pinned configurations, you can easily rearrange them by dragging and dropping within the list.

Further improvements

  • We’ve expanded the customization options for the new UI’s main toolbar. Right-click on any widget, select Add to Main Toolbar, and explore the available options.

Data Science
Pro

Option to configure managed Jupyter servers

Option to configure managed Jupyter servers

With PyCharm 2023.2 you can configure managed Jupyter servers. You can specify environment variables for managed servers, configure managed servers to launch from any directory, and launch managed servers through a separate jupyter.exe file located outside of the selected Python interpreter. You can also specify additional parameters for Jupyter or JupyterLab servers.

Support for Polars DataFrames

Support for Polars DataFrames

In PyCharm 2023.2 you can work with interactive Polars tables in Jupyter notebooks. In the Python console, you can inspect Polars DataFrames via the View as DataFrame option in the Special Variables list. The Python and Jupyter debuggers both work with Polars. PyCharm will provide information about the types and dimensions of the tables, complete the names and types of the columns, and allow you to sort the tables.

Note that Polars DataFrames are not supported in Scientific mode.

Performance
Pro

New tool for easily generating shared indexes

PyCharm 2023.2 features a new command-line tool for quickly building and uploading shared indexes. It is designed to streamline teamwork and eliminate time wasted on locally indexing large projects. The new tool simplifies the process of generating shared indexes for your team, requiring just a few clicks instead of multiple scripts and services. Learn more.

Code Quality Workflow
Pro

Bundled Qodana code quality platform

Bundled Qodana code quality platform

In this release, we have eliminated the pain of configuring static analysis by fully integrating the Qodana code quality platform.

You can now trigger an analysis right from within PyCharm, view a list of problems across your entire project, and set up quality gates in your preferred CI/CD system. Furthermore, you will be able to see the server-side analysis results without even leaving PyCharm.

Qodana has just been released out of preview, and you can learn more about the release in this blog post.

Web Development
Pro

Improved error formatting in JavaScript and TypeScript

Improved error formatting in JavaScript and TypeScript

In PyCharm 2023.2, we’ve been looking at improving how we present type errors in JavaScript and TypeScript. Your errors and warnings will now be formatted in a more readable way, making it easier to spot problems in your code. This works for all TypeScript errors, some of the most common JavaScript errors, and even localized errors.

CSS nesting support

CSS nesting support

PyCharm 2023.2 now supports CSS nesting. We’ve implemented syntax support and an inspection that alerts you if the nested selector starts with an identifier or functional notation.

Bundled OpenAPI Specifications plugin

Bundled OpenAPI Specifications plugin

The OpenAPI Specifications plugin is now bundled with PyCharm 2023.2. This plugin provides support for OpenAPI and Swagger specification files. The main features include validation by JSON schema, navigation, and code generation with Swagger Codegen and OpenAPI Generator.

Redoc UI previews for OpenAPI and Swagger files

Redoc UI previews for OpenAPI and Swagger files

PyCharm now supports Redoc UI previews for OpenAPI and Swagger specification files, including YAML and JSON files, allowing you to switch between the Redoc and Swagger UIs within the IDE. With the Redocly integration, you can access the Try it console from within PyCharm and use it to set parameters and send requests to your API.

Support for editing AsyncAPI files

Support for editing AsyncAPI files

Working with the AsyncAPI specification format in PyCharm is now much easier. The IDE supports schema validation functionality and provides code completion for references, the Endpoints view, and the Editor Preview pane.

HTTP Client

gRPC requests using TLS in the HTTP Client

gRPC requests using TLS in the HTTP Client

You can now send gRPC requests over Transport Layer Security (TLS) in the HTTP Client. TLS provides encryption and authentication, ensuring the confidentiality and integrity of your data transmission. Both https:// and grpcs:// schemas are supported in the request syntax.

Support for Swagger and OpenAPI schemas in the HTTP Client

The HTTP Client is now capable of understanding Swagger and OpenAPI specifications and providing corresponding code completion options for JSON request bodies.

Support for JavaScript imports in the HTTP Client

Support for JavaScript imports in the HTTP Client

With PyCharm 2023.2, it is now possible to share common JavaScript code for HTTP Client request handlers via imported modules.

PDF and HTML previews for responses in the HTTP Client

PDF and HTML previews for responses in the HTTP Client

PyCharm is now able to display previews of PDF and HTML files right in the request results in the HTTP Client.

Support for GraphQL and WebSocket in the HTTP Client CLI

Support for GraphQL and WebSocket in the HTTP Client CLI

You can now use the HTTP Client CLI in PyCharm to interact with GraphQL APIs and establish WebSocket connections with services, for example for tests or automation scripts.

VCS

GitLab integration

GitLab integration

PyCharm 2023.2 introduces integration with GitLab to streamline your development workflow. You can now work with the Merge Request functionality right from the IDE: review the list of requests, check the changes, leave comments, and navigate to relevant views.

Option to commit specific lines of code

Option to commit specific lines of code

PyCharm 2023.2 introduces a highly anticipated feature to selectively commit specific parts of code chunks. To perform a partial commit, select the lines within a chunk and call Include these lines into commit from the context menu. The chunk will be divided into individual lines, with the selected ones highlighted. You can add or exclude lines from the selection using checkboxes or the context menu.

Docker
Pro

Preview of files inside Docker image layers

Preview of files inside Docker image layers

It is now easy to access and preview the contents of a Docker image layer in the Services tool window. Select the image from the list, select Show layers, and click Analyze image for more information. This opens a list of the files stored in the layer, from which you can easily open the selected file in the editor by right-clicking on the file and clicking Open File (or Download File for binaries).

Set Docker container to run as a Before Launch task for run configurations

Set Docker container to run as a Before Launch task for run configurations

It is now possible to set a Docker run configuration to run before another configuration by designating it as a Before Launch task. The IDE will wait for the container that is currently running to become healthy, and then it will launch the next run configuration. To put a Docker run configuration in a queue, first create it and then add it to the relevant container via Modify options | Add before launch task | Run configuration.

Kubernetes
Pro

Support for multiple kubeconfig files within a single project

Support for multiple kubeconfig files within a single project

We have introduced a new feature that allows you to set up multiple kubeconfig files within a single project. This simplifies the experience of handling multiple clusters or working with environments on different clusters in the same project. To set the files up, go to File | Settings | Build, Execution, Deployment | Kubernetes.

Ability to view deployment logs

Ability to view deployment logs

You can now view logs for deployments in Kubernetes clusters in the Services tool window. Right-click on Deployment in the tree and then select Follow Log or Download Log from the context menu.

Database Tools
Pro

Support for Redis Cluster

Support for Redis Cluster

You can now connect to Redis Cluster and have the same feature set as with standalone Redis. When connecting to a cluster, jdbc:redis:cluster: must be entered before the desired URL. Choose the appropriate connection type to achieve this. If SSH tunneling is required for the connection to the cluster, then the hosts and ports for all nodes in the cluster should be indicated in the URL.

New UI for the schema migration dialog

New UI for the schema migration dialog

For v2023.2, we’ve reworked the schema migration functionality. The main difference is that the same object is now placed on the same line in both parts of the dialog, making it easier to understand which objects are going to be added, removed, or changed in the target schema.

Time zone setting for the data editor

Time zone setting for the data editor

The Data Editor and Viewer settings page has a new Time zone field for setting the time zone in which the datetime value should be displayed.

Support for external databases and datashares in Redshift

Shared databases and their contents are now introspected. The datashares that these databases are created on are also introspected.

Other

  • With this release, we’ve introduced an LSP API for plugin developers who want to use a specific LSP server for coding assistance in the IDE. If you’ve made your own programming language or framework, you can get it supported in the IDE by creating an LSP server and a plugin. Please note that this feature is available only in the paid version of the IDE. Learn more.
  • We have decomposed the Big Data Tools plugin, allowing you to use its parts separately. This means six new plugins are available for PyCharm: Kafka, Spark, Flink, Remote File Systems, Big Data File Viewer, and Zeppelin. If you need all six, installing the umbrella Big Data Tools plugin is still possible and a convenient way to get them all in one click.
  • Starting from 2023.2, the default value of the maximum heap size (-Xmx) has been changed to 2 GB.