Title: Remove egg-info files in stdlib
Type: behavior Stage: resolved
Components: Distutils2 Versions: Python 3.3
Status: closed Resolution: fixed
Dependencies: 12218 Superseder:
Assigned To: eric.araujo Nosy List: Arfrever, alexis, eric.araujo, orsenthil, pje, python-dev, ronaldoussoren, tarek
Priority: low Keywords:

Created on 2010-12-07 09:06 by ronaldoussoren, last changed 2011-06-09 12:19 by eric.araujo. This issue is now closed.

Messages (10)
msg123536 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-12-07 09:06
I just noticed that distutils creates an egg-info for the stdlib while installing Python.

This definitely happens for Python 2.7 and Python 3.2 (both framework builds on OSX).

In lib-dynload there is and egg-info file: "Python-2.7.1-py2.7.egg-info" 

Is this intentional? 

If it is: the OSX installer does not remove older versions when installing an upgrade (that is, I also have egg-info files for Python-2.7 and several pre-releases)
msg123545 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-07 12:25
I think the existence of this file is intentional, to satisfy pkg_resources requirements for “Python”.  Philip can confirm.
msg132174 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-25 22:36
After a bit of exploring, I think that it’s possible that the existence of this file is not intentional.  Python uses distutils.core.setup to build install most of its own extension modules, and the PyBuildInstall class used for the install command does not disable the automatic egg-info generation.

With the move of packaging into the stdlib and the addition of the superseding dist-info format, such files can be removed in 3.3.  They’re harmless in stable versions, and removing them would require updates to the build tools that don’t really bring us anything.
msg132632 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-03-31 03:37
+1 to removing of the spurious egg-info files. For the folks who are not aware of the multitude 'packaging terms', egg-info files are the first step towards the path leading to more confusion. 
So cleaning up would be definitely better in the standard distribution.
msg132674 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2011-03-31 14:57
I agree that the egg-info file should be removed in 3.3, especially because distutils2 has a better way of specifying python version dependencies.

The OSX installers for 2.7, 3.1 and 3.2 should remove the egg-info file for older releases, that way we at least don't lie about the version.

IMO we cannot remove the egg-info for current releases, someone might depend on their existence and this is a minor enough nit to not risk breaking code.
msg132692 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-31 17:59
Yes, I only target 3.3.
msg136982 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-26 16:52
The egg-info file for Python itself can go, but what about wsgiref.egg-info?  It was included in 2.5 too to preserve compatibility with code using pkg_resources.require instead of regular import.  I’d like to remove it too: it’s not needed anymore with the new standards, and I don’t think there’s a backward compat issue.  There shouldn’t be 3.x code out there using this call, since all 3.x versions have had wsgiref in the stdlib.  The only compat issue could be for some 2.x codebase relying on the egg-info file and being converted to Python 3.3: if we remove the file, people would have to remove the pkg_resources.require call.  I would argue in favor of the removal: people can assume that wsgiref is in the stdlib if they target 2.5+ or 3.x, and if they do use the require call, then removing it is just another tiny step in the conversion process.
msg137304 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2011-05-30 16:48
I am going to remove wsgiref.egg-info
msg137307 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2011-05-30 16:51
see issue12218
msg137959 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-06-09 12:10
New changeset e3f6c10eb590 by Éric Araujo in branch 'default':
Stop creating a Python-X.Y.Z-pyX.Y.egg-info file on install (#10645)

New changeset af7bc95e5b1e by Éric Araujo in branch 'default':
The change done for #10645 deserves a NEWS entry
Date User Action Args
2011-06-09 12:19:19eric.araujosetstatus: open -> closed
resolution: fixed
stage: resolved
2011-06-09 12:10:59python-devsetnosy: + python-dev
messages: + msg137959
2011-06-09 12:06:59eric.araujosetdependencies: + Removing wsgiref.egg-info
2011-05-30 16:51:19tareksetmessages: + msg137307
2011-05-30 16:48:08tareksetmessages: + msg137304
2011-05-26 16:52:08eric.araujosetmessages: + msg136982
2011-03-31 17:59:39eric.araujosetassignee: tarek -> eric.araujo
messages: + msg132692
2011-03-31 14:57:32ronaldoussorensetmessages: + msg132674
2011-03-31 14:43:51Arfreversetnosy: + Arfrever
2011-03-31 03:37:35orsenthilsetnosy: + orsenthil
messages: + msg132632
2011-03-25 22:36:14eric.araujosettitle: egg-info file in lib-dynload -> Remove egg-info files in stdlib
nosy: + alexis

messages: + msg132174

versions: + Python 3.3, - Python 3.1, Python 2.7, Python 3.2
components: + Distutils2, - Distutils
2010-12-07 12:25:57eric.araujosetnosy: + pje
messages: + msg123545
2010-12-07 09:06:53ronaldoussorencreate