Issue 15166: Implement imp.get_tag() using sys.implementation (original) (raw)

Created on 2012-06-24 19:50 by brett.cannon, last changed 2022-04-11 14:57 by admin. 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) (Python triager) 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 .
History
Date User Action Args
2022-04-11 14:57:32 admin set github: 59371
2012-07-03 06:54:38 eric.snow set messages: +
2012-07-02 22:39:59 eric.araujo set messages: +
2012-07-02 22:07:57 eric.snow set messages: +
2012-07-02 21:06:33 eric.araujo set nosy: + eric.araujomessages: +
2012-07-02 19:16:33 brett.cannon set messages: +
2012-07-02 19:15:47 brett.cannon set status: open -> closedresolution: fixedmessages: + stage: needs patch -> resolved
2012-07-02 19:13:17 python-dev set nosy: + python-devmessages: +
2012-07-02 18:58:22 brett.cannon link issue15056 dependencies
2012-06-26 20:52:39 georg.brandl set priority: deferred blocker -> release blockernosy: + georg.brandlmessages: +
2012-06-26 20:19:53 jeffknupp set files: + imp.patchnosy: + jeffknuppmessages: + keywords: + patch
2012-06-24 19:50:23 brett.cannon link issue13959 dependencies
2012-06-24 19:50:12 brett.cannon create