Thursday, August 18, 2016

PyDev 5.2.0 released (static type declarations, debugger fixes, IPython 5 support in interactive console)

PyDev 5.2.0 is now out (for LiClipse users, it's available in LiClipse 3.1.0).

This is the first release which provides support for PEP 484 (static type declarations), which means that if you are using a static type declaration on for a parameter or method return, PyDev should be able to provide you with code completion based on that information.

As a disclaimer, I personally don't use that feature -- although I resort to putting type information on docstrings sometimes -- Python for me is about duck-typing and being a consenting adult responsible user, and type declarations don't seem to have a fit there for me... anyways, for those that think it's a good feature to have a more statically typed, Java-like structure / type system in Python, now PyDev is able to give you completions based on that information ;)

This release also has many other goodies that are noteworthy:

The debugger had a long standing issue where the variables wouldn't appear sometimes (and the user would have to re-select the stack frame for the variables to appear). In the latest release, PyDev should always show the variables properly (even if getting some variable takes time in the debugger backend). Also, when stepping over it should properly highlight in the variables view which variables changed and keep their expanded state.

The auto-indentation now better follows PEP 8, meaning that:
  • Indenting directly after {, [, ( will add one indent level.
  • Indenting after another token in a line with a {, [, ( will indent to the {, [, ( level.

Note: it's possible to restore previous indent modes (which either always indented to the parenthesis level or always indented a single level) in the Preferences > PyDev > Editor > Typing.

Another good thing is that IPython 5 is now properly supported in the interactive console (IPython 5 did some backward-incompatible changes, so, PyDev code had to be adjusted accordingly). Also, some fixes were done in the interactive console to deal with multi-line statements in Jython and dealing with multiple statements in a single line.

Those were the major noteworthy things, but not all that was done. See: http://pydev.org for more information on what else was done in this release.

And as always, thank you very much to the PyDev supporters which help on keeping the PyDev development going strong.

No comments: