[issue14657] Avoid two importlib copies

2012-05-06 Thread Nick Coghlan
Nick Coghlan added the comment: In that case, how about we go with: 1. By default, importlib._bootstrap is never imported. Instead, it is set to be a reference to _frozen_importlib. However, _frozen_importlib does *not* lie about where it came from (and doesn't assume the on-disk source match

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Pierre Quentel
Pierre Quentel added the comment: Thanks for the explanation I still think that the patch can be simplified, not using path lengths and the "found" flag collapsed_path = _url_collapse_path(self.path) for head in self.cgi_directories: if head==collapsed_path: self.cgi_info = (head,

[issue14736] Add {encode, decode}_filter_properties() functions to lzma module

2012-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Changeset 9118ef2b651a was broken, but the bug should have been fixed by changeset 10ccbb90a8e9. Which revision have you been using? > But there are no tests for these functions. There *are* tests for these functions, and they were failing on some of the buildbo

[issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work

2012-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Using ^Z (ascii Substitute char) instead of ^D (ascii 'End of Transmission') is an MSDOS affectation carried over to the the MSDOS-based text-mode Command Prompt on Windows. I verified that ^D now closes IDLE on Windows. ^Z gives a beep. (I do not know about

[issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work

2012-05-06 Thread R. David Murray
R. David Murray added the comment: Making idle work with ctl-Z+enter might be reasonable. However, can you describe more fully the documentation that led you believe that would work? ctl-Z+enter is for the CMD window, not IDLE, to my understanding. -- nosy: +r.david.murray, terry.re

[issue14703] Update PEP metaprocesses to describe PEP czar role

2012-05-06 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14736] Add {encode, decode}_filter_properties() functions to lzma module

2012-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Nadeem Vawda. I also wrote a patch for this, but because of the lack of experience it was too cumbersome. But there are no tests for these functions. I tried to use these functions and got the random values. >>> lzma.decode_filter_properties(lzm

[issue9374] urlparse should parse query and fragment for arbitrary schemes

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker ___ __

[issue4333] Reworked Dialog.py

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.3 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14426] date format problem in Cookie/http.cookies

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13659] Add a help() viewer for IDLE's Shell.

2012-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: I don't think adding a "browser" arg to help() is a good idea. The original suggestion of having the help in a separate window and adding a checkbox in the options to (de)activate the feature sounds good to me (it could even allow to select between normal/new wi

[issue9559] mailbox.mbox creates new file when adding message to mbox

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> needs patch versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list maili

[issue6602] BaseHTTPServer log_message should log to sys.stdout

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: Here's a possible patch. The problem is that urlsplit (in Lib/urllib/parse.py:348) tries to convert the part after the : (in this case +31-641044153 and +31641044153) to int to see if it's a port number. This doesn't work with +31-641044153, but it does with

[issue14738] Amazingly faster UTF-8 decoding

2012-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch updated in accordance with Antoine cosmetic comments. -- Added file: http://bugs.python.org/file25485/decode_utf8_5.patch ___ Python tracker __

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Glenn Linderman
Glenn Linderman added the comment: Hi Pierre, Nice to see your name pop up again. Your suggestion is certainly simpler... but unfortunately, too much simpler. One reason, is that in configuring a path to contain CGI files, the CGI files are allowed to be there, or anywhere deeper in the tree

[issue14738] Amazingly faster UTF-8 decoding

2012-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank your, Antoine. Finally Intel Core is defeated! If someone wants to repeat tests, see benchmark tools in issue14624. -- ___ Python tracker

[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13116] setup.cfg in [sb]dists should be static

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> needs patch type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue14366] Supporting lzma compression in zip files

2012-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: I've committed my patch as changeset 9118ef2b651a, adding functions encode_filter_properties and decode_filter_properties to the lzma module. -- ___ Python tracker _

[issue14736] Add {encode, decode}_filter_properties() functions to lzma module

2012-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Committed as changeset 9118ef2b651a. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue14738] Amazingly faster UTF-8 decoding

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: 64-bit Linux, Intel Core i5 2500K: 3.2 3.3 patched utf-8 'A'*1 2550 (+198%) 6828 (+11%) 7607 utf-8 'A'*+'\x80' 2501 (+118%) 2415 (+126%)

[issue13968] Support recursive globs

2012-05-06 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So I was going to try to figure out the logic, so I manually created > the test files to start debugging, but I didn't get the ImportError > but instead the 1/0 error for the relative import. Maybe it's specific > to lack of threads or the change you made? I m

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Brett Cannon
Brett Cannon added the comment: So I was going to try to figure out the logic, so I manually created the test files to start debugging, but I didn't get the ImportError but instead the 1/0 error for the relative import. Maybe it's specific to lack of threads or the change you made? I mean if

[issue14657] Avoid two importlib copies

2012-05-06 Thread Brett Cannon
Brett Cannon added the comment: I think it's beyond a hint and says we need to find a solution or else other people will run into similar issues. And while I'm thinking about it, there is precedent for exposing modules under a different name than they are actually installed as in the system (

[issue14738] Amazingly faster UTF-8 decoding

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Unicode nosy: +ezio.melotti stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue14738] Amazingly faster UTF-8 decoding

2012-05-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I propose a complex patch, which significantly speeds up UTF-8 decoding. Now decoder faster even decoder in 3.2 (except in a few unreal patological cases). Also the decoder code reduced and simplified (formerly decoding code was repeated in at least three

[issue14654] Faster utf-8 decoding

2012-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Martin, sorry to have wasted your time. I understand that you are busy, so I'm not too worried not receiving a feedback for ten days. > At this point, it appears that you don't intend to submit any of these > patches for inclusion into Python. I'm at a loss

[issue12660] test_gdb fails when installed

2012-05-06 Thread Mark Shannon
Mark Shannon added the comment: python-gdb.py was modified for the new dictionary implementation. Can you check that your 3.3 installation isn't using an earlier version of python-gdb.py? -- nosy: +Mark.Shannon ___ Python tracker

[issue14695] Tools/parser/unparse.py is out of date.

2012-05-06 Thread R. David Murray
R. David Murray added the comment: Since we are already doing path hackery in that test file to get things to run, I think your patch would be fine. If we grow more tests for the stuff in Tools (which would be good), we might want to consider reorganizing things, but for now I think that the

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-05-06 Thread Trent Nelson
Trent Nelson added the comment: > > "Once we fix this I can add the build slave" > I'm missing the context for this. Yeah I uh, seemed to have deleted the introductory sentence I wrote that said I was doing some prep work before adding an OS X 10.7 build slave. > Can't you override with

[issue14674] Add link to RFC 4627 from json documentation

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: -Nurhusien.Hasen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14674] Add link to RFC 4627 from json documentation

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- Removed message: http://bugs.python.org/msg160098 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14674] Add link to RFC 4627 from json documentation

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- Removed message: http://bugs.python.org/msg160089 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14674] Add link to RFC 4627 from json documentation

2012-05-06 Thread Nurhusien Hasen
Nurhusien Hasen added the comment: find python .org public all serves On 5/6/12, Nurhusien Hasen wrote: > > Nurhusien Hasen added the comment: > > find python truste .net all serves > > -- > nosy: +Nurhusien.Hasen > > ___ > Python tracker >

[issue14695] Tools/parser/unparse.py is out of date.

2012-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: David: Any suggestions for how best to integrate test_unparse.py into test_tools? We could move the contents of test_unparse.py directly in test_tools.py and just kill the old test_unparse.py. Alternatively, we could import those TestCase subclasses from te

[issue14695] Tools/parser/unparse.py is out of date.

2012-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: Committed in revision c80576303892 (3.2), revision 89e928048903 (default). (I put 14965 instead of 14695 in the commit messages by mistake.) -- ___ Python tracker __

[issue14695] Tools/parser/unparse.py is out of date.

2012-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, that's good to know. I think I'll commit the fix and then look into hooking test_unparse into test_tools. For 3.2, it turns out that all that's missing is support for Starred. -- ___ Python tracker

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > One, you have some "XXX False" markers in the tests. Should those get > > deleted or replaced with something? > > Well, I don't know what to replace them with. I would have expected > pkg.module to end up in sys.modules, but as mentioned in the comments > t

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > One, you have some "XXX False" markers in the tests. Should those get > deleted or replaced with something? Well, I don't know what to replace them with. I would have expected pkg.module to end up in sys.modules, but as mentioned in the comments the relative

[issue14657] Avoid two importlib copies

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It was distribute (fork of setuptools, with added support for Python 3), not > distutils2. > distribute has been changed to directly use _frozen_importlib: This sounds like a rather good hint we need to avoid duplicate copies. -- __

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Brett Cannon
Brett Cannon added the comment: Only two comments, otherwise LGTM (and I can't believe the solution was to go back through the import system just to pull out the cached module; the things we would change if we were doing this from scratch). One, you have some "XXX False" markers in the tests.

[issue14674] Add link to RFC 4627 from json documentation

2012-05-06 Thread Nurhusien Hasen
Nurhusien Hasen added the comment: find python truste .net all serves -- nosy: +Nurhusien.Hasen ___ Python tracker ___ ___ Python-bug

[issue14657] Avoid two importlib copies

2012-05-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: It was distribute (fork of setuptools, with added support for Python 3), not distutils2. distribute has been changed to directly use _frozen_importlib: https://bitbucket.org/tarek/distribute/changeset/a2685f3af854 https://bitbucket.org/tare

[issue14657] Avoid two importlib copies

2012-05-06 Thread Brett Cannon
Brett Cannon added the comment: To respond to Nick's "yes, there are two copies of importlib._bootstrap" leanings, distutils2 has actually run into issues with this because they initially made some assumptions about consistency in what importlib returned vs. what import does (Arfrever can exp

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, there was a duplicate test. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file25482/impstuff.patch ___ Python tracker

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file25481/impstuff.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. The __import__ function's crazy API never ceases to amaze me. -- keywords: +patch nosy: +pitrou Added file: http://bugs.python.org/file25481/impstuff.patch ___ Python tracker

[issue14674] Add link to RFC 4627 from json documentation

2012-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti versions: +Python 2.7, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14034] Add argparse howto

2012-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: Committed, thanks for the patch! (Note that the example with "TypeError: unorderable types: NoneType() >= int()" works fine in Python 2 (by accident), and that I left it unchanged. Some error messages are also different on Python 2, but I left the ones from Py

[issue14034] Add argparse howto

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 549aa1460811 by Ezio Melotti in branch '2.7': #14034: adapt to Python 2 and fix indentation. http://hg.python.org/cpython/rev/549aa1460811 New changeset d5b7be0629c0 by Ezio Melotti in branch '3.2': #14034: fix indentation. http://hg.python.org/cpy

[issue14034] Add argparse howto

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 48385618525b by Ezio Melotti in branch '2.7': #14034: added the argparse tutorial. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/48385618525b New changeset 11703cb2a2f3 by Ezio Melotti in branch '3.2': #14034: added the argparse

[issue14654] Faster utf-8 decoding

2012-05-06 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I understand Martin point, but I think 95% of issues in the bugtracker are "work in progress", mine included. Maybe the issue is that Serhiy hasn't made a concrete proposal to be tested & integrated. It seems to be more an exploratory work. I am in the nosy

[issue14583] try/except import fails --without-threads

2012-05-06 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-05-06 Thread Ned Deily
Ned Deily added the comment: Trent, yes, now that the Xcode 4 situation has settled down a bit, clang is the compiler of choice for OS X 10.7 with Xcode 4.3 although there are still some open questions. I intend to update configure in the near future for all active branches to provide more a

[issue13989] gzip always returns byte strings, no text mode

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 55202ca694d7 by Nadeem Vawda in branch 'default': Closes #13989: Add support for text modes to gzip.open(). http://hg.python.org/cpython/rev/55202ca694d7 -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___

[issue13968] Support recursive globs

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So, anybody for or against this patch? I'd really like to see this > feature make its way in... I think the feature is useful, but someone needs to review the patch. Sorry if it takes some time. -- ___ Python trac

[issue14737] subprocess.Popen pipes not working

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nothing to do with str/bytes, actually; I think it was fixed in #11459 (changeset 7451da272111), so you might want to upgrade your Python 3.2 (or use the flush() workaround). -- resolution: -> out of date stage: -> committed/rejected status: open ->

[issue14737] subprocess.Popen pipes not working

2012-05-06 Thread ganges master
ganges master added the comment: hmm, it does work when i call flush, but it works perfectly fine without flushing on python2.x... i guess this has to do with str/bytes again. maybe this should be documented somewhere? thanks for the tip though. -- ___

[issue14737] subprocess.Popen pipes not working

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Works with 3.2.2: Python 3.2.2+ (3.2:9ef20fbd340f, Oct 15 2011, 21:22:07) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from subprocess import Popen, PIPE >>> p=Popen(["/bin/sh"], stdin=PIPE, stderr=PIPE, stdo

[issue14737] subprocess.Popen pipes not working

2012-05-06 Thread ganges master
New submission from ganges master : Attempting to read from stdout of a running process seems broken on Python3.2. I've been able to reproduce this on Ubuntu 11.4 and Windows 7 (with /bin/sh installed as part of git for windows) Python 3.2 (r32:88445, Dec 8 2011, 15:26:51) [GCC 4.5.2] on lin

[issue12660] test_gdb fails when installed

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 84bbb8d2d237 by Vinay Sajip in branch 'default': #12660: Skip test_gdb when run from an installed Python. http://hg.python.org/cpython/rev/84bbb8d2d237 -- nosy: +python-dev ___ Python tracker

[issue14736] Add {encode, decode}_filter_properties() functions to lzma module

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: The updated patch looks ok to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d74d275224d by Vinay Sajip in branch 'default': Issue #9116: Allowed test to pass on Windows by adjusting the test condition slightly to allow for a Windows-specific error message. http://hg.python.org/cpython/rev/4d74d275224d -- nosy: +p

[issue14736] Add {encode, decode}_filter_properties() functions to lzma module

2012-05-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: > The functionality looks a bit cryptic to me. What is the use case? Serializing filter specifiers for custom file formats. The particular case that prompted adding the code is zipfile (issue 14366). I've added a note to the docs and docstrings explaining this.

[issue14729] test_faulthandler test is too specific to work on Windows

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e71f25912d4 by Vinay Sajip in branch 'default': Closes #14729: Allowed test to pass on Windows by adjusting the test condition slightly to allow for a Windows-specific error message. http://hg.python.org/cpython/rev/2e71f25912d4 -- nosy:

[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-05-06 Thread Georg Brandl
Georg Brandl added the comment: Should be fixed now. -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2644e4ea02d3 by Georg Brandl in branch '2.7': #13183: backport fixes to test_pdb to 2.7 branch http://hg.python.org/cpython/rev/2644e4ea02d3 -- ___ Python tracker ___

[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset e275a9f7daa9 by Georg Brandl in branch '3.2': #13183: backport fixes to test_pdb to 3.2 branch http://hg.python.org/cpython/rev/e275a9f7daa9 -- ___ Python tracker ___

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-05-06 Thread Michele Orrù
Michele Orrù added the comment: >./configure --with-pydebug CC=clang MACOSX_DEPLOYMENT_TARGET=10.7 Works on my machine too. -- nosy: +maker ___ Python tracker ___ _

[issue13183] pdb skips frames after hitting a breakpoint and running step

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: If the failures don't get fixed, the offending commit should be reverted. -- nosy: +pitrou ___ Python tracker ___ _

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-05-06 Thread Trent Nelson
Trent Nelson added the comment: Hi Ned, On a brand new OS X Lion install with the latest XCode (4.3.2) and command line tools*, the following worked: ./configure --with-pydebug CC=clang MACOSX_DEPLOYMENT_TARGET=10.7 That is, everything built cleanly, and all tests ran without failures: 336 t

[issue14736] Add {encode, decode}_filter_properties() functions to lzma module

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: The functionality looks a bit cryptic to me. What is the use case? I wonder if Py_LONG_LONG is always defined (although it certainly is on major platforms). Other than that, the patch looks technically correct, though I'm not an lzma expert. -- nosy:

[issue13968] Support recursive globs

2012-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-05-06 Thread Pierre Quentel
Pierre Quentel added the comment: Hi Glenn, good to hear from you ;-) I think the fix can be simplified replacing dir_sep = collapsed_path.find('/', 1) by dir_sep = collapsed_path.rfind('/', 1) -- nosy: +quentel ___ Python tracker

[issue14657] Avoid two importlib copies

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here's my take. No one will care about _frozen_importlib vs. > importlib._bootstrap normally, right? If __module__/__file__ says > _frozen_importlib, it's no big deal. The reason I'd prefer __file__ to point to the actual Python file is so that people readi

[issue14657] Avoid two importlib copies

2012-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I believe that's already the case, since I don't recall anyone > removing the test infrastructure that ensured both import.c and > importlib are tested for correct behaviour. What do you mean? I think test_importlib only tests the on-disk version. --

[issue14657] Avoid two importlib copies

2012-05-06 Thread Nick Coghlan
Nick Coghlan added the comment: Forgot to add: in our own tests, we should ensure that both the frozen and on-disk versions get executed. I believe that's already the case, since I don't recall anyone removing the test infrastructure that ensured both import.c and importlib are tested for co

[issue14657] Avoid two importlib copies

2012-05-06 Thread Nick Coghlan
Nick Coghlan added the comment: The piece you're missing is that the interpreter state holds a direct reference to the import machinery in interp->importlib, and *that's* what gets used by the builtin __import__ implementation. I'm beginning to think the thing to do is to simply say "yes, the