This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年03月10日 11:14 by Thomas Güttler, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (8) | |||
|---|---|---|---|
| msg237746 - (view) | Author: Thomas Güttler (Thomas Güttler) * | Date: 2015年03月10日 11:14 | |
Please update the docs of imp.find_module() https://docs.python.org/2/library/imp.html#imp.find_module zipped egg files in sys.path are not found. Please provide a link how to find modules in sys.path like the interpreter does (with support of zipped egg files). |
|||
| msg237871 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2015年03月11日 14:59 | |
Egg files are not a part of the Python stdlib and so I don't understand why you expected them to be supported by imp? Anyway, because egg files are not from Python itself but a third-party project they shouldn't be referenced from the official docs as it would just confuse people who don't know what eggs even are. |
|||
| msg237882 - (view) | Author: Thomas Guettler (guettli) * | Date: 2015年03月11日 16:23 | |
Dear Bret Cannon, I don't ask for egg support in the imp module. I don't want to change the implemenation of imp.find_module() I just want to update the docs. Most people run a python version which supports loading zipped eggs. Please reopened this, since I think you misunderstood me. If not, and you don't care about the docs. Leave it closed :-) |
|||
| msg237937 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2015年03月12日 14:24 | |
I understood what you asked. My point is that mentioning eggs in the imp doesn't make sense since the imp module nor import supports them natively. Eggs are a setuptools thing, not a Python standard library thing. |
|||
| msg238267 - (view) | Author: Thomas Guettler (guettli) * | Date: 2015年03月17日 09:31 | |
In this case I am wearing newbee user glasses. And with this glasses on my nose, I don't care for implementation. I am confused that imp module does not work like "import foo". |
|||
| msg238271 - (view) | Author: Paul Moore (paul.moore) * (Python committer) | Date: 2015年03月17日 10:05 | |
Egg files are a format defined by setuptools. If you look in the setuptools documentation it notes that egg files are simply zipfiles with a particular structure and naming convention. So from a core Python perspective, you can use eggs just like any other zipfile. See the zipimport documentation for further details if you need them. To further confuse the issue, setuptools includes some pretty complex mechanisms for adding eggs to syst.path so that their contents can be imported (there are .pth files and multi-version support, for example). Those mechanisms are part of setuptools, not of core Python. From a core Python perspective, the path handling is something you do manually. So while I understand your confusion, I think you should understand that it is a confusion over the setuptools implementation, and how it interacts with the mechanisms defined by core Python (which are defined in terms of zipfiles). So if you feel there are any documentation issues, they should probably be addressed by setuptools rather than in the core docs. On a peripherally related point, your comment "zipped egg files in sys.path are not found" doesn't really explain your problem very well. When reporting to setuptools, I'd suggest that you need to clarify your problem a bit better - what steps did you take, did they match the steps that the setuptools docs tell you to use, and how did the failure show itself? But as I say, that's for a setuptools bug report. |
|||
| msg238276 - (view) | Author: Thomas Guettler (guettli) * | Date: 2015年03月17日 10:37 | |
The docs should be where new users look. I don't speak about several hundret words .... Where do you think new users look for documentation if they want a method which does find a module? |
|||
| msg238296 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2015年03月17日 14:48 | |
https://pythonhosted.org/setuptools/ |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:13 | admin | set | github: 67813 |
| 2015年03月17日 14:48:43 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg238296 |
| 2015年03月17日 10:37:55 | guettli | set | messages: + msg238276 |
| 2015年03月17日 10:05:02 | paul.moore | set | nosy:
+ paul.moore messages: + msg238271 |
| 2015年03月17日 09:31:09 | guettli | set | messages: + msg238267 |
| 2015年03月12日 14:24:50 | brett.cannon | set | messages: + msg237937 |
| 2015年03月11日 16:23:06 | guettli | set | nosy:
+ guettli messages: + msg237882 |
| 2015年03月11日 14:59:43 | brett.cannon | set | status: open -> closed assignee: docs@python components: + Documentation versions: + Python 2.7 nosy: + brett.cannon, docs@python messages: + msg237871 resolution: not a bug |
| 2015年03月10日 11:14:46 | Thomas Güttler | create | |