Tuesday, May 28, 2013

PyDev 2.7.5 released

Just issued a new release. It's mostly a bugfix release, but there are some critical fixes there...

The major ones are:

  • A deadlock was fixed.
  • The icons are now properly in the outline (they moved places in the last release but the build file wasn't changed properly to include them).
  • When browsing the modules related to the interpreter in the PyDev Package Explorer, those were not properly opened.

And there are a couple of improvements released too (such as having the pyunit view output font use the console font, auto-formatting can be enabled just for files in the workspace, etc.).


Anonymous said...

I'm currently using Aptana Studio 3 Nightly which comes with PyDev 2.7.0. I'd love to update to PyDev 2.7.5, but do not want to uninstall Aptana Studio because it provides a bunch of other features I like. Tried to uninstall both and install Aptana without PyDev, but I always get some dependency conflicts.

I think Aptana (Accelerator) should either remove PyDev completely from its own downloads, or they should include your latest version. The current state is quite unfortunate.

Fabio Zadrozny said...

I agree with you, unfortunately, there's not much I can do about it. You should contact Appcelerator directly for that.

Best Regards,


Unknown said...

Firstly, thanks for such a nice Python plugin. I've used PyDev for quite a few things, and this plugin with the integration with PyUnit is very useful.

I'm trying to write a plugin that will involve listening for PyUnit tests. Would you know how to be able to trigger an action after PyUnit tests have finished running? I've tried importing PydevPlugin and calling PydevPlugin.getDefault().addTestListener(), but addTestListener is not defined for PydevPlugin (although I've seen some pages on the web that say PydevPlugin.java has that function like here: http://eclipse-pydev.sourcearchive.com/documentation/1.0.3-1ubuntu1/PydevPlugin_8java-source.html). Is there another way to do it?


Fabio Zadrozny said...

Hi Timothy,

You're looking at an ancient version of PyDev. For up-to-date versions, you can check the code at: https://github.com/fabioz/Pydev

Now, I've taken a look at the current implementation and it does not provide a hook for you.

Right now, on org.python.pydev.debug.ui.launching.PythonRunner.run(PythonRunnerConfig, ILaunch, IProgressMonitor), it creates a PyUnitServer (which is the object you'd like to add a listener to -- its interface is: org.python.pydev.debug.pyunit.IPyUnitServer) but registers it directly to the PyUnit view.

After taking a look at it, I added a way for you to listen to it (see org.python.pydev.debug.ui.launching.PythonRunner.onPyUnitServerCreated). Note that this is still not on a build... if you try tomorrow, it'll be in the nightly build -- if you want, you can get the code and build locally (this is on the development branch -- see: http://pydev.org/developers.html for getting the code and running it there).

Unknown said...

I will wait for a nightly build. I did pull down the latest code from Git and saw the comment on how to create an ICallbackListener in PythonRunner - that was very helpful. I'll let you know how it goes once I get the nightly build with this change.

Thanks for the support - it is very much appreciated.

Unknown said...

That worked!

Two more questions:
I also needed to know the final result of all the unit tests (whether 1 or more failed or all passed). I did this by doing a string comparison on arg0 of the overridden "notifyTest" function in the ICallbackListener call function. If any of them said "fail", that means at least one unit test failed. Otherwise, all unit tests passed.

I think that achieves my purpose, but is there any way for me to get the PyUnitTestResult within the ICallbackListener? If not, that's fine - this definitely works; it just may not be as efficient as it could be. It also has the potential to break if a unit test failure prints out text that doesn't include the word "fail" in it in a future version of PyDev.

Also, will these code changes be in the next major release of PyDev, and do you know when that next revision will be released (or generally when non-nightly revisions get released)?

Thanks again for your support. It was really quick and definitely helped a lot.

Fabio Zadrozny said...

You should fail whenever the status is different from "ok".

See: org.python.pydev.debug.pyunit.PyUnitTestResult.isOk() for the reference (that's very unlike to change).

There's no real API to get the test result... if you feel there should be and envision one, please provide a pull request -- it'll definitely be well received :)

Unknown said...

I'll stick with checking for not "ok" - the test result is not explicitly required. Thanks again for your help.

Anonymous said...

i've eclipse 3.8 installed (ubuntu 13.04 64bit) and installed pydev 2.7.5 from pydev.org. How do i get the django template editor running in this setup?


Unknown said...

In looking at the code coverage files, there doesn't seem to be any public way through code that can set the files to get coverage for and to view the coverage results - is this correct? If so, would you be open to allowing some of those methods to be public in order for other plug-ins to be able to use that coverage information?

Thanks for your input,

Fabio Zadrozny said...

Regarding the Django templates editor, for now you have to choose between aptana studio which has a django templates editor (but with an old version of PyDev) or within getting a newer version of PyDev.

I'm on the process of creating an improved Django Templates Editor, that does not rely on Aptana Studio 3, but it's still not available.

Fabio Zadrozny said...

Hi Tim,

Yes, the whole process is mostly self-contained.

The coverage will read all the coverage files under the dir provided by org.python.pydev.debug.codecoverage.PyCoverage.getCoverageDirLocation() (so, it's not a single coverage file).

You could just create your coverage files there... Still, if you'd like to provide a pull request to provide a different dir to be analyzed, I think that should be OK.



p.s.: I'm curious on what you're doing with PyDev... can you share info on that?

Anonymous said...

Is the latest PyDev compatible with Eclipse Kepler (4.3) which has just been released? The PyDev documentation only refers to 4.2.

Fabio Zadrozny said...

Yes, it should be compatible with 4.3.

Unknown said...

I'm creating a TDD compliance plug-in for Python in Eclipse. That's why I needed a unit test listener - I needed to know when unit tests were run and the result - whether they all passed or at least one unit test failed. Now knowing whether or not I have 100% test coverage would be extremely helpful in knowing whether the developer is keeping in line with TDD principles or not. For example, if a developer runs unit tests with 100% coverage, modified production code, then ran unit tests with < 100% coverage, they didn't add unit tests first, and they aren't being compliant with TDD principles.

Fabio Zadrozny said...

Nice :)

Anonymous said...

any plan to implement sending control-c (break) to python interpreter in python console?

any plan to implement persistent python console history? (i.e. history across python console session.)

yorua007 said...

PyDev is a awesome Python plugin.Does it support function parameter hints? see

Jonathan said...

I have been using this plugin for a few months and recently, Google changed the App Engine code and I can no longer use PyDev as a Debugger. Have you guys heard of this? If so, do you know when a fix will be planned?

Thanks and keep up the great work.


Fabio Zadrozny said...

Anonymous: Regarding Ctrl+C there are no plans (this is something to be added at Eclipse itself, not on PyDev).

yorua007: answered you there

Jonathan: This is a known issue: please keep track of: https://sw-brainwy.rhcloud.com/tracker/PyDev/129 (there's still no due date, but it's high on the priority list).

Lidia said...

Where can I found the source code for this release 2.7.5.
I namely need the plugin org.python.pydev.refactoring 2.7.5 .
Thank you

Fabio Zadrozny said...

Code for PyDev is available at github: https://github.com/fabioz/Pydev/

There should be a tag for the release you want.

Lidia said...

Hello Fabio,
Are you updating the current releases?
I have found a small fix for release 2.7.5 and would like to contribute with it.

Is there any possibility that after this change will be checked and reviewed, you will update the download link with improved release
Also I am looking for the repository/branch for 2.7.5.
Thank you
Thank you

Fabio Zadrozny said...

There is a tag for it:


As for updating an existing release, at this point, I'd be supporting PyDev 2.8.x with critical releases (as that's the latest version that supports java versions < 7) and everything else should be on the latest version.

So, ideally it'd be better if your fix would go into the mainline (in the latest release). Otherwise you'd have to support that fork there -- or have some kind of corporate sponsorship for PyDev to add work based on an older version.

Lidia said...

Thank you for your quick reply Fabio.

I have found the source codes for the older pydev plugin versions, thank you.

If the plugin pydev versions are not related with python interpretor version (I am not a python developer, and I'm not so familiar with it), we can also switch to version 2.8.x.

I am confused, are you supporting the pydev version 2.8.x (for java 6) or you have a repo only for the next release 3.2.0.?

If yes, where can I push my changes for 2.8.x?
Thank you in advance

Fabio Zadrozny said...

Code for PyDev 2 is in the same repository (but under the branch development_pydev2).

See: https://github.com/fabioz/Pydev/tree/development_pydev2



p.s.: This blog isn't the appropriate place for this discussion. Please join/ask in the pydev-code mailing list if you have more questions about it (see the link at http://pydev.org/about.html)