GNOME Bugzilla – Bug 680176
Added pygobject version accessors, and checker
Last modified: 2012-07-19 13:51:41 UTC
Created attachment 219128 [details] [review] patch providing the version accessors and checker Added the ability to check for pygobject's version at runtime in python. To test it out: >>> import gi >>> gi.__version__ "3.3.5" >>> gi.version_info (3, 3, 5) >>> gi.require_version("pygobject", "3.3.5") >>> gi.require_version("pygobject", "3.5.5") (interpreter throws an exception)
Created attachment 219220 [details] [review] improved patch, with a seperate version checker patch providing the version accessors and improved checker: >>> import gi >>> gi.__version__ "3.3.5" >>> gi.version_info (3, 3, 5) >>> gi.check_version("3.3.5") >>> gi.check_version((3.3.5)) >>> gi.check_version("3.4.5") raises an exception >>> gi.check_version((3.4.5)) raises an exception
There is a mistake in the previous comment, corrected here: >>> gi.check_version("3.3.5") >>> gi.check_version((3, 3, 5)) >>> gi.check_version("3.4.5") raises an exception >>> gi.check_version((3, 4, 5)) raises an exception
Created attachment 219225 [details] [review] version includes test cases
Thanks! Cleaned up the test case a bit, added a changelog, and pushed: http://git.gnome.org/browse/pygobject/commit/?id=a3aae2e152c0b955037b7b85e16d14d00881d870