GNOME Bugzilla – Bug 769995
gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments
Last modified: 2016-08-16 20:42:32 UTC
Trivial patch attached.
Created attachment 333430 [details] [review] gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments Previously, this would not work, as it would result in comparing the order of a string and an integer. Make it work, and make 'UNRELEASED' compare higher than other versions so it's always treated as the latest version. 'UNRELEASED' is commonly used by maintainers to highlight new API while it's being prototyped, until they know which version it will actually be released in. At the time of release, they replace all 'UNRELEASED' strings in git with the new version number.
Review of attachment 333430 [details] [review]: I haven't seen that, but I believe you that it's used. Some sort of real-world reference in the commit message would be useful, like: For example, see: https://github.com/foobar/baz and https://git.gnome.org/gnome-somegame ::: gio/gdbus-2.0/codegen/utils.py @@ +103,3 @@ + v = '9999' + elif key[0]: + v = str(key[0]) Is there a reason you're sneaking in another call to `str` out of curiosity?
Pushed with an example added, thanks. The sneaky extra `str()` was to ensure all the keys are always strings (since I don't think type conversion works when doing ordered comparisons, for good reason). Attachment 333430 [details] pushed as 15b315b - gdbus-codegen: Allow '@since: UNRELEASED' in documentation comments