PyDev 4.5.3 is now available for download.
This release was done in such a short notice from the last release because a critical issue was fixed in the debugger (although it also added a few improvements to the PyUnit view, making the history dropdown show more information on the run and providing a way to export the results of a run to the clipboard, which are pretty nice).
As a note, LiClipse users (especially those using dark themes) should benefit a lot from the latest release, as it themes the trees and tables scrollbars (with the support from https://github.com/fappel/xiliary), so, it's a highly recommended download ;)
Anyways, I'll take the chance to talk about the bug which actually triggered this release (which was https://sw-brainwy.rhcloud.com/tracker/PyDev/650):
The PyDev debugger by default will monkey-patch all the calls which create a new process to automatically connect the debugger to the spawned processes if those are also Python processes -- and it also monkey-patches the os.fork to connect the forked process to the debugger.
Now, in os.fork it always connected the new process to the debugger, as it expected the new process to be a Python process, but there's a catch here: on Linux, subprocess.Popen will first fork the current process and then will do an os.execvp to replace the forked process with a new process, but in the latest version this was making the debugger crash (although it's still not 100% clear to me why that same process wasn't crashing before as the debugger already did this in previous versions -- anyways, os.execvp did some incantation under the hood which crashed when the debugger was setup when it was doing something as subprocess.Popen(['uname', '-m']), which first forked the process, connected it to the debugger and then replaced it with the uname executable).
So, the actual fix was detecting that it was forking for a subprocess.Popen and refrain from setting up the debugger if it was not executing a new Python program ;)
Enjoy!
This release was done in such a short notice from the last release because a critical issue was fixed in the debugger (although it also added a few improvements to the PyUnit view, making the history dropdown show more information on the run and providing a way to export the results of a run to the clipboard, which are pretty nice).
As a note, LiClipse users (especially those using dark themes) should benefit a lot from the latest release, as it themes the trees and tables scrollbars (with the support from https://github.com/fappel/xiliary), so, it's a highly recommended download ;)
Anyways, I'll take the chance to talk about the bug which actually triggered this release (which was https://sw-brainwy.rhcloud.com/tracker/PyDev/650):
The PyDev debugger by default will monkey-patch all the calls which create a new process to automatically connect the debugger to the spawned processes if those are also Python processes -- and it also monkey-patches the os.fork to connect the forked process to the debugger.
Now, in os.fork it always connected the new process to the debugger, as it expected the new process to be a Python process, but there's a catch here: on Linux, subprocess.Popen will first fork the current process and then will do an os.execvp to replace the forked process with a new process, but in the latest version this was making the debugger crash (although it's still not 100% clear to me why that same process wasn't crashing before as the debugger already did this in previous versions -- anyways, os.execvp did some incantation under the hood which crashed when the debugger was setup when it was doing something as subprocess.Popen(['uname', '-m']), which first forked the process, connected it to the debugger and then replaced it with the uname executable).
So, the actual fix was detecting that it was forking for a subprocess.Popen and refrain from setting up the debugger if it was not executing a new Python program ;)
Enjoy!