[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-09 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset ee01fd98b5b0 by Brett Cannon in branch 'default':
Issue #15242: Have PyImport_GetMagicTag() return a const char *
http://hg.python.org/cpython/rev/ee01fd98b5b0

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-09 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I went ahead and committed Eric's patch. Amaury, if you want to move the macros 
to a header file I see no reason not to, but I also don't see a need so I 
didn't want to spend the time doing it myself.

--
resolution:  - fixed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

It's not necessary.  The fix looks good as is.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-09 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-06 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

Here's a new patch that keeps things simpler, but still cleans up the concerns 
about using sys.implementation.cache_tag in PyImport_GetMagicTag().

--
Added file: http://bugs.python.org/file26280/cache_tag_via_sys_var.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-06 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


Removed file: http://bugs.python.org/file26280/cache_tag_via_sys_var.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-06 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

Patch updated to include a doc addition.

--
Added file: http://bugs.python.org/file26281/cache_tag_via_sys_var.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-05 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Sorry for the pedantry, but: I read the title of this bug as wanting these two 
values to be the exact same pointer.  If you're talking about putting a 
constant string in a header file, you'll get an (identical) copy of that string 
in every .o that references it (unless your linker collapses identical strings, 
which I don't know if they do).

From the description, it sounds like you want them to merely be guaranteed 
identical strings, but they don't have to be the same exact pointer.

tl;dr: do you mean ==?  the title implies you mean is.

--
nosy: +larry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-05 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

tl;dr: ==, not is

Shouldn't tl;dr go first, else it seems a little pointless since I already read 
the whole thing. At which point the tl;dr is really just a summary of what I 
just read, not a didn't read line. Just being pedantic. =)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-04 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-03 Thread Eric Snow

New submission from Eric Snow ericsnowcurren...@gmail.com:

There was some concern with PyImport_GetMagicTag() extracting its value from 
sys.implementation.cache_tag.  One solution is to have the two use a common 
underlying value.  However, that's basically what was already in import.c and 
I'd rather minimize that file at this point.

An alternative is to have the underlying value defined in a more amenable spot, 
but I'm not convinced that buys a whole lot over simply exposing the underlying 
value in PyImport_GetMagicTag().  If we could deprecate that function...

Another possibility is to move the underlying value to configure.  The 
down-side is that it's platform-specific.  I've attached a patch that does 
this.  While it may do too much as-is, it demonstrates my point.

--
components: Interpreter Core
files: cache_tag_via_configure.diff
keywords: patch
messages: 164582
nosy: amaury.forgeotdarc, brett.cannon, eric.snow
priority: normal
severity: normal
stage: patch review
status: open
title: PyImport_GetMagicTag() should use the same const char * as 
sys.implementation.cache_tag
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26237/cache_tag_via_configure.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-03 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Can the #defines appear in pyconfig.h instead?  I find it easier to discover 
them this way, and will also simplify the implementation on Windows.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15242] PyImport_GetMagicTag() should use the same const char * as sys.implementation.cache_tag

2012-07-03 Thread Eric Snow

Eric Snow ericsnowcurren...@gmail.com added the comment:

 Can the #defines appear in pyconfig.h instead?  I find it easier to
 discover them this way, and will also simplify the implementation on
 Windows.

Agreed.  I'd like to pull them into Python/sysmodule.h, though.  I'm also going 
to drop the part that messes with SOABI.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15242
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com