[issue14673] add sys.implementation

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 04, 2012, at 09:39 PM, Eric Snow wrote: >presumably PEP 421 can be marked as final now? Done. -- ___ Python tracker ___ _

[issue14673] add sys.implementation

2012-06-04 Thread Eric Snow
Eric Snow added the comment: presumably PEP 421 can be marked as final now? -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue14673] add sys.implementation

2012-06-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think Richard fixed it already, thanks. -- assignee: loewis -> status: open -> closed ___ Python tracker ___ __

[issue14673] add sys.implementation

2012-06-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: The Windows buildbots were failing compilation. I've added Object/namespaceobject.c and Include/namespaceobject.h to PCbuild/pythoncore.vcxproj in changeset ee7cd7d51ed6. -- nosy: +sbt ___ Python tracker

[issue14673] add sys.implementation

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm resolving this as Fixed since I've just committed the code to 3.3, but I'm also leaving its status open and assigning it to mvl for verification of the Windows build. Martin, if you'd rather not do that, please unassign it from yourself. I've also adde

[issue14673] add sys.implementation

2012-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9c445f4695c1 by Barry Warsaw in branch 'default': Eric Snow's implementation of PEP 421. http://hg.python.org/cpython/rev/9c445f4695c1 -- nosy: +python-dev ___ Python tracker

[issue14673] add sys.implementation

2012-06-03 Thread Eric Snow
Eric Snow added the comment: > Is full_4.diff the most up-to-date > patch, and is it complete (i.e. contains all code, docs, and tests)? Yep. :) -- ___ Python tracker ___

[issue14673] add sys.implementation

2012-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 02, 2012, at 08:03 AM, Amaury Forgeot d'Arc wrote: >- _PyNamespace_New should be a public API function. From Python code, >- SimpleNamespace is public. This is a separate discussion. I'm not opposed, but I don't think this should be addressed in this

[issue14673] add sys.implementation

2012-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 02, 2012, at 11:33 PM, Eric Snow wrote: >Added file: http://bugs.python.org/file25804/issue14673_full_4.diff Hi Eric. I'm ready to do a final review and merge this in, but I just want to be sure I'm looking at the right file. Is full_4.diff the most

[issue14673] add sys.implementation

2012-06-02 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25804/issue14673_full_4.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14673] add sys.implementation

2012-06-02 Thread Eric Snow
Eric Snow added the comment: > - From the docs, I could not understand the difference between > sys.implementation.version and sys.version_info. When can they differ? I'll make an update. As an example, PyPy is at version 1.8 which implements the Python 2.7 language. In that case sys.versio

[issue14673] add sys.implementation

2012-06-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Some remarks: - From the docs, I could not understand the difference between sys.implementation.version and sys.version_info. When can they differ? - _PyNamespace_New should be a public API function. From Python code, SimpleNamespace is public. - I

[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow
Eric Snow added the comment: I've ironed out all 3 of my new tests that were still failing. -- Added file: http://bugs.python.org/file25797/issue14673_full_3.diff ___ Python tracker ___

[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow
Eric Snow added the comment: this time against TIP. -- Added file: http://bugs.python.org/file25795/issue14673_full_2.diff ___ Python tracker ___ ___

[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file25794/issue14673_full_2.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow
Eric Snow added the comment: Applied all but one of the recommended changes. Thanks, Barry! -- Added file: http://bugs.python.org/file25794/issue14673_full_2.diff ___ Python tracker __

[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow
Eric Snow added the comment: I'll get a new patch up tonight. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14673] add sys.implementation

2012-06-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 01, 2012, at 06:53 PM, Eric Snow wrote: >sorry, I should have been more clear. issue14673_full.diff is not simply a >merging of the two previous patches, but rather their merger, plus >SimpleNamespace, plus removing the "public" restriction from the re

[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow
Eric Snow added the comment: sorry, I should have been more clear. issue14673_full.diff is not simply a merging of the two previous patches, but rather their merger, plus SimpleNamespace, plus removing the "public" restriction from the repr. I may have a small tweak or two as well. ---

[issue14673] add sys.implementation

2012-06-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Looking great, you're almost there! I remviewed issue14673_as_simple_namespace_2.diff and issue14673_full.diff. Reitveld makes it *so* much easier :) -- ___ Python tracker __

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file25779/issue14673_full.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Eric Snow added the comment: Guess I should have tested the docs before posting the patch. ;) -- Added file: http://bugs.python.org/file25780/issue14673_full.diff ___ Python tracker ___

[issue14673] add sys.implementation

2012-05-31 Thread Eric Snow
Eric Snow added the comment: This patch incorporates types.SimpleNamespace and makes the repr show all attributes. Tests and docs for types.SimpleNamespace are also included. The patch skips 3 tests (which I added) that are failing. One has a segfault due to a recursive repr (where I had a

[issue14673] add sys.implementation

2012-05-30 Thread Eric Snow
Eric Snow added the comment: @Barry: FWIW, the kwds passed to namespace_init was NULL when no keyword arguments were used. Easy enough to handle though. -- ___ Python tracker

[issue14673] add sys.implementation

2012-05-30 Thread Eric Snow
Eric Snow added the comment: > History with dictproxy means I'm also OK with "new type by stealth". > Perhaps add some tests to check "type(sys.implementation)()" does > something sane? Test added. Here's what happens: >>> cls = type(sys.implementation) >>> cls() namespace() >>> cls(x

[issue14673] add sys.implementation

2012-05-30 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25768/issue14673_docs_and_tests_2.diff ___ Python tracker ___ ___ Python-bugs-li

[issue14673] add sys.implementation

2012-05-30 Thread Eric Snow
Eric Snow added the comment: Thanks for taking the time for the review, Barry. Again, sorry I broke the review link. It shouldn't be a problem any more. > Barry A. Warsaw added the comment: > > I'm inclined to go with the as_simple_namespace patch.  As you say, > the pro are that this is a

[issue14673] add sys.implementation

2012-05-30 Thread Nick Coghlan
Nick Coghlan added the comment: History with dictproxy means I'm also OK with "new type by stealth". Perhaps add some tests to check "type(sys.implementation)()" does something sane? -- ___ Python tracker

[issue14673] add sys.implementation

2012-05-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm inclined to go with the as_simple_namespace patch. As you say, the pro are that this is a much better fit for this use case, while the con is that this does kind of sneak in a new type. Given that the type is not exposed in the API, that doesn't bother

[issue14673] add sys.implementation

2012-05-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm not a fan of using a module, and less of a fan of structseq, so I think I'll discount those two. I'll play with namespace and type next. -- ___ Python tracker _

[issue14673] add sys.implementation

2012-05-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: One small test that I think is missing is a test that sys.implementation.version and sys.implementation.hexversion are equal (modulo format differences). -- ___ Python tracker

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Eric Snow added the comment: I updated the patches so that (hopefully) the review link shows up. I've also pulled out the doc/test diff into its own patch, since it was the same for all of them. -- ___ Python tracker

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25728/issue14673_docs_and_tests.diff ___ Python tracker ___ ___ Python-bugs-list

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file25715/issue14673_as_simple_namespace.diff ___ Python tracker ___ ___ Python-b

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file25714/issue14673_as_structseq.diff ___ Python tracker ___ ___ Python-bugs-list

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file25713/issue14673_as_type.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file25712/issue14673_as_module.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25727/issue14673_as_simple_namespace.diff ___ Python tracker ___ ___ Python-bugs

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25726/issue14673_as_structseq.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25725/issue14673_as_type.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14673] add sys.implementation

2012-05-26 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25724/issue14673_as_module.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue14673] add sys.implementation

2012-05-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14673] add sys.implementation

2012-05-25 Thread Eric Snow
Changes by Eric Snow : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue14673] add sys.implementation

2012-05-25 Thread Eric Snow
Eric Snow added the comment: I've just attached 4 patches, one for each of the likeliest implementations. All 4 ran the test suite successfully. In my mind, the "simple namespace" one is the best fit. However, it involves adding a new built-in type (though a private one). If that is too c

[issue14673] add sys.implementation

2012-05-25 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25715/issue14673_as_simple_namespace.diff ___ Python tracker ___ ___ Python-bugs

[issue14673] add sys.implementation

2012-05-25 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25714/issue14673_as_structseq.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue14673] add sys.implementation

2012-05-25 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25713/issue14673_as_type.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14673] add sys.implementation

2012-05-25 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25712/issue14673_as_module.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue14673] add sys.implementation

2012-05-20 Thread Eric Snow
Eric Snow added the comment: FYI, the attached patches don't reflect the latest PEP. I'll get an updated patch up in the next day or two. -- ___ Python tracker ___ ___

[issue14673] add sys.implementation

2012-04-27 Thread Eric Snow
Eric Snow added the comment: An updated patch using a dict. (FYI, I have the PEP up on python-ideas.) -- Added file: http://bugs.python.org/file25378/sys_implementation_2.diff ___ Python tracker _

[issue14673] add sys.implementation

2012-04-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: When I added sys.subversion, people requested that it shall contain the CPython string. When sys._mercurial was introduced, it copied that. So there are plenty of ways already to figure out that it is CPython which you are using. --

[issue14673] add sys.implementation

2012-04-26 Thread Brett Cannon
Brett Cannon added the comment: So I'm w/ Antoine that a dict would be better so that the other VMs can add whatever they want into that object (e.g. Jython could specify what JVM they are running against) without causing confusion as to what some index means to each VM. The mutability of it

[issue14673] add sys.implementation

2012-04-26 Thread Eric Snow
Eric Snow added the comment: Thanks for bringing this up, Martin. sys.implementation is about having an implementation-specific location (hence sys) to consolidate explicit values concerning the implementation. It's partly about clarifying the run-time distinction between Python-the-language

[issue14673] add sys.implementation

2012-04-26 Thread Martin v . Löwis
Martin v. Löwis added the comment: If the main motivation for this is that importlib can use it, I fail to see the point to make it cross-implementation. Other implementations of Python may not use byte code files at all, or use different byte code syntaxes, or not use the marshal module to l

[issue14673] add sys.implementation

2012-04-26 Thread Eric Snow
Eric Snow added the comment: I'm going to write a PEP for this, after all. I want to make sure that it's easy to access, in one place, these points that are coming up and their resolutions. -- ___ Python tracker

[issue14673] add sys.implementation

2012-04-26 Thread Eric Snow
Eric Snow added the comment: @Éric - that's a good point. I considered it for a little bit, but went with the quick and easy think to get it rolling. There is a real benefit to mandating an API sys.implementation.version. importlib would use that version to calculate the tag to use for cach

[issue14673] add sys.implementation

2012-04-26 Thread Eric Snow
Eric Snow added the comment: @antoine - I wondered about that. In the end I got something up to start with. The list of fields in sys.implementation may change over time, unlike sys.version_info, et al. However, during interpreter execution, I would expect that neither that list nor the con

[issue14673] add sys.implementation

2012-04-26 Thread Éric Araujo
Éric Araujo added the comment: *version* is a version tuple, in the format of :data:`sys.version_info`, which represents the version of the Python implementation, **not** the version of the Python specification it implements. If that version number is specific to each VM, then I’m not sur

[issue14673] add sys.implementation

2012-04-26 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14673] add sys.implementation

2012-04-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: If it can contain a variable number of fields, I think it should be a dict rather than a tuple. -- nosy: +ncoghlan, pitrou ___ Python tracker

[issue14673] add sys.implementation

2012-04-25 Thread Eric Snow
New submission from Eric Snow : (see thread at http://mail.python.org/pipermail/python-ideas/2012-April/014878.html) This is a patch to add sys.implementation to Python (with doc addition). The main motivation is to have an explicit place to look for the name and version of the implementatio