PyCharm 2016.3.2 Released

Right before the end of the year we’d like to release our latest and greatest version of PyCharm 2016. This version resolves a few issues:

  • Jupyter Notebooks have been updated to work with the updated Jupyter Notebooks API
  • Conda environments on Windows will now automatically be activated in the terminal
  • Various improvements to the Python console
  • Docker-compose environment variable handling on macOS (TLS verify errors)
  • And various other bugs, see the release notes for details

To get this improved version, you can download it from our website. Once patch updates are ready for your platform, you’ll get a notification, so you can update from within PyCharm, by choosing Help | Check for Updates on Windows and Linux, or by choosing PyCharm | Check for Updates on macOS.

Thank you for your interest in PyCharm, and we’d like to wish you a happy and productive 2017!

-PyCharm Team
The Drive to Develop

Posted in Release Announcements | Tagged | 15 Comments

PyCharm 2017.1 Early Access Program Started

Even though PyCharm 2016.3 was only released last month, we haven’t been idle, and we have been working hard on improving PyCharm. If you want to have a sneak peek at what’s coming in the next version of PyCharm, you can download our Early Access Program (EAP) versions which we will be releasing regularly from now on until the release.

In this first EAP release for PyCharm 2017.1 we’ve included these features:

  • Zero latency typing as a default. Pavel Fatin, a developer at JetBrains, has done extensive research into editor latency. With his improvements, typing in IDEA-based IDEs (like PyCharm) is now faster than it is in editors like Atom, Sublime Text, Emacs and Notepad++.Editor latency in Linux (XML file)
  • Semantic highlighting assigns colors to function parameters so you can see at a glance where they’re being used in the function.semantic-highlighting
  • Breadcrumbs let you know where you are within your project. Very useful when you’re working with deep hierarchies.breadcrumbs
  • Better VCS log viewer: you can now search a commit using regex, and choose whether or not the search is case sensitive.vcs-log
  • Web development improvements from WebStorm: Mocha test integration and ECMAscript 6 array intentions. See the WebStorm blog for more details!

Several bugs have been fixed as well:

  • Flask extension namespaces (deprecation of flask.ext.*) [pro only]
  • Passing arguments from Tox run configuration [pro only]
  • Django test runner hanging on error creating a database [pro only]
  • BDD: Running scenario outlines separately [pro only]
  • A number of fixes for code insight and type checking
  • Hangs on live templates invocation
  • A few fixes for code refactorings
  • Show command line after running a script

We’d like to invite you to try this EAP build and to let us know how you like it. If you encounter any issues with the EAP you can report an issue on our issue tracker. You can also reach out to us by commenting on this blog post, or by tweeting us. If you’d like to let us know about a feature you’d like us to develop, please let us know as well!

Finally, we’d like to wish you a happy 2017, we hope your code in the next year will be better than ever before!

-PyCharm Team
The Drive to Develop

Posted in Early Access Preview | Tagged | 20 Comments

What’s New Webinar, Behind The Scenes

Earlier this month I did a What’s New in PyCharm 2016.3 webinar which toured the new features in 2016.3: Python 3.6, Django, web, VCS, and platform. Rather than a simple feature list, I took a different approach. We received some useful feedback, so I thought I’d write a recap and share some thoughts.

First, these webinars are really fun for me, both on the preparation and the webinar itself. But for full disclosure — it’s a surprising amount of work. Foremost, PyCharm itself is now so mature that the new features include some serious machinery. Branch coverage? If you don’t know it, you can’t cover it (pun intended). I had to spend a good bit of time learning more about coverage, profiling, and more.

I’ve recently been contributing to the arcade package for 2d Python games, so I used it as the testbed for exploring development stuff I should know, but don’t. Along the way, I came to a conclusion about webinars: I should show new features in the context of regular development, rather than a high-speed car chase through new functionality. This is something my boss Hadi Hariri has been pushing us developer advocates on: cover the why as much as the what.

I decided to show the Python features in the regular course of writing a 2d game. It meant, though, that my challenge greatly increased: I needed a sequential script that introduced disparate “What’s New” items without seeming contrived. My sequence went through a lot of throw-away-start-over cycles.

How did it go? It seemed to go well. It certainly felt more valuable — not to mention, more fun — to show “Faster VCS Log Searches” as part of regular open source project coding. The feedback seemed to agree: most of the input zeroed in on this aspect and said they liked it.

Here were some of the better suggestions on how to improve the webinar:

  • It was densely-packed, so provide the outline/transcript in advance, plus reference links.
  • Pause more during execution, to let GoToMeeting (our webinar software) lag catch up.

Our survey also asks for topics for future webinars. Some of the common themes:

  • DataGrip, our IDE-for-Databases that is bundled in PyCharm Professional. I showed a tiny bit of it and I think it blew people away.
  • More Django (in fact, it’s the next webinar)
  • Test coverage, profiling, and other core skills
  • Python for data science
  • Remote development (Vagrant, SSH, Docker, etc.)

Got other webinar ideas? Have something interesting to say and would like to do a webinar? Drop us a note in the comments, or send me an email, and let us know.

All in all, this new approach to doing What’s New webinars via actual development, instead of features-as-laundry-list, looks like a keeper. I’ll refine it to get better in the future. If you have a chance, watch the recording and let us know what you think.

Posted in Uncategorized | Leave a comment

PyCharm 2016.3.2 Release Candidate

We are pleased to announce the release candidate of PyCharm 2016.3.2, get it now from our EAP page.

In this version we’ve fixed bugs in the following areas:

  • Conda environments on Windows will now automatically be activated in the terminal
  • Various improvements to the Python console
  • Docker-compose environment variable handling on macOS (TLS verify errors)
  • And various other bugs, see the release notes for details.

We encourage you to try out this pre-release build, if you encounter any issues while using it please let us know on our issue tracker! If you’d like to suggest to us how we can make PyCharm better, please let us know on the issue tracker as well.

-PyCharm Team
The Drive to Develop

 

Posted in Early Access Preview | Leave a comment

PyCharm Edu 3.5 Early Access Program is Open

The holiday season is a great time to have fun, and it is also a great time to learn something new. That’s why today we’re opening the Early Access Program for PyCharm Edu 3.5 – the next update of our free tool for learning and teaching programming with Python.

What is Early Access Program?

We at JetBrains believe that making tools for developers involves listening carefully and responding to the opinion of everyone using our products – from students and their teachers to novice and experienced developers. The Early Access Program (EAP) allows you to try pre-release versions of our software to evaluate features that will be added in the next release. Your feedback is more than welcome, so please share it here in the comments or report issues to our tracker!

It is important to distinguish EAP from traditional pre-release software. Please note that the quality of EAP versions may at times be far below the usual beta standards. If you are looking for a stable version of PyCharm Edu, please visit our site.

Continue reading

Posted in Cool Feature, Early Access Preview | Tagged | 4 Comments

Webinar: Extending a Django App with REST Capabilities using PyCharm, January 10th

Join us January 10th at 3pm GMT (4pm European time, 10am Eastern time) for our free webinar “Extending a Django App with REST Capabilities”.

  • Tuesday January 10th
  • 16:00 European Time, 10:00 Eastern Time
  • Register here

Django REST Webinar

 

This hands-on webinar will teach you how to leverage Python and Django to extend an existing web application and add REST capabilities. The webinar begins with an overview of an existing Django application built to track notes and then dives into adding REST using the Django REST Framework. Attendees can follow along as we build the Notes web application. We will show case using PyCharm to inspect the database and test our API. We will also look at debugging the application with the powerful PyCharm debugger.

About the presenter

Calvin Hendryx-Parker is the co-founder and CTO of Six Feet Up, a Python web application development company focused on deploying content management systems, intranets and portals, as well as custom web apps using Django, Pyramid and Plone. Under Calvin’s technical leadership, Six Feet Up has served organizations like Amtrak, Eli Lilly, NASA, UCLA and the United Nations.
As an advocate of open source, Calvin is also the founder and organizer of the IndyPy meetup group and Pythology training series in Indianapolis. In 2016 Calvin was nominated for a MIRA Tech Educator of the Year Award.

Register now, and we’ll remind you when it’s about to start.

A recording of this webinar will be placed on YouTube, this will be announced on this blog and our Twitter account.

Posted in Webinar | Tagged | 6 Comments

PyCharm 2016.3.1 Released

We are happy to announce that the latest version of PyCharm is now available! You can download it now from our webpage.

In this version we’ve resolved a lot of issues:

  • If you would like to disable the automatic activation of the project’s virtualenv in terminal, you can now disable this setting in Settings | Tools | Terminal | Activate virtualenv
  • Terminal path can be configured globally
  • The terminal on macOS will source your .bash_profile upon activation
  • Django: Warnings for non-existing config files, closing tags, code intentions
  • IPython and Jupyter Notebook fixes
  • Docker: Entrypoints in docker-compose configurations, environment variables on mac, working directory issues
  • Python Console: Execute code in console (Shift+Alt+E) indentation fixed, tab completion
  • And various other bugs, see the release notes for details

If you have some great ideas about how we can make PyCharm better, please let us know on our issue tracker!

-PyCharm Team
The Drive to Develop

Posted in Release Announcements | 8 Comments

Python 3.6: A quick look

The new version of Python, version 3.6, is planned to be released on Friday December 16th. Let’s take a quick look at the new features that are included in this release, and play around with it a little.

Python 3.6 has many new cool features, like format strings, a secrets module, file system protocol, and more. If you want to read more about all features, check out python.org.

To show some of what can be done in the new language, let’s create a simple application in modern Python, and then see how we can upgrade it with Python 3.6 features.

Quick disclaimer: this post is not a full list of Python 3.6 features, if you’re interested in that, check out python.org, they have a great summary. This post shows how to actually use some of the new features to improve your programming. And we’ll show you how to use PyCharm with the new Python features.

Now that that’s out of the way, let’s have a look at the application we’ll be upgrading.

The Application

We will make a very simple single-file application, that will take a URL to a file, and download the file while simultaneously calculating the file’s sha256 checksum. If you would like to follow along, check out the GitHub repo. The master branch contains the Python 3.6 code, and the ‘python-3.5’ branch contains the Python 3.5 code.

Now let’s have a look how we can do this in Python 3.5:

The main parses the argument (the URL) and then starts the asyncio event loop. If you’ve never worked with asyncio before, check out Nick Coghlan’s introduction.

The core of the code is in the download_url function, aiohttp is used to asynchronously download the file in byte-sized chunks (set using the ‘chunk_size’ constant at the top of the file).

As every chunk is received, the sha256sum calculation is updated with the newly received chunk, and that chunk is saved to the disk.

To run the code, first install the dependencies using pip install -r requirements.txt, and then run download.py <URL>. This should result in the following output:

sha256downloader in action

So now let’s see how we can make our application better with Python 3.6 features!

Python 3.6

The first thing we can do is use those fancy new f-strings. Most Python programmers are probably aware that there are several methods in Python to insert data into a string. The classic way would be using the ‘%’ operator, which has been deprecated due to several issues (see PEP 3101). A newer method would be using either string.format class method, or the str.format instance method on a specific string.

In Python 3.6 a new notation is introduced, which combines the variables with the format string, in a way which looks similar to a templating language:

If you’re using PyCharm, it can help you convert these statements: just put your caret in the formatted string, and use Alt+Enter to select the “convert to f-string literal’ intention.

F-string conversion intention

Afterwards these statements will look like this:

Another new feature in Python 3.6 are underscores in numbers, which allows us to add an underscore to the chunk_size constant. This makes it slightly easier to read:

Currently, the download_url function isn’t looking very pretty, a fair amount of boilerplate is mixed in with the business logic. We can’t make it all go away without some serious development, but we can separate some of the flow control away from the business logic using Python 3.6 features. In Python 3.5 and earlier, using a yield statement in an async function was a SyntaxError. In the new Python version asynchronous generators are supported, so we can restructure the while True into a closure which exposes a generator.

There’s one more change that we can make to make our lives easier: we can add an annotation to the file_hash variable. If you were to type file_hash. you currently wouldn’t see any code completion due to the way that hashlib instances the object. We can help PyCharm (and any other static code analysis tool) out by adding a type annotation:

After adding the annotation (and the _sha256 import statement at the top of the document), PyCharm’s code completion works as intended:

Code completion working after adding type annotation

In this specific case it isn’t recommended to add this annotation, as the _sha256 module is annotated as a private. However, the way to add annotations is the same for all classes.

A quick note about type annotations: they don’t change anything about how the program works. If you store a number in a variable you annotate as a string, the python interpreter will just ignore your annotation. The annotations are purely for external tools that can analyze your code.

There are more features in Python 3.6, if you’d like to learn about them go to python.org.

PyCharm 2016.3 fully supports Python 3.6, so get the repo and play around. If you don’t have PyCharm 2016.3 yet, have a look and see what’s new.

-PyCharm Team
The Drive to Develop

Posted in Uncategorized | 9 Comments

PyCharm 2016.3.1 RC Available

We’re happy to announce the availability of PyCharm 2016.3.1 RC. We’ve worked hard to fix some issues some of you are facing:

  • If you would like to disable the automatic activation of the project’s virtualenv, you can now disable this setting in Settings | Tools | Terminal | Activate virtualenv
  • Terminal path can be configured globally
  • The terminal on macOS will source your bash_profile upon activation
  • HTML tags automatically close in Django templates
  • Python Console: Execute code in console (Shift+Alt+E) indentation fixed, tab completion
  • And various other bugs, see the release notes for details

Get it now from the EAP page!

Although we pay careful attention to make sure our software works well, if you experience any issues please report them on our issue tracker. If you have any ideas about how we can make PyCharm better, please let us know on our issue tracker as well!

The Drive to Develop

-PyCharm Team

Posted in Early Access Preview | 8 Comments

“What’s New in PyCharm 2016.3” Webinar Recording Available Now!

Our webinar “What’s New in PyCharm 2016.3” that we organized on Wednesday November 30th is now available on YouTube:

In this webinar Paul Everitt, PyCharm Developer Advocate, shows you around the new features in PyCharm 2016.3 (and shows some other great features that were introduced in 2016).

He discusses improvements to Django (at 1:33), web development support (at 6:07), database support (at 14:45), and more. PyCharm Professional bundles all the new functionality of the latest versions of WebStorm and DataGrip.

After introducing some of these features, he shows how to create a 2D game in Python using the Python Arcade library (from 17:26 onwards). In the process he shows how to unit test the game, profile the game, and how to debug the game faster.

If you’d like to follow along and play with the code, you can get it from Paul’s GitHub repository.

Keep up with the latest PyCharm news on this blog, and follow us on Twitter (@PyCharm)

The Drive to Develop

-PyCharm Team

Posted in Webinar | Leave a comment