PyCharm 5.0.4 update released

PyCharm 5.0.4 has been uploaded and is now available from the download page.

It also will be available soon as a patch update from within the IDE (from PyCharm 5.0.x only).

The Release Notes lists all fixes for this update.

As a recap, this minor bug update delivers the following fixes and improvements:

  • several fixes for Python 3.5 support
  • a number of fixes and small improvements for Python debugger
  • a number of fixes for SQL injections in Python code
  • a number of fixes and improvements for code insight and inspections
  • Django support fixes
  • fixes for Python formatter
  • a fix for code coverage and Python profiler
  • a bunch of platform improvements in different subsystems

Download PyСharm 5.0.4 for your platform from our website and 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 comments to this post and on twitter.

The Drive to Develop
PyCharm team

Posted in Release Announcements | Leave a comment

[Live Webinar] Polyglot PyCharm for Rich Web Front-ends Part 2, February 4

Join us Thursday, February 4, 15:00 – 16:00 GMT (10:00 AM – 11:00 AM EST) for our free live webinar, Polyglot PyCharm for Rich Web Front-ends featuring Paul Everitt.

pycharm_webinar_Polyglot_PyCharm_for_Rich_Web_Front-ends_part_2

Polyglot PyCharm for Rich Web Front-ends Part 2

Recently we published the recording of our Polyglot PyCharm for Rich Web Front-ends webinar. The webinar was a huge success and we’ve got a lot of positive feedback in the after-webinar survey.

In this second installment of Polyglot Python with PyCharm, we go further in showing PyCharm driving modern web frontend development, and how JavaScript can be used Pythonically. This session builds on the basics introduced earlier and goes deeper into new ways to develop for the browser.
Topics covered include:

  • Debugging a browser from within PyCharm
  • Test-driven development with Mocha
  • Pythonic JavaScript using Babel for ES6
  • Bundling for the browser target using Webpack

To make this webinar more effective, registrants will receive in advance the materials demonstrated.

About Paul Everitt
Paul Everitt is the PyCharm Developer Evangelist at JetBrains and a partner with Chris McDonough and Tres Seaver at Agendaless Consulting. Before that, Paul was a co-founder with Zope Corporation, taking the first open source application server through $14M of funding. Paul has bootstrapped both the PSF and the Python Software Foundation. Before that, Paul was an officer in the US Navy, starting www.navy.mil in 1993.

Space is limited, so please register now. There will be an opportunity to ask questions during the webinar. A video recording will be made available a few days later.

Keep up with the latest PyCharm news on our blog and follow us on Twitter @PyCharm.

The Drive to Develop
PyCharm team

Posted in Tutorial, Webinar | Leave a comment

PyCharm 5.0.4 EAP is Available

Today we announce the early preview build of PyCharm 5.0.4 #143.1919.1. The list of bug fixes and improvements for this build can be found in the release notes.

It’s been a while since the previous release of PyCharm 5.0.3, so PyCharm 5.0.4 EAP build 143.1919.1 consolidates a lot of fixes and improvements. Some highlights are:

  • several fixes for Python 3.5 support
  • a number of fixes and small improvements for Python debugger
  • a number of fixes for SQL injections in Python code
  • a number of fixes and improvements for code insight
  • Django support fixes
  • fixes for Python formatter
  • a fix for code coverage and Python profiler
  • and much more

See the full list of improvements in the release notes. Patch update from the previous PyCharm releases should by available shortly.

Please give PyCharm 5.0.4 EAP a try before its official release and please report any bugs and feature request to our issue tracker.

Drive to develop
-PyCharm team

Posted in Early Access Preview | 16 Comments

Introducing Getting Started with PyCharm video tutorials

Many of our users have been asking us to create a set of video tutorials covering PyCharm functionality and features. Today we’re happy to announce the very first Getting Started with PyCharm series of nine short video tutorials, covering the most essential things every PyCharm user should know first. This series is produced by Paul Everitt, PyCharm Developer Advocate at JetBrains:

The Getting Started with PyCharm playlist is available on the JetBrains Youtube Channel and soon will be available on the PyCharm website. During this short video course you’ll learn the most important features and concepts, starting from PyCharm setup and initial configuration, through creating, running and debugging your projects to productive coding tips, refactorings, testing, efficient navigation and customizing the IDE to meet your needs. The structure of the course is the following:

0. Quick Tour
1.  Setup
2. PyCharm UI and Projects
3. Running Python Code
4. Productive Coding
5. Code Navigation
6. Debugging
7. Testing
8. Customizing PyCharm

In the near future we’re going to create some additional video tutorials, that cover other important features in more details, so stay tuned. Enjoy the tutorials and please do provide us with your feedback on what features or functionality you’d like to watch in the next videos!

Drive to Develop
PyCharm team

Posted in Cool Feature, Screencast, Tutorial, Video | 6 Comments

[Webinar Recording] Polyglot PyCharm for Rich Web Front-ends

The recording of our January 12th webinar, Polyglot PyCharm for Rich Web Front-ends, is now available on JetBrains YouTube Channel. Paul Everitt’s code used in the recording along with the script for each step in the webinar can be found on GitHub.

Polyglot PyCharm for Rich Web Front-ends

Python has long been a staple of web development. In the recent world of “web apps”, though, the browser is playing a larger role. More of the application in a web app is done in JavaScript, in the “frontend”, with Python running UI-less data services in the “backend”. With its IntelliJ/WebStorm foundations, PyCharm can cover modern HTML/CSS/JS workflows. In this webinar, I’ll show building a JS MVC web app talking to a Python backend using REST, all from the perspective of a veteran Python developer.

The list of topics with timing:

00:20 Node Walkthrough
02:22 Webinar Overview
04:40 Repository for code samples
05:10 Flask ToDoMVC Starting Point
08:32 Add “Delete” Button
12:03 Packaging with npm and package.son
21:29 Tooling with aslant
31:45 Automation with npm run scripts
35:10 Move frontend out of backend with CORS
45:00 Pythonic modules with ES6, Babel, and Webpack

Note: The webinar was a huge success. We’ve got a lot of positive feedback in the after-webinar survey. As we hadn’t managed to cover all the topics declared in the webinar plan we decided to fire up another one webinar soon, which is supposed to cover “ES6 Modules with Babel and Webpack” and “Pythonic ES6” topics in more details. Stay tuned for the announcement.

Keep up with the latest PyCharm news on our blog and follow us on Twitter @PyCharm.

The Drive to Develop
– PyCharm team

Posted in Cool Feature, Screencast, Video, Webinar | 4 Comments

[Live Webinar] Polyglot PyCharm for Rich Web Front-ends, January 12

Join us Tuesday, January 12, 15:00 – 16:00 GMT (10:00 AM – 11:00 AM EST) for our free live webinar, Polyglot PyCharm for Rich Web Front-ends featuring Paul Everitt.

pycharm_webinar_Polyglot_PyCharm_for_Rich_Web_Front-ends

Polyglot PyCharm for Rich Web Front-ends
Python has long been a staple of web development. In the recent world of “web apps”, though, the browser is playing a larger role. More of the application in a web app is done in JavaScript, in the “frontend”, with Python running UI-less data services in the “backend”. With its IntelliJ/WebStorm foundations, PyCharm can cover modern HTML/CSS/JS workflows. In this webinar, I’ll show building a JS MVC web app talking to a Python backend using REST, all from the perspective of a veteran Python developer.

About Paul Everitt
Paul Everitt is the PyCharm Developer Evangelist at JetBrains and a partner with Chris McDonough and Tres Seaver at Agendaless Consulting. Before that, Paul was a co-founder with Zope Corporation, taking the first open source application server through $14M of funding. Paul has bootstrapped both the PSF and the Python Software Foundation. Before that, Paul was an officer in the US Navy, starting www.navy.mil in 1993.

Space is limited, so please register now. There will be an opportunity to ask questions during the webinar. A video recording will be made available a few days later.

Keep up with the latest PyCharm news on our blog and follow us on Twitter @PyCharm.

The Drive to Develop
PyCharm team

Posted in Webinar | 1 Comment

PyCharm 5.0.3 update released

As 2015 draws to a close and Christmas is upon us, we’re happy to announce the last release of the year, PyCharm 5.0.3.

Some notable highlights of this bug update release include:

  • a few fixes for performance problems
  • a number of fixes for Docker support
  • fixes for integrated Debugger and Profiler
  • a fix for Django project creation
  • fixes for Python inspections
  • numerous platform and web development improvements

For further details on the bug fixes and changes, please consult the release notes.
PyCharm 5.0.3 has been uploaded and is now available from the download page. It will also be available shortly as a patch update from PyCharm 5.0.2 and 5.0.3 EAP builds. As usual, please report any problem you find 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.

Wishing you Merry Christmas on behalf of the entire PyCharm team!

Posted in Release Announcements | 1 Comment

PyCharm 5.0.3 EAP is Available

Having released PyCharm 5.0.2 with a bunch of improvements and performance fixes a few days ago, today we announce the early preview build of PyCharm 5.0.3. The list of bug fixes and improvements for this build can be found here.

Some highlights of the PyCharm 5.0.3 EAP build 143.1453.1 are:

  • a few fixes for Docker support
  • fixes for integrated Debugger and Profiler
  • a fix for minor performance issues
  • a fix for Django project creation
  • numerous platform and web development improvements

Please give PyCharm 5.0.3 EAP a try before its official release and please report any bugs and feature request to our issue tracker.

-PyCharm team

Posted in Early Access Preview | 1 Comment

Using Docker in PyCharm

Modern development workflows emphasize isolation and reproducability in development and production. Docker and its platform approach to containers has become very popular. With PyCharm Professional Edition 5, Docker is now supported as a remote interpreter.

Let’s take a look at PyCharm’s Docker integration in action.

Summary

  • Get a Django-oriented Docker image pulled locally
  • Make a sample Django project
  • Create a Docker interpeter to run it
  • The Django run configuration makes a new container on start and removes it on stop

Overview

In Python, when you run an application – a Django site, a database script, etc. – you are running it in an environment. Python has some tools to manage the environment and make it reproducible, such as virtual environments, pip requirements.txt files, and setup.py dependencies. But what about the non-Python parts of application?

Containers are one solution to this. In Docker, a container is an isolated universe with software, running inside your computer. They are fast and easy to create, start, stop, and destroy. This is ideal, not just for development, but for deployment as well.

PyCharm 5 provides the beginning of a series of steps towards productive development using containers and Docker. Namely, PyCharm 5 supports project interpreters that are executed in a Docker container.

Preparation

First, make sure docker and docker-machine are setup in your environment. The Docker installation is painless and the website docs are quite friendly. You’ll need a Docker “host” virtual machine setup and running, including on Linux. On Windows and OS X, installing the Docker Toolbox is effortless.

Next, we have to decide what software we want in our containers. In Docker, containers are built using “images”: collections of pre-installed software plus configuration that is called during container creation. Unlike other interpreters in PyCharm, you don’t visit the Project Interpreter preferences to add Python packages. All dependencies need to be baked into the Docker image you choose.

This blog post is based on the minimum/docker-django-mysite Docker image, which includes enough Python/Django software to run the PyCharm-generated Django starter project. You can fetch that onto your system with this command:

Once that Docker image is locally available and the Docker “host” is running and knows about it, PyCharm can make Docker interpreters for your project, as containers based on that image.

Alternatively, you can skip this step and later pull in the image while creating the Docker-based remote interpreter by simply typing in the image name during creation.

Note: You have the option of making your own image as well, using a Dockerfile. Once you make the image, you can tell PyCharm to make Docker interpreters based on it.

Create Django Project

Let’s make a Django project, then make a Docker interpreter for it. In PyCharm, choose File -> New Project, click on Django, and follow the normal process for making a Django project.

During project creation, you’ll have to use a local interpreter. If you try to make a Docker interpreter, PyCharm will give a warning saying you can only use a local interpreter.

The result of this step is a directory on your local computer with sample Django code and a Django-specific PyCharm Run Configuration.

Make PyCharm Docker Interpreter

On to the important part. We need to define a “remote interpreter” that runs in a PyCharm Docker container.

First, go to Preferences -> Project Interpreter and click on the gear to the right of Project Interpreter near the top. In the Configure Remote Python Interpreterdialog, click the Docker button.

Click the menu dropdown for Machine Name. It will likely have one entry named default. Choose that, and you will see the following:

docker_interpreter

Choosing default gives PyCharm a way to find the Docker daemon, which can let PyCharm know which images are available locally. Hence the dropdown for Images. Click on the dropdown and choose minimum/docker-django-mysite:latest as the image, then click Ok.

You now have a Docker container that will be used as your project interpreter. PyCharm features like autocompletion, code inspections, and checks will be driven by this interpreter.

Run Django

Now that we have a Docker container for our project interpreter, let’s use our Django-flavored Run Configuration to run it. Just to be safe, edit the run configuration to make sure it is using the Docker-oriented interpreter.

What does PyCharm do when it runs this configuration:

  1. First, it creates and starts a new container based on the image we named when creating the project interpreter.
  2. This container mounts your project directory into the container at /opt/project in the container. Note: On Linux, you currently have to perform this volume mapping manually.
  3. This container also mounts volumes needed for PyCharm to do its work: Python skeletons and Python library sources.
  4. It then executes the run configuration’s Python command.

If you are running PyCharm 5.0.2 or older, there is one fix you need to do:

  • Run -> Edit Configurations and select the PyCharm-generated Djano run configuration
  • In the Host field, enter 0.0.0.0

When you click the “Run” button, Django will be started. Yay, we are running a container! In fact, we can go on to test running, debugging, code coverage, profiling, and all the other ways to run a configuration. But first, let’s click the link in the console to open the Django site in our browser:

django_admin
You can confirm this using the following Docker commands:

This shows the most recently-run container. As you can see, our minimum/docker-django-mysite-based container is currently running.

Likewise, when you click the “Stop” button in PyCharm to stop the running Django configuration, PyCharm not only stops Django, but it also stops the Docker container. In fact, it deletes the container. Each time you run, PyCharm creates a new Docker container and starts it.

You can confirm this. After re-starting the Django run configuration, type:

The value in the CONTAINER ID column, as well as the NAMES value, is different from the previous values we got from running docker ps -l.

Current Limitations

Docker integration in PyCharm is already useful, but is still only a start. Much more is being done for future releases. For example:

  • Docker Compose. This is a big item and a frequently-requested feature. The effort for this is tracked in a YouTrack ticket in the PyCharm ticket system and work is already being scheduled. Please vote and leave any comments you might have.
  • Linux mounts. As noted in the PyCharm online help, on Linux, you have to mount your project directory manually via VirtualBox. This issue is obviated by work on the next point.
  • Customizing the container. Docker lets you pass arguments when creating/running a container. These arguments include volumes to mount and ports to forward. PyCharm doesn’t currently let you customize this in the run configuration, but this is being worked on.
  • Only Django for web ports. If you want a container with HTTP (or any other) ports available, the Django run configuration is the only one, and that is only for HTTP. Other run configurations (Flask, Pyramid, etc.) won’t forward any ports. Nor will attaching to a database, or orchestrating multi-container apps (unless your Dockerfile forwards the ports.) This is really just emphasizing the previous point, and as said there, help is on its way.

Conclusion

With this release we’ve shown the beginnings of what we can do with Docker integration, and the results are promising. Docker has the potential to be a first-class part of PyCharm’s development workflow.

Posted in Cool Feature | 21 Comments

PyCharm 5.0.2 update released along with new JetBrains branding

First, we’re glad to announce the immediate availability of the PyCharm 5.0.2 release update. This update introduces a massive list of bug-fixes and changes described in detail in the Release Notes. The build is already available for download from our website.

PyCharm_400x400_Twitter_logo_whiteSecond, today is a big day for us at JetBrains as we’re rolling out new company branding. You will surely notice a number of visual changes in PyCharm 5.0.2 that have to do with this. Head also to our completely redesigned website, and read about the branding update in this blog post. PyCharm Edu also gets these changes and releases as PyCharm Edu 2.0.3.

 

The most significant fixes in PyCharm 5.0.2 include:

  • numerous visual changes according to the new company branding
  • numerous fixes for different performance issues
  • fixes for docstrings support
  • fixes for Docker and remote interpreters support
  • a number of fixes for scientific tools, including IPython Notebook, matplotlib and miniconda support
  • a few fixes for Django support
  • a number of fixes for the debugger
  • fixes for integrated test runner
  • numerous platform fixes and improvements, including UI and VCS fixes and more

As usual, please report any problems you find in our 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.

Drive to Develop!
The PyCharm Team

Posted in Release Announcements | 63 Comments