Wednesday, April 12, 2017

PyDev 5.7.0: PyLint integration and Jython debugging

PyDev 5.7.0 is now out. Among the major changes in this release is a much improved PyLint integration and a fix to the debugger which prevented it from working with Jython.

The major change on the PyLint integration is that now instead of doing it as a builder within PyDev (which would act on any file changed), PyLint uses the same structure that the PyDev code analysis uses.

This means that by default it'll run only on open files (so, it will run less frequently), while still being able to ask for a full analysis on all files below a folder.

Also, using Ctrl+1 on a line with PyLint errors will provide an option to ignore the PyLint error (in the same way it could already ignore a PyDev code analysis error) and if the same error is reported by PyDev and PyLint in the same line, only the one from PyDev will be shown.

-- http://www.pydev.org/manual_adv_pylint.html has more details on the changes.

Besides this, there were improvements using the assign parameters to attributes (which will no longer add assignments already available) and when there's already a docstring available in a method, an option to update the docstring to add the missing parameters is now presented (both actions are accessible through Ctrl+1 on a function def line).

Other changes may be seen at: http://www.pydev.org, where full release notes are available.

LiClipse 3.6.0 is already out with the integrated changes.

Thank you very much to all the PyDev supporters and Patrons (http://www.patreon.com/fabioz), who help to keep PyDev moving forward!

Thursday, March 23, 2017

PyDev 5.6.0 released: faster debugger, improved type inference for super and pytest fixtures

PyDev 5.6.0 is now already available for download (and is already bundled in LiClipse 3.5.0).

There are many improvements on this version!

The major one is that the PyDev.Debugger got some attention and should now be 60%-100% faster overall -- in all supported Python versions (and that's on top of the improvements done previously).

This improvement was a nice example of trading memory vs speed (the major change done was that the debugger now has 2 new caches, one for saving whether a frame should be skipped or not and another to save whether a given line in a traced frame should be skipped or not, which enables the debugger to make much less checks on those occasions).

Also, other fixes were done in the debugger. Namely:

  • the variables are now properly displayed when the interactive console is connected to a debug session;
  • it's possible to select the Qt version for which QThreads should be patched for the debugger to work with (in preferences > PyDev > Debug > Qt Threads);
  • fixed an issue where a native Qt signal is not callable message was raised when connecting a signal to QThread.started.
  • fixed issue displaying variable (Ctrl+Shift+D) when debugging.

Note: from this version onward, the debugger will now only support Python 2.6+ (I believe there should be very few Python 2.5 users -- Python 2.6 itself stopped being supported in 2013, so, I expect this change to affect almost no one -- if someone really needs to use an older version of Python, it's always possible to get an older version of the IDE/debugger too). Also, from now on, supported versions are actually properly tested on the ci (2.6, 2.7 and 3.5 in https://travis-ci.org/fabioz/PyDev.Debugger and 2.7, 3.5 in https://ci.appveyor.com/project/fabioz/pydev-debugger).

The code-completion (Ctrl+Space) and find definition (F3) also had improvements and can now deal with the Python super (so, it's possible to get completions and go to the definition of a method declared in a superclass when using the super construct) and pytest fixtures (so, if you have a pytest fixture, you should now be able to have completions/go to its definition even if you don't add a docstring to the parameter saying its expected type).

Also, this release improved the support in third-party packages, so, coverage, pycodestyle (previously pep8.py) and autopep8 now use the latest version available. Also, PyLint was improved to use the same thread pool used in code-analysis and an issue in the Django shell was fixed when django >= 1.10.

And to finish, the preferences for running unit-tests can now be saved to the project or user settings (i.e.: preferences > PyDev > PyUnit > Save to ...) and an issue was fixed when coloring the matrix multiplication operator (which was wrongly recognized as a decorator).

Thank you very much to all the PyDev supporters and Patrons (http://www.patreon.com/fabioz), who help to keep PyDev moving forward and to JetBrains, which sponsored many of the improvements done in the PyDev.Debugger.

Tuesday, January 31, 2017

PyDev 5.5 released

The main features introduced in PyDev 5.5 are:

  • Ctrl+Shift+Alt+O allows jumping directly to the last hyperlink in the console (which means that when you have some exception on the console, it can be used to got directly to the error location without using a mouse).
  • Ctrl+2, sw switches the target and value in an assignment (but may not work properly if more than one '=' char is found in the line).
  • The code-completion which adds a local import can now be configured to add the local import to the top of the method, not only in the line above the current line (to use it, request a code-completion for some token which needs to be imported, then press tab to focus the completion pop-up and apply the completion with Shift pressed).
  • Another improvement in code-completion is that it now properly supports method chaining and provides 'value' and 'name' fields when accessing enums.

Apart from those, multiple bug-fixes are also available (in refactoring, hovering on debug, parsing nested async calls on Py3 and grouping imports).

Enjoy!

p.s.: Thank you very much to all the PyDev supporters and Patrons (http://www.patreon.com/fabioz), who help to keep PyDev moving forward.

For LiClipse users, 3.4.0 is already available with the latest PyDev.