Saturday, February 27, 2021

PyDev 8.2.0 released (external linters, Flake8, path mappings, ...)

 PyDev 8.2.0 is now available for download.

This release has many improvements for dealing with external linters.

The main ones are the inclusion of support for the Flake8 linter as well as using a single linter call for analyzing a directory, so, that should be much faster now (previously it called external linters once for each file) .

Note: to request code analysis for all the contents below a folder, right-click it and choose PyDev > Code analysis:

Another change is that comments are now added to the line indentation... 

This means that some code as:

  def method():  
     if True:  
         pass

Will become:

  def method():  
     # if True:  
         # pass

p.s.: it's possible to revert to the old behavior by changing the preferences at PyDev > Editor > Code Style > Comments. 

Also note that after some feedback, on the next release an option to format such as the code below will also be added (and will probably be made the default):

  def method():  
     # if True:  
     #     pass

Interpreter configuration also got a revamp:

So, it's possible to set a given interpreter to be the default one and if you work with conda, select Choose from Conda to select one of your conda environments and configure it in PyDev.

Path mappings for remote debugging can now (finally) be configured from within PyDev itself, so, changing environment variables is no longer needed for that:

 

Note that Add path mappings template entry may be clicked multiple times to add multiple entries.

That's it... More details may be found at: http://pydev.org.

Hope you enjoy the release 😊


Tuesday, December 08, 2020

PyDev 8.1.0 released (Python 3.9, Code analysis, f-string quick-fixes)

 PyDev 8.1.0 is now available for download.

As a note, I didn't really create a post on 8.0.1, so, I'm covering some of the features in that version in this blog post too! 😊

Some nice things added: 

  • Python 3.9 is officially supported in PyDev -- definitely a must if you plan on using Python 3.9!
  • There are quick-fixes (Ctrl+1) to convert a string into an f-string (see image below):


Note that even if there's no formatting in the string, with this it's possible to write some string as: "Value is {value}" and then use the quick fix just to add the "f" to the front of the string (which is quite handy if you weren't initially planning to create it as an f-string).

  • When starting the interactive console, it's now possible to save how the interactive console should be initialized (see image below):

Note that it's also possible to change those settings in the interactive console preferences if you want to change them after the initial selection (hint: after the interactive console is created it's possible to use F2 to send a line from the editor for execution to the interactive console for notebook-like evaluation).

Besides this there are many other improvements, such as improved conda activation, rerunning pytest parametrized tests from the PyUnit view, MyPy integration improvements, support for from __future__ import annotations in code analysis and debugger improvements, among many others.. see: https://pydev.org for more details.

Enjoy!



Tuesday, September 15, 2020

PyDev 8.0 released (17 years of PyDev, typing support, MyPy and Debugger)

Wow, PyDev is turning 8.0... the 8.0 version probably doesn't do much justice as it's actually being developed for 17 years already! 😊

I'm actually pretty happy on how things are working around it right now... Some interesting points:

  • Many users now support PyDev through Patreon or PayPal -- so, it's been a while since I spent time to do a dedicated crowdfunding campaign (which usually demands quite a bit of time). That funding also allows having additional help (it's what currently sponsors the work of Luis Cabral in PyDev).
  • It has a good amount of users (although it doesn't have as much users as it did in the past as there are many good Python IDEs available in the Python ecosystem now) -- I'm actually quite happy with this as for some time it seems like Eclipse had such a big market share that users that didn't like it had to bear with it, so, I'm pretty glad that there are alternatives now, even if it means its market share isn't as big as at was -- so, although this may mean less users it also means happier users.
sidenote: it's hard to actually get the real usage stats because telemetry is not baked into PyDev -- there are individual file download counts in Bintray (which generously hosts the PyDev update site) and Sourceforge (which summed currently put it around 32k downloads/month)... anyways, I'm always a bit skeptical of download stats, so, I currently define success based on the number of supporters in Patreon/PayPal and LiClipse licenses (all of which are at an all time high 😊) than the raw number of downloads.
 
sidenote 2: I've never really lived from the PyDev income (I worked many years doing scientific computing in Python and nowadays I'm onto consulting) -- at this point it'd probably be in the Ramen profitable stage, but there's an interesting dichotomy in that if I lived only from it I wouldn't be able to dogfood it as much as I do now as it's a Python IDE done in Java (so, I'm happy in having it as a side hustle), but it's good that it got to a point where I can have additional help to do it (my time is definitely very limited nowadays, compared to 17 years ago when I started working on it).

Ok, on to news on the PyDev 8.0 release...

As with the previous release, this release keeps on improving the support for type hinting and MyPy.

On the MyPy front, besides showing an error it will also show the related notes for a message on the tooltip (which would previously be available only in the output view) and MyPy processes are no longer launched in parallel when using the same cache folder (as this could end up making MyPy write wrong caches which required the cache folder to be manually erased).

In the type inference front there are multiple improvements to take advantage of type hints (such as support for Optional[] in code completion, handle types given as string and following type hints when presenting an option to create a new method in a class).

The debugger had a critical fix on the frame-evaluation mode (the mode which works by adding programmatic breakpoints by manipulating bytecode) which could make it skip breakpoints or even change the behavior of a program in extreme cases.

Besides this, other niceties such as code-completion inside f-strings are now available and this release had many other fixes (see: https://www.pydev.org for more details).

 So, thank you to all PyDev users and here's to the next 17 years, hope you enjoy using it as much as I enjoy making it!

🥂

Sunday, August 02, 2020

PyDev 7.7.0 released (mypy integration improvements, namespace packages)

This release brings multiple improvements for dealing with type hints as well as improvements in the Mypy integration in PyDev:

The MYPYPATH can now be set automatically to the source folders set on PyDev and the --follow-imports flag is set to silent by default (this flag is required because only one file is analyzed at a time in PyDev as failing to do so would end up showing errors for other files).



Personally, I think that with Python 3.8 it's finally possible to actually use Python type hints properly (due to the typing.Protocol -- a.k.a Duck typing -- support), so, more improvements are expected in that front on PyDev itself.

This release also brings many other improvements, such as support for pip-installed namespace packages, debugger fixes, support for parsing with the latest version of Cython and support for the latest PyTest.

There are actually many other minor improvements and bug-fixes in this release too. Check the release notes at http://www.pydev.org/ for more details!

Acknowledgements

Thanks to Luis Cabral, who is now helping in the project for doing many of those improvements (and to the Patrons at https://www.patreon.com/fabioz which enabled it to happen).

Thanks for Microsoft for sponsoring the debugger improvements, which are also available in Python in Visual Studio and the Python Extension for Visual Studio Code.

Enjoy!

--
Fabio