PyCharm 2023.2

Released: Jul 26, 2023

Atualizações na 2023.2

Recursos

Key Updates

  • Updates to Django support
    • New live templates for Django forms and models - New live templates will let you insert common code constructs for Django views, forms, and models (including admin) by typing short abbreviations. The list of live templates that can be used to quickly create Django tags in template files has also been expanded.
    • Endpoints tool window for Django - The Endpoints tool window now has dedicated 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.
  • Black formatter integration - 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 or when you save changes to your files.
  • Run Anything - This release 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.
  • AI Assistant [Limited access] - With this release, AI Assistant has been introduced. 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.

Support for QML

  • QML syntax support
    • 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 - PyCharm now uses built-in code style settings for QML code by default.

User Experience

  • Reworked Python Run/Debug Configurations dialog - The Run/Debug Configurations dialog for Python run configurations has been simplified. 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 - The Python Packages tool window is a quick and easy way to manage PyPI, Conda, or private packages for your project. In this release, 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 - To improve code readability, this release provides an option to fold complicated type hints. If you prefer reading code without type annotations, you can toggle 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 - 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 - To make function calls that contain a lot of arguments easier to read, this release provides inlay parameter name hints.
  • Type hint enhancements - With this release, PyCharm 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 - For overridden pytest fixtures, this release 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 - As it does with .j2 and .jinja2, PyCharm 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 now provides code completion for package names in dependencies and requires attributes. The IDE will also suggest installing missing packages from those attributes.
    • In this release, an option to wrap your code in parentheses when breaking lines has been introduced. This works for binary expressions, call chains, strings, and relative import statements.
    • PyCharm now 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 - You can now assign a unique color and icon to each of your projects, and you can customize the predefined colors of the headers.
  • Light theme with light header in the new UI - The user experience with the Light theme has been refined by introducing the alternate Light with Light Header option, featuring matching light colors for window headers, tooltips, and notification balloons.
  • File sorting by modification time in the Project view - Added the 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.
  • Pinned run configurations in the Run widget - To make managing multiple run configurations easier, the option to pin preferred configurations in the Run widget has been implemented.
  • Further improvements
    • The customization options for the new UI's main toolbar have been expanded. Right-click on any widget, select Add to Main Toolbar, and explore the available options.

Data Science

  • Option to 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 - 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.

Performance

  • New tool for easily generating shared indexes - PyCharm now 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.

Code Quality Workflow

  • Bundled Qodana code quality platform - In this release, the pain of configuring static analysis has been eliminated 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.

Web Development

  • Improved error formatting in JavaScript and TypeScript - In this release, 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 - PyCharm now supports CSS nesting. Syntax support has been implemented and an inspection that alerts you if the nested selector starts with an identifier or functional notation has been added.
  • Bundled OpenAPI Specifications plugin - The OpenAPI Specifications plugin is now bundled with PyCharm. 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 - 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 - 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 - 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 - 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 - 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 - 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 - This release 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 - This release introduces a new 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

  • 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 - 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.

Kubernetes

  • Support for multiple kubeconfig files within a single project - A new feature has been introduced 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.
  • 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

  • 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 - The schema migration functionality has been reworked. 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 - 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

  • 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.
  • The Big Data Tools plugin has been decomposed, 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.
  • The default value of the maximum heap size (-Xmx) has been changed to 2 GB.