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 2014年12月26日 10:30 by scoder, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg233104 - (view) | Author: Stefan Behnel (scoder) * (Python committer) | Date: 2014年12月26日 10:30 | |
distutils uses this code to validate the input in "Command.__init__()": # late import because of mutual dependence between these classes from distutils.dist import Distribution if not isinstance(dist, Distribution): raise TypeError, "dist must be a Distribution instance" (Lib/distutils/cmd.py, after line 50) This fails if the calling code uses the stdlib Distribution type (e.g. with a module global import) but setuptools was only imported afterwards and replaced "distutils.dist.Distribution" with its own implementation. In this case, the above code will get hold of the setuptools implementation and the isinstance() check will fail as both classes are not compatible. I guess this is a problem more in setuptools than in distutils, but a) this isinstance() check has a general code smell and b) pip and setuptools are automatically installed in a specific (impacted) version in Py2.7.9 and Py3.4, which makes this problem quite pressing for the stdlib side. |
|||
| msg233110 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2014年12月26日 17:17 | |
Can this ticket be merged into #23102 ? |
|||
| msg233112 - (view) | Author: Stefan Behnel (scoder) * (Python committer) | Date: 2014年12月26日 18:53 | |
Yes, pretty much the same problem. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:11 | admin | set | github: 67303 |
| 2016年02月13日 17:20:57 | ralf.gommers | set | nosy:
+ ralf.gommers |
| 2014年12月26日 18:54:56 | eric.araujo | set | status: open -> closed superseder: distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution resolution: duplicate stage: resolved |
| 2014年12月26日 18:53:40 | scoder | set | messages: + msg233112 |
| 2014年12月26日 17:17:29 | eric.araujo | set | messages: + msg233110 |
| 2014年12月26日 10:30:55 | scoder | create | |