[Python-Dev] 3rd party extensions hot-fixing the stdlib (setuptools in the stdlib)

Phillip J. Eby pje at telecommunity.com
Wed Apr 19 21:19:24 CEST 2006


At 08:45 PM 4/19/2006 +0200, M.-A. Lemburg wrote:
>Phillip J. Eby wrote:
> > At 09:02 PM 4/18/2006 +0200, M.-A. Lemburg wrote:
> >> Phillip J. Eby wrote:
> >>> At 07:15 PM 4/18/2006 +0200, M.-A. Lemburg wrote:
> >>>> Why should a 3rd party extension be hot-fixing the standard
> >>>> Python distribution ?
> >>> Because setuptools installs things in zip files, and older versions of
> >>> pydoc don't work for packages zip files.
> >> That doesn't answer my question.
> >
> > That is the answer to the question you asked: "why hot-fix?"  Because
> > setuptools uses zip files, and older pydocs crash when trying to display
> > the documentation for a package (not module; modules were fine) that is in
> > a zip file.
>
>I fail to see the relationship between setuptools and pydoc.

People blame setuptools when pydoc doesn't work on packages in zip 
files.  Rather than refer to some theoretical argument why it's not my 
fault and I shouldn't be the one to fix it, I prefer to fix the problem.


>The setuptools distribution is not the authoritative source for
>these kinds of fixes and that should be made clear by separating
>those parts out into a different package and making the
>installation an explicit user option.

...which nobody will use, following which they will still blame setuptools 
for pydoc's failure.

But I do agree that it might be a good idea to:

1) tell people about the issue
2) tell people that the fix is being installed
3) make it easy to remove the fix

However, maybe I should just create 'pydoc-hotfix' and 'doctest-hotfix' 
packages on PyPI and then tell people to "easy_install pydoc-hotfix 
doctest-hotfix".  Or perhaps just create a "pep302-hotfixes" package that 
includes all of the PEP 302 support changes for linecache, traceback, and 
so on, although I'm not sure how many of those can be installed in such a 
way that the fixes would be active prior to the stdlib versions being imported.

I suppose I could handle the "nobody will use it" problem by having 
easy_install nag about the hotfixes not being installed when running under 
2.3 or 2.4.


>You should also note that users won't benefit from bug fixed
>versions of e.g. such modules in patch level releases.

The pydoc fixes to support zip files are too extensive to justify 
backporting, as they rely on features provided elsewhere.  So if bug fixes 
occur on the 2.5 trunk, I would have to update the hotfix versions directly.



More information about the Python-Dev mailing list