Announcing PyCharm 2016.1.1

Today we are pleased to announce the PyCharm 2016.1.1 bug-fix update. It has been uploaded and is now available from the download page. It also will be available shortly as a patch update from within the IDE (from PyCharm 2016.1 only).

Some notable highlights of this update include:

  • Fixed wrong indentation after copy-paste
  • Fixed generation of reStructuredText doc strings for methods with parameters
  • Fixed folding of custom regions
  • Fixed numerous false positives in formatted strings
  • Fixed wrong highlighting of parameters in formatted strings
  • A fix for a problem with “Gevent compatible” debugger’s mode

Fixes for various Docker Compose support problems and a fix for extra libraries indexing are currently under way and will get to the next bug update.

For further details on the bug fixes and changes, please consult the Release Notes.
As usual, please report any problem you found in the issue tracker.

If you would like to discuss your experiences with PyCharm, we look forward to your feedback in the comments to this blog post and on twitter.

The Drive to Develop
PyCharm Team

Posted in Release Announcements | 16 Comments

PyCharm 2016.1.1 EAP is available

It’s been a week since we released PyCharm 2016.1 and today we announce the early preview build of PyCharm 2016.1.1.

Some highlights of the PyCharm 2016.1.1 EAP build 145.597 are:

  • Supported Python versions changes
    • Dropped support for older Python versions before Python 3.5
    • Added preliminary support for Python 8
  • Various bug fixes
    • Fixed wrong indentation after copy-paste
    • Fixed generation of reStructuredText doc strings for methods with parameters
    • Fixed folding of custom regions

For the complete list of the changes see the release notes.

There’re other fixes that are currently under way and will hopefully get into the final PyCharm 2016.1.1 release. They’re: fixes for various Docker Compose support problems, a fix for extra libraries indexing. Stay tuned for further announcements.

We encourage you to give PyCharm 2016.1.1 EAP a try before its official release. Please change the updates channel to “Early Access Program” in the updates settings (Help|Check for updates…) to get the patch update to the EAP build from the recently released PyCharm 2016.1 or download the installer for your platform. Please report any bugs and feature request to our issue tracker.

-PyCharm team

Posted in Early Access Preview | 4 Comments

Announcing General Availability of PyCharm 2016.1

Today we bring you PyCharm 2016.1, now available for download. This is the first update in the series of releases planned for 2016. Its outstanding new features for professional Python, Web and scientific development work together smoothly to offer you a unique coding experience.

PyCharmPro2016_1_splash@2x

As usual PyCharm 2016.1 is available as a full-featured Professional Edition for Python and Web development, or as a free and open-source Community Edition for pure Python and scientific development.

Here are some notable highlights of this release.

Python-related improvements:

  • Python 2 and Python 3 type hinting and compatibility inspection
  • Docker Compose and Docker container settings
  • Tox Support
  • Improved Support for Django Forms
  • Significant debugger improvements
  • Enhanced support for IPython Notebook

Platform enhancements:

  • Git Rebase and Rename
  • Git Worktree Support
  • By-word changes highlighting in Diff Viewer
  • Enhanced Database Tools
  • Local Terminal Improvements

Web development improvements:

  • Improvements in ECMAScript 6 and TypeScript support
  • Major enhancements in Angular 2 support
  • Support for debugging asynchronous client-side code
  • Running and debugging Node.js apps on remote hosts
  • And even more

For more details please watch this short What’s New in PyCharm 2016.1 video:

Read more about what’s new in PyCharm 2016.1 on the product website and download the IDE for your platform.

New versioning
As we announced earlier, with this release we’re changing the versioning scheme and moving away from one “major” release per year to several “equal” releases per year. Also, we’re aligning releases and version numbers across all products under JetBrains Toolbox. The new versioning will follow the format “YYYY.R” where yyyy represents the year, and “r” the release within that year.

The JetBrains Team
The Drive to Develop

Posted in Release Announcements | Tagged , , , , , | 43 Comments

PyCharm 2016.1 RC2 is Available

With just a day before the official release of PyCharm 2016.1, today we’ve published the PyCharm 2016.1 RC2 build, which is already available for download and evaluation from the EAP page.

The full list of fixes and improvements for this build can be found in the release notes. The most notable fixes are:

  • a fix for an error on creating Docker Compose interpreter (PY-18854)
  • a fix for docker-compose.yml v2 support (PY-18862)
  • a fix for an exception in handling references inside formatted strings (PY-18836)

Download PyСharm 2016.1 RC2 build for your platform and please report any bugs and feature request to our Issue Tracker. It also will be available shortly as a patch update from within the IDE (from previous PyCharm 2016.1 RC only), make sure you’ve selected the Beta Releases or Public Previews channel in the update settings.

Stay tuned for a PyCharm 2016.1 release announcement and follow us on twitter.

-PyCharm Team

Posted in Early Access Preview | 1 Comment

PyCharm 2016.1 RC is Available along with New Versioning

We are now approaching the final steps towards the PyCharm 2016.1 release. So today we’ve published the PyCharm 2016.1 Release Candidate.

The PyCharm 2016.1 RC build 145.258 is available for download from the Early Access Preview page. Please take it for a spin and give us your feedback.

A week ago we announced the new versioning model for all JetBrains Toolbox products. With the upcoming release, former PyCharm 5.1 will become PyCharm 2016.1. The new versioning is aligned with releases of other JetBrains tools, following the new YYYY.R format. Please read more about new versioning in the JetBrains Toolbox—Release and Versioning Changes blog post.

PyCharm 2016.1 Release Candidate includes mostly a consolidation of bug fixes as compared to the previous PyCharm 5.1(2016.1) Beta build. For the detailed list of notable changes and improvements in this build, please check the Release Notes.

In case you missed what’s new in upcoming PyCharm 2016.1 – please see the announcement of PyCharm 5.1 Beta or for detailed information, check the announcements of previous EAP builds.

You can download the build or upgrade from within the IDE (from previous PyCharm 2016.1 Beta only) without a full re-installation using the patch-based upgrade.

We hope that there will be no major bugs, however, should you encounter any problems, please report them to YouTrack – we’ll still have a bit of time to fix stuff before the final release.

Stay tuned for a PyCharm 2016.1 release announcement and follow us on twitter.

-PyCharm team

Posted in Early Access Preview | 14 Comments

PyCharm 5.1 Beta 2 is available

Today we announce the release of PyCharm 5.1 Beta 2, an updated feature-complete preview version of the future PyCharm 2016.1. The build #145.256.43 is already available for download and evaluation from the EAP page.

Yesterday we announced the new versioning model for all JetBrains Toolbox products. With the nearest release, former PyCharm 5.1 will become PyCharm 2016.1. The new versioning will be aligned with releases of other JetBrains tools, following the new YYYY.R format. Please read more about new versioning in the JetBrains Toolbox—Release and Versioning Changes blog post.

Important note: As the versioning migration process takes some time, currently build #145.256.43 has old versioning (PyCharm 5.1 Beta) inside the build. We’re going to finally change versioning with the PyCharm 2016.1 Release Candidate which is planned for next week.

The full list of fixes and improvements for this build can be found in the release notes.

Download PyСharm 5.1 Beta 2 for your platform and please report any bugs and feature requests to our Issue Tracker. It also will be available shortly as a patch update from within the IDE (from the previous EAP build only) for those who selected the EAP or Beta Releases channels in the update settings.

Stay tuned for a PyCharm 2016.1 release announcement and follow us on Twitter.

The Drive to Develop
-PyCharm Team

Posted in Early Access Preview | 1 Comment

PyCharm 5.1 Beta is available

Today we announce the release of PyCharm 5.1 Beta, a feature-complete preview version of PyCharm 5.1.

Download PyCharm 5.1 Beta build 145.184.12 from the Early Access Preview page or as a patch-based update within the IDE (make sure to select the Beta releases or EAP channel in the update settings). After you take it for a spin, please give us your feedback.

Compared to the previous EAP build, this one includes a consolidation of fixes for various bugs and issues for recently added features, as well as a bunch of new features we hope you’ll enjoy:

Docker Compose support

Additionally to Docker container settings in run configurations (introduced in the previous EAP build), in PyCharm 5.1 Beta we introduce Docker Compose support. To get started with Docker Compose in PyCharm, make sure you’ve installed Docker Compose according to its official documentation. Then, check that the docker-compose executable is specified in PyCharm Settings | Build, Execution, Deployment | Docker:

docker1

Next, go to Settings | Project | Project Interpreter, click the gear icon to add a new remote interpreter. You’ll find the brand-new “Docker Compose” option there. All you need to do is just specify the Docker Compose configuration file (docker-compose.yml) and the service representing your project:

docker2At this stage you can also change the Docker engine settings and the Python interpreter path in the container for your service. After that, click OK and PyCharm will configure the required services and Python interpreter. From this point, autocompletion, code inspections, and checks as well as other features will be driven by the interpreter from the Docker container derived from the service description in docker-compose.yml.

Note: Currently there’s a limitation: Docker Compose files v2 are not supported. We’ll fix it before the official release of PyCharm 5.1.

Optional type hinting using run-time collected types

In one of our previous EAP builds we introduced Python 2 and Python 3 Compatible Type Hinting support:

annotate0

With this release we introduce the new experimental feature – generation of type annotations based on the run-time collected types. To use this feature, first enable run-time types collection: Go to Settings | Build, Execution, Deployment | Python Debugger. Enable “Collect run-time types information for code insight”. Next, run your application using the integrated PyCharm debugger. It will collect information about object types used in your code. After that, put the cursor to the function definition and hit Alt+Enter to get the list of the available code intentions:

annotate

Choose “Annotate types” and PyCharm will generate the type annotation based on the information on types it has collected during the debug session. This type information will be inserted in a format compatible with your project interpreter’s Python version:

annotate2

Python code compatibility inspection improvements

Writing Python 2 and Python 3 compatible code is extremely important. PyCharm helps to ensure your code is compatible with particular Python versions. Whenever your code makes use of the __future__ or six modules, PyCharm now offers to enable the “Code compatibility inspection”. If you turn on this inspection, PyCharm enables it for latest Python 2.7 and Python 3.5 by default. To modify the inspection options you can go to Settings | Editor | Inspections and find “Code compatibility inspection” in the list of Python inspections:

inspection

From this point PyCharm will check the code compatibility against two or more Python versions specified.

Improved attach to process

The debugger’s attach to process feature got a small but useful improvement. We slightly changed its UI and added the “Recent” section for recently attached processes. To attach the PyCharm’s debugger to an already-running python process, go to Run | Attach to Local Process:

attach

That’s all about new features in this build. You’re welcome to refer to the detailed release notes for more information on changes in PyCharm 5.1 Beta comparing to the previous EAP.

Here’s a recap of what’s new coming in PyCharm 5.1:

Python-related improvements:

  • Docker Compose support
  • Docker container settings in run configurations
  • Tox support
  • Improved support for Django forms
  • Stepping filters in debugger
  • Stepping over yield from and await
  • Debugger performance improvements
  • Python 2 and Python 3 Compatible Type Hinting
  • Optional type hinting using run-time collected types
  • Python code compatibility inspection improvements
  • Devpi and Optional PyPI repositories support
  • Postfix Code Completion
  • Folding for Python code blocks, collection literals, and multi-line comments
  • Improved attach to process
  • Improved rendering of Markdown, LaTeX, and HTML cells in IPython Notebook files

Platform enhancements:

  • Local Terminal Improvements
  • Support for RTL languages (Arabic and Hebrew).
  • Easier merging with Git and other VCS thanks to the added by-word difference highlighting.
  • Two new actions to help you work with Git branches, available via the Branches popup (VCS | Git | Branches): Checkout with Rebase and Rename.
  • Git worktree support and updated look and feel of Git Log.
  • Improved speed-search in the show usages popup (Ctrl(Cmd)+Alt+7).
  • and more…

Web development improvements:

  • Better coding assistance for JavaScript, ECMAScript and TypeScript
  • Unused imports warning and сode folding for ES6 imports
  • Remote run and debug for Node.js apps
  • Css custom properties
  • Code assistance in tsconfig.json, .babelrc and .eslintrc
  • Inline rename for TypeScript
  • Debugging JS async code
  • Improved support for React, Angular 1.5 and 2
  • npm support improvements and Webpack support
  • and more…

For more details about the upcoming features please see the announcements of the previous EAP builds.

Stay tuned for a PyCharm 5.1 release announcement, follow us on twitter, and develop with pleasure!

JetBrains PyCharm Team

Posted in Cool Feature, Early Access Preview | 11 Comments

PyCharm 5.1 EAP 145.61.29: Django forms, debugger stepping filters, Docker and IPython notebook improvements

Today we continue the weekly delivery of PyCharm 5.1 preview builds with the PyCharm 5.1 EAP build 145.61.29.
Download and try it today.

Let’s look at the set of valuable improvements introduced in this build.

Improved support for Django forms

Forms is one of the core concepts of the Django framework. In PyCharm 5.1 EAP we implemented advanced support for Django forms. PyCharm now understands the forms context and shows forms-specific autocompletion and suggestions in Django templates and views. For example here PyCharm suggests keys for the cleaned_data attribute:

forms1

PyCharm also infers types of the cleaned_data members:

forms2

Understanding the forms context doesn’t end with just autocompletion. You can find all usages of a form or a field in the project; refactor form or form members with Rename and other refactorings; and navigate to form definitions from templates and views with Ctrl+Click:

form3

PyCharm recognizes formsets and types of forms when iterating over a formset:

forms4

Besides simple forms and formsets, PyCharm also recognizes Django forms built upon Django models. For example here is the result of Find Usages (Alt+F7) for the “proclamation” field:

forms5

Stepping filters in debugger

Additionally to the stepping over yield from and await expressions introduced in the first PyCharm 5.1 EAP, this build adds another debugger improvement: stepping filters. By using stepping filters for Python code, you can exclude library and custom modules from stepping into during a debugging session.

To use this feature, go to Settings (Preferences for Mac users) | Build, Execution, Deployment | Debugger | Stepping. Mark the check-boxes to exclude library scripts and/or project modules from stepping into, by using the glob pattern:

stepping

Docker container settings in run configurations

In PyCharm 5.1 EAP we’ve improved Docker support with the custom parameters for running docker containers. To get started with Docker in PyCharm, read the Using Docker in PyCharm article. Once you’ve set up the remote docker interpreter, you may notice a new option in the run configuration (Run | Edit Configurations):

docker1

In the pop up dialog you can specify a different option for the container:

docker2

We believe this is a big addition for most of you and we worked hard to bring it in this EAP.

Improved rendering of Markdown, LaTeX, and HTML cells in IPython Notebook files

Thanks to the new rendering mechanism for IPython Notebook cells, PyCharm 5.1 EAP displays cells with Markdown, LaTeX and HTML content the way better than before:

ipython

In addition to the rendering improvements, PyCharm 5.1 introduces a new action to run all cells in the Notebook. Simply press Shift+F10 to run all cells in an .ipynb file.

The full list of changes from the previous EAP build is available in the Release notes.

Please take PyCharm 5.1 EAP build 145.61.29 for a spin! Should you encounter any problems, please report them to our public tracker.

You can download the build or use the patch-based upgrade to upgrade from within the IDE (from the previous PyCharm 5.1 EAP builds only) without a full re-installation. Just make sure you’ve selected the EAP channel in update settings.

Read about the features and improvements added in previous PyCharm 5.1 EAP builds:

  • PyCharm 5.1 EAP 144.4199.7: Python 2/3 compatible type hinting, Postfix completion, Terminal improvements
  • PyCharm 5.1 EAP 144.3891.17: Tox support, Devpi and Optional PyPI repositories support, Folding for Python code blocks, collection literals, and multi-line comments, Stepping over yield from and await, Debugger performance improvements.

PyCharm Team
The Drive to Develop

Posted in Early Access Preview | 3 Comments

PyCharm 5.1 EAP 144.4199.7: Python 2/3 compatible type hinting, Postfix Completion, Terminal Improvements

A week ago we announced the first PyCharm 5.1 EAP build with lots of new neat features and improvements such as Tox support, Optional PyPI repositories, Debugger performance improvements and more. Today we continue the weekly delivery of PyCharm 5.1 preview builds with the PyCharm 5.1 EAP build 144.4199.7.
Download and try it today!

Let’s look at the set of valuable improvements introduced in this build.

Python 2 and Python 3 Compatible Type Hinting

With its release half a year ago, Python 3.5 introduced type hinting to help code-writing during development. The standard that brings optional type hinting to Python is PEP 484. PyCharm fully supported this standard with the PyCharm 5 release along with the full support for other new Python 3.5 standards.

Recently an addition to PEP 484 has been proposed to make type hinting possible in Python 2/3 compatible code. The addition has been accepted and can be found in PEP 484 | Suggested syntax for Python 2.7 and straddling code. With PyCharm 5.1 we bring support for this valuable addition for both Python 2 and 3:

python27

Please read this comprehensive blog post on Python 3.5 type hinting in PyCharm 5 to get a better idea of what type hinting is in Python and why it’s important.

Postfix Code Completion

Postfix code completion helps reduce backward caret jumps as you write code. It lets you transform an already typed expression to another one based on the postfix you’ve added and the context of the expression. For example, the “.if” postfix applied to an expression wraps it with an if statement. Likewise the “.ifnn” triggers a surround template checking the expression for the not None value:

postfix

To see all the postfix templates and change their settings (for example, to disable the templates you don’t need), go to Settings → Editor → General → Postfix Templates.

Local Terminal Improvements

Embedded local terminal now supports “Find in text”. Hit Ctrl+F in the terminal and start searching in the terminal output:

terminal

Additionally the terminal now supports double-width unicode characters and is now capable of performing Alt+Backspace for deleting symbols to the left of caret position and Ctrl+Left/Right to move caret to the left or right of the current word.

The full list of changes comparing to the previous EAP build is available in the Release notes.

Please take PyCharm 5.1 EAP build 144.4199.7 for a spin! Should you encounter any problems, please report them to our public tracker.

You can download the build or use the patch-based upgrade to upgrade from within the IDE (from the previous PyCharm 5.1 EAP build only) without a full re-installation. Just make sure you’ve selected the EAP channel in update settings.

PyCharm Team
The Drive to Develop

Posted in Cool Feature, Early Access Preview | 16 Comments

Faster debugger in PyCharm 5.1

The first EAP for PyCharm 5.1 was released last week, with lots of enticing features. Here’s one that jumps out for long-time users: “Debugger performance improvements”. Let’s take a look at this in a little more depth, then provide some of the back story.

Imagine we’re debugging a semi-large code base with PyCharm 5.0.4. If we set a breakpoint and time how long it takes to get there, it measures out as 12 seconds:

debugger_speedup 5.1 pre

In PyCharm 5.1, the debugger performance has improved, especially for large code bases. Let’s give the same scenario a try:

debugger_speedup

Almost 3.5 seconds of improvement on OS X.

Wouldn’t it be great to get a couple more seconds? And now comes the real story: the new debugger has some performance improvements implemented in Cython. On OS X and Linux we need to install them manually, as the debugger console message helpfully tells us:

debugger_speedup 5.1 screenshot

Windows users get these Python speedups pre-bundled. Let’s install them on OS X by copying the text above after “Debugger speedups using Cython not found. Run…”:

debugger_speedup 5.1 install

That is, we’re running:

…using the Python in this project’s virtual environment, just to make sure we have the correct Python version. Once more, let’s measure the time to get to the breakpoint:

debugger_speedup 5.1 post

5.7 seconds! That’s a meaningful difference. As stated by the developers, the debugger is 40% faster in the general case and over 130% faster when you have the Cython modules compiled and installed. Again, if you are on Windows, you don’t need to do anything — you will get these improvements automatically for Python 2.7, Python 3.4, and Python 3.5 interpreters.

On OS X and Linux, you need to do a one-time compilation using any Python on your system matching the Python version you need, as shown in the screenshot above. For example, if you use Python 2.7 and Python 3.4, you need to run the Cython speedups with an interpreter matching those two versions. Each time you run it, a compiled speedup will be saved in your PyCharm application, for that Python version. For example, on my system, this was created:

Note the “-2.7” in the directory name. Also, note that you don’t have to do this with your virtual environment’s Python, but it certainly makes sense to do so, as you’ll be sure to match the version. You don’t have to do this once for every Python 2.7 virtual environment, as these speedups aren’t stored in the virtual environment. They are stored inside PyCharm’s pydevd helper.

Now, on to the backstory. As explained in the blog post announcing the 5.1 EAP, JetBrains joined efforts with PyDev, helping sponsor the work on pydevd which is shared by the two projects. Both projects require a sophisticated debugger backend and previously merged their work. This performance improvement is another step forward in the collaboration.
If you debug a large code base, give this EAP a try with the Cython speedups and post a comment letting us know your results. We expect performance improvements to be higher for larger code bases.

PyCharm Team
The Drive to Develop

Posted in Uncategorized | 2 Comments