[NeedForSpeed] [Python-checkins] r46083 - sandbox/trunk/stringbench/stringbench.py

M.-A. Lemburg mal at egenix.com
Tue May 23 09:35:03 CEST 2006


skip at pobox.com wrote:
>     MAL> The only thing you should do is make sure that the tests run in
>     MAL> more than just the most current Python version, e.g. by either
>     MAL> putting code using more recent syntax into different modules and/or
>     MAL> adding the code in using a condition based on sys.version or some
>     MAL> other feature test.
> 
> How far back should compatibility be maintained?  I thought there was a file
> in Misc that identified version compatibility requirements.  I didn't find
> what I was looking for or see any version compatibility in pybench/README.

Here's the quote from PEP 291:

    pybench            Marc-Andre Lemburg          1.5.2         [3]

    [3] pybench lives under the Tools/ directory. Compatibility with
        older Python version is needed in order to be able to compare
        performance between Python versions. New features may still
        be used in new tests, which may then be configured to fail
        gracefully on import by the tool in older Python versions.

If you use new syntax, you'll have to create a new module and then
add it to Setup.py embedded in try-except. If you're just using
new features, then a condition based on sys.version or the specific
feature will do, see e.g. Strings.py.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 23 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2006-07-03: EuroPython 2006, CERN, Switzerland              40 days left

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the NeedForSpeed mailing list