[qmtest] [PATCH] Revamp QMTest version number handling.
Mark Mitchell
mark at codesourcery.com
Sun Aug 10 20:50:56 UTC 2003
On Sun, 2003-08-10 at 02:04, Nathaniel Smith wrote:
> Attached patch contains no user-visible change in functionality, but
> does clean up the handling of the overall QMTest version number.
>
> This can be considered part n of my long-term quest to kill
> setup_path.py.in. In some sense with this patch I've succeeded, since
> setup_path.py.in no longer needs to undergo @@ substitution, and is
> renamed to setup_path.py...
>
> The general idea is to provide variables qm.version and
> qm.version_info exactly analogous to the standard python variables
> sys.version and sys.version_info. The current code has a very strange
> idea of version numbers; it stores them in a single QMTest object and
> provides a method to read them. This is strange because firstly, the
> version numbers are necessarily immutable over the life of an
> interpreter, so having a function to fetch them is odd. Secondly, and
> more importantly, the version number is a property of the qm package
> as a whole, not any particular QMTest object; it makes perfect sense
> to want to know the version of the qm package without first
> instantiating a QMTest object. Especially since prior to this patch,
> on can't instantiate a QMTest object without knowing the version
> number :-).
>
> This patch leaves 'QMTest.GetVersion' working, but if Jeffrey is the
> only one using it, then I'd suggest removing it altogether. Its new
> implementation is just "return qm.version_info".
>
> Comments?
I think the patch is fine. I don't think there's any harm in leaving
GetVersion there, but then again there's not really any harm in taking
it out either. You can make that decision, but make sure to let me
know; we'll have to tweak the ABI testsuite again if you take that out.
Thanks,
--
Mark Mitchell <mark at codesourcery.com>
CodeSourcery, LLC
More information about the qmtest
mailing list