PyCharm 2019.3

Adds interactive widgets for Jupyter notebooks and MongoDB support.
December 03, 2019 - 12:34
New Version

Features

Jupyter

  • Interactive widgets - To provide more interactivity, Jupyter notebooks support interactive controls known as interactive widgets. These controls let you turn static notebooks into interactive dashboards, allowing those who view your notebooks to customize their view. With this update, PyCharm adds support for interactive widgets. This means the widgets are rendered with the output and can be used to manipulate the notebooks just like it works with native Jupyter notebooks. The IDE now supports the most popular libraries of widgets. If you find your library is not working, please make sure to file an issue.
  • Runtime completion - One of the advantages PyCharm offers is intelligent coding assistance, made possible with the advanced static code analysis algorithms. However, for dynamic languages such as Python static code analysis is not always enough. This is why this update extends it by leveraging the runtime information provided by Jupyter itself. This results in smarter code completion in some cases such as dictionary indices or deeply-nested expressions for which the IDE couldn’t figure out the type using the static analysis.
  • Zoom in and out on the output panel - The preview’s font size can now either be set to be consistent with the editor or be customized in the settings. Also, the preview now respects the editor option `Change font size (Zoom) with Ctrl+Mouse Wheel `. When it’s enabled, you can zoom in or out in the preview using the mouse wheel while holding Ctrl.
  • Further improvements - If a Jupyter notebook is changed outside of the IDE (e.g. via the native Jupyter interface), the IDE now automatically syncs its state to make sure the IDE user sees the latest version of the notebook and no changes are lost.

Python

  • Completion for file paths - Afraid of making a typo when writing a file name? Especially with longer file names? Now you can get file path suggestions within the Python code editor or console. This release extends the context-aware code completion functionality, so string literals in file related contexts now show suggestions for possible file paths.
  • Relative import support - Do you prefer relative imports over absolute imports? PyCharm is now able to automatically convert between these styles. If you’re already importing from a certain package with a relative import, any new imports from that package will also automatically be created as relative imports.
  • Python 3.8: TypedDicts - Avoid incorrect value assignment for dictionaries by using PyCharm’s support for TypedDict. Get a precise representation for your key-value pair structures and let the code editor assist you with their proper usage.
  • Python 3.8: Literal type annotation - Do you have a method that takes a specific literal string, like the file mode for `open`? You can use Python 3.8’s `Literal` type annotation to check for not only a type, but also a specific value. PyCharm will now warn you when you call a function with an unsupported value.
  • Automatically create pytest tests - The tool to create tests automatically got an upgrade and it now supports pytest as well. With this, PyCharm allows you to automatically create pytest tests by just clicking on the Go To | Test option from the context menu of a method declaration.
  • Debugger: Size information for collections - Tracking information while debugging should be as clear and detailed as possible. This is why this version has tweaked the variables view so it now shows better-organized and comprehensive data. With this, expect new ordering, improved visual representation for scientific arrays, display of length for collections, and removal of duplicated details.
  • Further improvements - PyCharm now has integrated conversion of format for decimal values to hexadecimal or binary format straight from the console or the debugger through the variables view. Developing for Linux on Windows? This release adds support for Windows Subsystem for Linux 2. Configure your Python interpreter in PyCharm to use the one available from WSL 2.

Performance improvements

  • Faster Indexing - PyCharm can help you get your work done faster with its advanced code insight. For this to work, you need to index both your code and all the packages you import. When you use a package with compiled extensions, like many data science packages, before you can index it you need to generate Python skeletons (stub files) that describe the Python interface. This release has made improvements to this process, and you can expect the entire indexing process to be at least 25% faster. Of course, if you use the same package in multiple virtualenvs, you reuse the index you’ve already created.
  • Fewer freezes, and improved reporting of freezes - Fixed many issues that could cause UI freezes, and have now added the ability for you to immediately report a UI freeze directly from the IDE, which will make it possible to investigate why it froze, and ensure it doesn’t happen again.
  • Further improvements
    • The startup time of the core platform has been improved further in the 2019.3 versions.
    • It is now possible to change your theme without restarting the IDE. This is possible both when you choose a pre-installed theme, or right after downloading a new theme.
    • Various improvements in the processing of events and handling of ignored files have made version control status updates faster in PyCharm 2019.3.
    • Changes to how the editor is rendered, and now scrolling through a long file became a lot smoother.

Database Support

  • MongoDB support - Connect your database by adding a data source from the database tool window (View | Tool Windows | Database). PyCharm Professional Edition comes with all database features from JetBrains DataGrip, the professional SQL IDE made by JetBrains.

IDE features

  • Parameterize run configurations - When you’re making a command-line application, it’s usually convenient to be able to change the arguments quickly. Although you could always just go into `Edit Configuration` to change them, there’s a better way now: with the new run configuration macros (variables) you can have PyCharm prompt you for the value every time you start your application.
  • Find in selection - Want to know how frequently some text occurs in a section of your file? The find action is now scoped to your selection at first. Want to search everywhere? Press Ctrl-F (Cmd-F on macOS) again to expand your search to the rest of the file.
  • Further improvements - If a part of your application is written in JavaScript, there’s a good chance you’re using Handlebars templates somewhere. If you have the Handlebars plugin installed, you can now enable Handlebars code intelligence in any Python string. Just press Alt-Enter in your string, choose ‘Inject language or reference’, and type ‘Handlebars’.

Version control

  • Improved comparison with current branch - The more branches you have, the harder it gets to keep track of the difference between them. In the new version of PyCharm, the branch comparison functionality looks better and gives you a quick overview of what commits make the difference between the two branches.
  • Improved UI for cloning a repository - No matter what type of repository you use, you now have a single place to start when you want to check out a new project.
  • Further improvements - When checking out a remote branch, you usually want to create a local branch that tracks the remote branch. In PyCharm 2019.3, there’s just one ‘checkout’ action which will make sure you’ll see the current state of the remote branch, but there’s no risk of losing any of your local commits. PyCharm has always been able to push the branch you’ve currently got checked out. Sometimes, you may want to push another branch, and from now on there is no more need to check it out first.

Web development

  • CSS classes from a CDN - Do you use a stylesheet from a CDN? You can now download a version of that stylesheet specifically to use for code completion.
  • See Values Returned by Methods while Debugging JavaScript - Just like in the Python debugger, the JavaScript debugger can now show you the return values of methods you’re calling. To see the return values, click the gear icon on the debugger and enable ‘Show Return Values’.
  • Further improvements
    • Set CSS style settings to enforce single or double quotes.
    • Whether you use single or double quotes in your CSS, PyCharm can now help you keep your quotes consistent. Configure them in Settings | Editor | Code Style | Style Sheets | CSS, on the ‘Other’ tab.
    • Do you use React components that don’t have propTypes defined for them? PyCharm is now able to infer props and will give you code completion for components that don’t have propTypes defined.
Jupyter Interactive widgets

PyCharm

The Python IDE for professional developers.

PyCharm is also available in:

Got a Question?

Live Chat with our JetBrains licensing specialists now.