Great news: Today we’ve released PyCharm 2016.3 Public Preview, marking the feature freeze for the next major release planned for this fall.
Everyone is very welcome to download and try its new features, bug fixes and other important improvements. As usual, we’re eager to hear your feedback on it in comments to this post or in our public issue tracker.
The release of PyCharm 2016.3 Public Preview indicates that PyCharm 2016.3 has entered the Beta phase. It’s now feature complete and we won’t be adding any new features, but focusing on polishing the existing functionality.
Let’s take a closer look at what’s coming in PyCharm 2016.3:
Python 3.6 support
PyCharm 2016.3 will come with the following support for the latest Python 3.6:
PEP 526: Syntax for variable annotations: PyCharm now recognizes the new syntax and uses this meta information about types for type inference. Ultimately this positively affects code completion, inspections and error checking. Additionally we’ve added a special code intention (invoked with Alt+Enter) to automatically convert comment-based type hints to variable annotations syntax.
PEP 498: Formatted string literals: Basic support for f-strings recognizes their syntax and provides code completion inside them for replacement fields surrounded by curly braces. A special code intention (invoked with Alt+Enter on a code statement) automatically converts %-formatted strings and str.format() into formatted string literals:
PEP 515: Underscores in numeric literals: This PEP extends Python’s syntax and number-from-string constructors so that underscores can be used as visual separators for digit grouping purposes in integral, floating-point and complex number literals.
PEP 525 and PEP 530: These 2 standards introduce asynchronous generators and comprehensions. PyCharm provides code inspections for them and uses them for type inference.
Additional support for new PEPs now includes code injections for annotations inside function type comments. That means PyCharm recognizes the syntax and provides highlighting for type hints specified in comments, checks them for errors, provides quick-fixes and monitors that all hints used are properly imported from the typing module. That makes it easier and safer to use type annotations in your code.
Dango support has been enhanced in many ways:
- Django projects Run/Debug on a remote machine: With PyCharm 2016.3 you can create a new project setting it up for running and debugging on a remote machine without need of having any local interpreter on your development machine. All you need is to specify a remote interpreter on the Django project creation stage.
- We’ve implemented code completion for Django forms in class-based views. PyCharm now understands the forms context in class-based views and shows forms-specific autocompletion and suggestions in the same way it’s done for function-based views.
- Pycharm 2016.3 supports the new syntax for TEMPLATES first introduced in Django 1.8:
- New projects are now created using the latest format
- Template dirs and template app dirs are loaded in the way it works in Django 1.8 (from TEMPLATES)
- Code completion is provided for all template dict keys, options and context_processors
Better handling of multi-line commands in Python console
Thanks to our active user Yuli Fiterman for his generous help and valuable code contributions, together we’ve fixed a bunch of bugs related to multi-line commands in Python console. IPython console got some improvements as well.
Enhanced Variable Explorer
The brand-new Simplified Variables View option is enabled by default and hides all dunder variables, instances of function, classobj and module under a separate group named “Special Variables” in the Variables Explorer. Additionally, if an IPython-powered interpreter is used in the debug mode, all the utility IPython variables are moved to this group as well:
For variables with long values such as numpy arrays or pandas dataframes, you can notice the special new “View as…” hyperlink in the variables explorer. Click it to view a value in a separate popup viewer:
Docker Compose Integration
On the Docker Compose integration side we’ve made a couple of neat improvements:
- Now it’s possible to specify multiple Compose files when defining a Docker Compose-based python interpreter for your project to extend an entire Compose file. Previously you could only specify a directory or a specific Compose file in Docker Compose interpreter configuration. Now, in PyCharm 2016.3 you can specify a particular Compose file and extend it with additional overriding configurations.
Note: Using multiple Compose files enables you to customize a Compose application for different environments or different workflows.
- Some Compose files can contain variables that are substituted with corresponding environment variables on docker-compose execution. PyCharm 2016.3 provides a convenient way to specify the environment variables right in the Docker Compose interpreter configuration dialog as shown on the screenshot above.
Venv Activation in Terminal
The virtual environment associated with the current project you’re working on is now activated by default when opening PyCharm’s embedded terminal. Auto venv activation is supported for bash, zsh, fish or Windows CMD. You can specify or alter the shell of your preference in Settings (Preferences) | Tools | Terminal.
Branch coverage support
With PyCharm 2016.3 we bring you improved code coverage tool integration. We’ve added a new “Branch coverage” option, which is disabled by default, but can be easily enabled in Settings (Preferences) | Build, Execution, Deployment | Coverage | Python coverage. When this option is enabled, PyCharm adds additional information to pure line coverage reports, marking the coverage of lines with conditional statements as incomplete in case one or more branches haven’t been executed.
Line profiling with vmprof
We’ve implemented integration with VMprof in PyCharm 2016.2. With this new release we take another step forward towards productive profiling, with support for the “profile lines” option available for VMprof. This option is enabled by default when you run your project in the profiling mode. Once statistics is gathered, apart from just seeing the standard profiler report, call graph and call tree, you can also see the line profiling results right in the editor in the left gutter. Lines consuming more processor time are marked in red. To use this functionality, you just need to install the vmprof package on your interpreter with the package manager.
Version Control Improvements
- Undo commit and delete/restore tracked branch actions
- Sign-off commits and file scope highlighting
- Enhanced Log for Git & Mercurial
- Auto resolve for versioning conflicts
- Managing Git remotes
- and more
Platform and UI changes
- Improved find in path dialog
- New flat file icons
- Font improvements including the new default San Francisco font for Mac OS
Web-related improvements in PyCharm 2016.3 Public Preview include:
- Smarter Rename for TypeScript
- Angular CLI
- Grouped files in Project view
- Destructuring assignments for ECMAScript 6
- Integration with Flow
- Using Docker with Node.js apps
- Enhanced coding assistance for Angular 2
- New React projects with Create React App
- TypeScript support improvements
PyCharm incorporates most of the new functionality of the upcoming WebStorm 2016.3. Feel free to learn more about what’s coming from WebStorm 2016.3.
Database tool improvements
In PyCharm 2016.3 Public Preview you can find various Database tool enhancements, which come from DataGrip, the JetBrains database IDE. PyCharm incorporates all the new features of DataGrip:
- Database Driver management
- Edit several fields at once in the Table Editor
- Bulk submit changes
- Renaming views
- XML extractor
- and more
Your PyCharm Team
The Drive to Develop