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年08月14日 21:37 by takluyver, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| rm-distutils-version-check.patch | takluyver, 2014年08月14日 21:37 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg225320 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2014年08月14日 21:37 | |
We noticed the other day that distutils, despite being part of the standard library, checks the version of Python it's running under and has some different code paths - one of which is only taken for Python < 2.2. We haven't managed to figure out why this is necessary. So this issue is partly a patch and partly a question: is there a reason that distutils can't assume it's run on the version of Python it came with? If so, I'm happy to make a new patch adding a comment to explain that. If not, I'll go looking for other places where it has unnecessary checks, and we can clean up one little corner of wtf. |
|||
| msg225481 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年08月18日 04:01 | |
New changeset fbb51251eb9d by Benjamin Peterson in branch '3.4': remove 2.2 and 2.6 compat code (closes #22200) http://hg.python.org/cpython/rev/fbb51251eb9d New changeset 66c7f30fe8c7 by Benjamin Peterson in branch 'default': merge 3.4 (closes #22200) http://hg.python.org/cpython/rev/66c7f30fe8c7 |
|||
| msg225786 - (view) | Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) | Date: 2014年08月24日 01:50 | |
There are other checks: Lib/distutils/command/build_ext.py: # this keeps compatibility from 2.3 to 2.5 if sys.version < "2.6": USER_BASE = None HAS_USER_SITE = False else: from site import USER_BASE HAS_USER_SITE = True Lib/distutils/msvccompiler.py and Lib/distutils/msvc9compiler.py: def get_build_version(): """Return the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. """ ... if i == -1: return 6 Lib/distutils/tests/test_build_ext.py: class BuildExtTestCase(TempdirManager, LoggingSilencer, unittest.TestCase): def setUp(self): ... if sys.version > "2.6": ... def tearDown(self): ... if sys.version > "2.6": |
|||
| msg225912 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2014年08月26日 08:27 | |
I spotted a few others as well. When I get a bit less busy in a couple of weeks time, I intend to go through and make a bigger patch to clean things up. |
|||
| msg226511 - (view) | Author: Thomas Kluyver (takluyver) * | Date: 2014年09月06日 20:01 | |
I've made a patch removing some more of these version checks in issue 22349. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:07 | admin | set | github: 66396 |
| 2014年09月07日 10:30:23 | berker.peksag | set | status: open -> closed resolution: fixed stage: resolved |
| 2014年09月06日 20:01:03 | takluyver | set | messages: + msg226511 |
| 2014年08月26日 08:27:00 | takluyver | set | messages: + msg225912 |
| 2014年08月24日 01:52:54 | Arfrever | set | nosy:
+ benjamin.peterson |
| 2014年08月24日 01:50:28 | Arfrever | set | status: closed -> open versions: + Python 3.4 nosy: + Arfrever messages: + msg225786 resolution: fixed -> (no value) stage: resolved -> (no value) |
| 2014年08月18日 04:01:46 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg225481 resolution: fixed stage: patch review -> resolved |
| 2014年08月15日 11:30:01 | berker.peksag | set | stage: patch review type: enhancement versions: + Python 3.5 |
| 2014年08月15日 00:04:19 | Aaron.Meurer | set | nosy:
+ Aaron.Meurer |
| 2014年08月14日 21:37:01 | takluyver | create | |