[py-svn] r58518 - py/build/fedora

Carl Friedrich Bolz cfbolz at gmx.de
Wed Oct 1 12:03:25 CEST 2008


Hi Holger,

2008/10/1  <hpk at codespeak.net>:
> Author: hpk
> Date: Wed Oct  1 11:39:27 2008
> New Revision: 58518
[snip]
> +fedora usually has >=python 2.4 anyway so one can
> +erase py/compat/*.py (except __init__.py)
> +and put the following into a new file, e.g. py/compat/fedora.py
> +
> +    import doctest
> +    import optparse
> +    import textwrap
> +    import subprocess
> +
> +and then change py/__init__.py to have py.compat like this:
> +
> +'compat.doctest'         : ('./compat/fedora.py', 'doctest'),
> +'compat.optparse'        : ('./compat/fedora.py', 'optparse'),
> +'compat.textwrap'        : ('./compat/fedora.py', 'textwrap'),
> +'compat.subprocess'      : ('./compat/fedora.py', 'subprocess'),

Wasn't the idea originally to not depend on the underlying stdlib for
compat ever? Because then the py-lib user can rely on having always
exactly the same version of these modules. I remember, because at one
time I proposed to put a "try: import doctest except ImportError" into
compat to get newer versions of these files if they are there.

Cheers,

Carl Friedrich



More information about the pytest-commit mailing list