classification
Title: Implement imp.get_tag() using sys.implementation
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, eric.araujo, eric.snow, georg.brandl, jeffknupp, python-dev
Priority: release blocker Keywords: easy, patch

Created on 2012-06-24 19:50 by brett.cannon, last changed 2012-07-03 06:54 by eric.snow. This issue is now closed.

Files
File name Uploaded Description Edit
imp.patch jeffknupp, 2012-06-26 20:19 review
Messages (10)
msg163829 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-06-24 19:50
Title says it all. This also implies updating importlib to use sys.implementation directly.
msg164094 - (view) Author: Jeff Knupp (jeffknupp) * Date: 2012-06-26 20:19
Adding patch. If I misunderstood the issue, let me know.
msg164105 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-06-26 20:52
Moving to blocker for beta2.
msg164528 - (view) Author: Roundup Robot (python-dev) Date: 2012-07-02 19:13
New changeset b36bed82c9d0 by Brett Cannon in branch 'default':
Issue #15166: Re-implement imp.get_tag() using sys.implementation.
http://hg.python.org/cpython/rev/b36bed82c9d0
msg164529 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-07-02 19:15
I ended up applying Eric's patch from #14797 and then comparing against Jeff's patch here since Eric's cleaned up the C code. Thanks to both for the work!
msg164530 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-07-02 19:16
I meant issue #13959 for Eric's patch; wrong tab. =)
msg164552 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-07-02 21:06
One small thing: this comment from import.c was not copied to sysmodule.c and is now deleted:

-   TAG must change for each major Python release. The magic number will take
-   care of any bytecode changes that occur during development.
msg164559 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2012-07-02 22:07
Good catch.  However, do we need that comment?  The tag is programmatically derived from the version (in Python/sysmodule.c).
msg164561 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-07-02 22:39
Ah, good, if it’s automatically derived then we don’t need the comment.
msg164583 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2012-07-03 06:54
There was some concern with PyImport_GetMagicTag() extracting its value from sys.implementation.cache_tag.  I've addressed this in issue15242.
History
Date User Action Args
2012-07-03 06:54:38eric.snowsetmessages: + msg164583
2012-07-02 22:39:59eric.araujosetmessages: + msg164561
2012-07-02 22:07:57eric.snowsetmessages: + msg164559
2012-07-02 21:06:33eric.araujosetnosy: + eric.araujo
messages: + msg164552
2012-07-02 19:16:33brett.cannonsetmessages: + msg164530
2012-07-02 19:15:47brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg164529

stage: needs patch -> resolved
2012-07-02 19:13:17python-devsetnosy: + python-dev
messages: + msg164528
2012-07-02 18:58:22brett.cannonlinkissue15056 dependencies
2012-06-26 20:52:39georg.brandlsetpriority: deferred blocker -> release blocker
nosy: + georg.brandl
messages: + msg164105

2012-06-26 20:19:53jeffknuppsetfiles: + imp.patch

nosy: + jeffknupp
messages: + msg164094

keywords: + patch
2012-06-24 19:50:23brett.cannonlinkissue13959 dependencies
2012-06-24 19:50:12brett.cannoncreate