You’re reading about GL O.B.S. after *exactly* 730 days (I swear it was not made on purpose ;-)): today revision 50 has been committed.
No new feature has been added, I’ve dedicated the efforts of the last days to a case study about updating an application after a very long time, the process mainly involved removing deprecated things and adding support for new ones.
Let’s read together some lines from the revision log:
- GUI migrated from libglade to GtkBuilder
This was, with no doubt, the most time consuming task: gtk-builder-convert tool was not so reliable and I was compelled to recreate the GUI from scratch with Glade. I have also set the minimum GTK version required to 2.16
- using JSON format for storing benchmark information dictionaries
This feature is a way to get rid of the deprecated execfile() built-in function, instead of executing a python script to read a dictionary, the Benchmark class now parses a JSON file with the new integrated json module.
Comparing an old and a new file you can notice how simple it was the conversion, I’ve only lost the ability to comment a line. 😉
- importing numpy instead of numerix in matplotlib
This is another deprecation related issue, matplotlib is now based upon numpy.
- matplotlib canvas get refreshed instead of being destroyed and then recreated
I don’t know why two years ago I was destroying and recreating the object instead of just calling the draw() method every time it had to be refreshed. 😀
- some more attributes and objects integrated in the GtkBuilder XML file
I’ve integrated more attributes in the XML GUI file, like default size for secondary windows or Paned positions.
Moreover, thanks to GtkBuilder, even some objects have been integrated, like Adjustment or TextBuffer.
Actually also TreeModel objects should be configurable inside Glade and integrated inside the XML, but I didn’t manage to make them work.
Other remarkable changes in the field of Python3 future support and deprecated features removal were:
- all the print statements converted to functions
Well, we all know the content of PEP 3105… 😉
- using hashlib.md5 instead of md5
The md5 module has been deprecated in favour of the hashlib one
- using “key in dict” instead of dict.has_key()
The has_key() method no longer exists in Python 3
- using subprocess.Popen instead of os.popen()
os.popen() have been deprecated in favour of the subprocess module
- using urllib2.urlopen() instead of urllib.urlopen()
Another deprecation suggested substitution, from urllib.urlopen() to urllib2.urlopen()
- removed “copyright” argument and added “classifiers” in setup.py
The distutils.core.setup() function loses the “copyright” argument but gains “classifiers”.
- dropped support for pysqlite2 and old webbrowser module
Now that the minimum requirement is Python 2.6, there is no need for pysqlite2 or old webbrowser module support
- I have also removed the deprecated Options class in some SCons scripts.
I’m not sure I will have some time in the future to continue developing, but this was a nice “reboot” and I also have some new ideas in my to-do list. 😉