[issue16392] import crashes on circular imports in ext modules

2012-11-06 Thread Brett Cannon
Brett Cannon added the comment: I was thinking somewhere in http://docs.python.org/3/c-api/import.html since this only comes up when you try to execute an import during extension module initialization that involves a circular import. -- ___ Python

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-06 Thread Brett Cannon
Brett Cannon added the comment: It's fine to cheat in tests, although test_imp predates importlib which is why it uses an undocumented API. -- ___ Python tracker <http://bugs.python.org/is

[issue5950] Make zipimport work with zipfile containing comments

2012-11-08 Thread Brett Cannon
Brett Cannon added the comment: This is a feature request so it won't change in Python 2.7. As for progress, the answer is no as the hope is to eventually replace zipimport with something in pure Python thanks to importlib. -- versions: +Python 3.4 -Python 2.7, Pytho

[issue16392] import crashes on circular imports in ext modules

2012-11-08 Thread Brett Cannon
Brett Cannon added the comment: The fully qualified name requirement is definitely a design flaw where init functions should just be given the module object with everything already set, just like what @importlib.util.module_for_loader does. Hopefully we can come up with a solution through

[issue12907] Update test coverage devguide page

2012-11-14 Thread Brett Cannon
Brett Cannon added the comment: Committed in dac396a730e4 -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-11-14 Thread Brett Cannon
Brett Cannon added the comment: Here is a new patch which removes the expected skips stuff and adds a required_on argument to test.support.import_module() for those cases where missing a module is an error (in the patch it's _winreg on Windows). If people are fine with this cleanup the

[issue12908] Update dev-in-a-box for new coverage steps

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Fixed in various commits. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15031] Split .pyc parsing from module loading

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Here is my current plan:: parse_bytecode_file(data, source_stats, source_path) -> code This will take in the bytes from the bytecode file and a stats dict from SourceLoader.path_stats(). The method will parse the bytecode file, verify the magic num

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Might name this compile_source() instead. -- ___ Python tracker <http://bugs.python.org/issue15627> ___ ___ Python-bugs-list mailin

[issue15031] Split .pyc parsing from module loading

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Might name it compile_bytecode_file() instead. -- ___ Python tracker <http://bugs.python.org/issue15031> ___ ___ Python-bugs-list m

[issue15767] add ModuleNotFoundError

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Should it be ModuleNotFoundError or ModuleNotFound? It's not necessarily an error if a module doesn't exist, so failing to find it isn't quite that negative. It also acts somewhat like StopIteration/GeneratorExit which also don't have the c

[issue15767] add ModuleNotFoundError

2012-11-15 Thread Brett Cannon
Changes by Brett Cannon : -- stage: needs patch -> test needed ___ Python tracker <http://bugs.python.org/issue15767> ___ ___ Python-bugs-list mailing list Un

[issue9893] Removing the Misc/Vim/ files

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: Files removed in 7e37a6c76e36. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue7620] Vim syntax highlight

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: 7e37a6c76e36 removed the Misc/Vim files since we just were not staying on top of them. Thanks for the patch regardless, July. If the syntax file in Vim itself is off I would submit those as I have found the Vim maintainers very willing to accept fixes

[issue9084] vimrc: use matchall() instead of ":match" to allow multiple matches

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: 7e37a6c76e36 removes the files in Misc/Vim. Thanks for the patch regardless, Daniel. If the syntax file in Vim is out of date then I would suggest trying to submit a patch. I have found the Vim maintainer quite willing to take fixes. -- resolution

[issue9893] Removing the Misc/Vim/ files

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: I decided against it. If Emacs doesn't already have one I figured Vim shouldn't either. -- ___ Python tracker <http://bugs.python.

[issue15031] Split .pyc parsing from module loading

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: You can't use "data" as there are connotations for that word thanks to get_data(). Same goes for "load" since this is something that get_code() would use more directly than load_module(). --

[issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: The chances of this being a problem is REALLY small and the single function that calls this is a public void function so there is no way for an exception to propagate short of a fatal error which seems a bit much. I did change to using NOWAIT_LOCK, though

[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-11-15 Thread Brett Cannon
Brett Cannon added the comment: I'm at PyCon Argentina Friday and Saturday, so I have a rare opportunity to get stuff done. If anyone has issues or comments, please get them in over the next day or so, else I'm going to check thi

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: Everything is working as expected; you left out the path argument:: importlib.find_loader('package.foo', ['package']) This works the way it does because otherwise we would have to stat every single time from the top level on down and that

[issue15031] Split .pyc parsing from module loading

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: In order to have exceptions that have messages like "bad magic number in module" there would need to be a technically unneeded fullname parameter. People cool with that? I personally dislike having info passed in just for error reporting, but in

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: That won't work as frozen and builtin modules don't care about the path. -- ___ Python tracker <http://bugs.python.o

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: Feel free to submit a patch, but I'm personally not motivated enough to try to change this on my own. -- ___ Python tracker <http://bugs.python.org/is

[issue15031] Split .pyc parsing from module loading

2012-11-16 Thread Brett Cannon
Brett Cannon added the comment: Attached is a patch that introduces _LoaderBasics.parse_bytecode_file(). It takes in basically what _bytes_from_bytecode() did plus a keyword-only boolean flag for exception suppression as that's needed to ignore stale bytecode when source is availabl

[issue16492] Add a load_parents argument to importlib.find_loader()

2012-11-17 Thread Brett Cannon
New submission from Brett Cannon: To make using importlib.find_loader() easier, there should be a flag that says to automatically import all parent packages for the desired submodule so as to not force the user to do it:: def find_loader(name, path=None, *, load_parents=False): ... That

[issue16489] importlib find_loader returns a loader for a non existent module

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: I clarified the wording in 3.3 and default. I also opened issue #16492 to add a keyword-only argument to find_loader() to have it import parent packages for you if you so desire. -- resolution: invalid -> fixed stage: -> committed/re

[issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: So at this point you should use inspect.signature(), not getfullargspec(). With that you could do this if you either allowed setting the __signature__ attribute and then provided code that would set it, made __signature__ a property that returned the Signature

[issue2775] Implement PEP 3108

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: I think we are as close as we are going to get with PEP 3018 being implemented. if profile/cProfile ever get merged that is great (issue #16492), but I'm not holding my breath and thus I am closing this issue. -- dependencies: -Merge profile/cPr

[issue15031] Split .pyc parsing from module loading

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: Another name for the method I thought of last night was parse_bytecode_container(). People like that more? That would lead to new terminology to distinguish bytecode ala dis module compared to bytecode file format ala importlib that makes it clear that what is

[issue16493] Document the 'optimize' argument to compile()

2012-11-17 Thread Brett Cannon
New submission from Brett Cannon: Looks like Georg added the flag in 2010 after Python 2.7 was already out, so this doesn't need to be backported. The possible values are: -1 : optimization level the interpreter is already executing with 0 : no optimization 1 : -O 2 : -OO -- ass

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: We might want an keyword-only 'optimize' argument that maps to the compile() function's 'optimize' argument. -- dependencies: +Document the 'optimize' argument to compile() ___ Pyth

[issue16494] Method on importlib.SourceLoader for creating bytecode file format/container

2012-11-17 Thread Brett Cannon
New submission from Brett Cannon: With issue #15031 providing a way to take a bytecode file and get a code object out of it, there should probably be a comparable method that takes a code object and a path stats dict and returns the bytes to write out to a file. This could also be a slight

[issue16494] Add a ethod on importlib.SourceLoader for creating bytecode file format/container

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- title: Method on importlib.SourceLoader for creating bytecode file format/container -> Add a ethod on importlib.SourceLoader for creating bytecode file format/container ___ Python tracker <http://bugs.pyth

[issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- title: Add a ethod on importlib.SourceLoader for creating bytecode file format/container -> Add a method on importlib.SourceLoader for creating bytecode file format/container ___ Python tracker <http://bugs.pyth

[issue16213] Expose private functions in marshal used by importlib

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: I've decided against this as issues #15031 and #16494 will alleviate the need to expose these functions. -- dependencies: -Split .pyc parsing from module loading resolution: -> rejected status: open -

[issue667770] import C API mess

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: The story of impports from the C level is much more sane than back in the 2.6 days thanks to PyImport_Import, PyImport_ImportModuleLevelObject, and PyImport_ImportModuleLevel. -- resolution: -> fixed stage: needs patch -> committed/rejected

[issue10224] Build 3.x documentation using python3.x

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: What exactly is blocking this? From looking on PyPI it seems Jinja2, Pygments, and Sphinx have all been ported to Python 3 at this point. Is it a matter of porting any custom code in Doc/ to Python 3 and then updating the Makefile to grab Python 3 versions of

[issue15292] import hook behavior documentation improvement

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: Closing as "works for me" due to lack of reply from OP. -- resolution: -> works for me status: pending -> closed ___ Python tracker <http://bugs.py

[issue15623] Init time relative imports no longer work from __init__.so modules

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue15623> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: Should we just close this, Barry? -- status: pending -> open ___ Python tracker <http://bugs.python.org/issue13572> ___ ___ Py

[issue4347] Circular dependency causes SystemError when adding new syntax

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: This still an issue? -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue4347> ___ ___ Python-bugs-lis

[issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.python.org/issue4182> ___ ___ Python-bugs-list

[issue6526] importlib.import_module affects permissions of .pyc files subsequently created by import

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: At some point this was fixed in importlib. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: A quick search through typeobject.c in 2.7 didn't show any PyErr_WarnPy3k calls that didn't have their return value checked or propagated. -- resolution: -> out of date status: open -> closed __

[issue2744] Fix test_cProfile

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/issue2744> ___ ___ Python-bugs-

[issue8585] zipimporter.find_module is untested

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: Been longer than a weekend. =) -- ___ Python tracker <http://bugs.python.org/issue8585> ___ ___ Python-bugs-list mailing list Unsub

[issue850482] Enhance frame handing in warnings.warn()

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue850482> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9761] stale .pyc files aren't cleaned out

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: Never heard back from OP. -- resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue1539925] warnings in interactive sessions

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue1539925> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8585] zipimporter.find_module is untested

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue8585> ___ ___ Python-bugs-list mailin

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: I can't find it, Mark, after searching through every XXX marker in a 2.7 checkout of Objects/typeobject.c . -- ___ Python tracker <http://bugs.python.org/i

[issue8787] warnings inside PyRun_SimpleString() display argv[1]

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue8787> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1545463] New-style classes fail to cleanup attributes

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue1545463> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2953] _zip_directory_cache untested and undocumented

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue2953> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: Go ahead and reopen. I just couldn't find the lines anymore when I closed it. On Nov 17, 2012 3:07 PM, "Mark Dickinson" wrote: > > Mark Dickinson added the comment: > > To clarify, here's the bug: the following code should r

[issue16497] zipimport.zipimporter.find_module() does not work with dotted module names

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: It actually does work, you just have to embed the subdirectory in the path you pass to zipimport.zipimporter(): >>> importer = zipimport.zipimporter('zipimport_example.zip/package/') >>> importer.find_module('package.eggs'

[issue15031] Split .pyc parsing from module loading

2012-11-17 Thread Brett Cannon
Brett Cannon added the comment: I can go with parse_cache_contents() as that aligns with imp.cache_from_source(). Does the API look reasonable (other than the parameter names since those would have to be renamed to be more in line with "cache")? Only thing I'm

[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue10966> ___ ___ Python-bugs-list

[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-11-17 Thread Brett Cannon
Changes by Brett Cannon : -- stage: patch review -> committed/rejected ___ Python tracker <http://bugs.python.org/issue10966> ___ ___ Python-bugs-list mai

[issue15031] Split .pyc parsing from module loading

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: The rationale is that was the way it already was prior to importlib. As for the approach you are suggesting, I am understand it, it will just not give the public method the same functionality which might not be that important. On Nov 18, 2012 5:18 AM, "

[issue15031] Split .pyc parsing from module loading

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: It's a method so that it can be overridden. Otherwise I can't develop my own format and have that be the only differing option from SourceLoader. On Nov 18, 2012 7:50 AM, "Nick Coghlan" wrote: > > Nick Coghlan added the comment: > &g

[issue15031] Split .pyc parsing from module loading

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: Or to put it another way, without making it a method other interpreters like IronPython and Jython will never be able to reuse SourceLoader effectively if they want their own cached file format. -- ___ Python tracker

[issue15031] Split .pyc parsing from module loading

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: FYI I'm talking with Dino for IronPython and I just emailed some Jython folks to try to get an opinion on whether they would prefer to have a method to override, something in _imp that they can implement, or simply implement marshal.loads() and dumps()

[issue15031] Split .pyc parsing from module loading

2012-11-18 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +dino.viehland ___ Python tracker <http://bugs.python.org/issue15031> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-18 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: -Document the 'optimize' argument to compile() resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.py

[issue16493] Document the 'optimize' argument to compile()

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: No one else is working on it. -- ___ Python tracker <http://bugs.python.org/issue16493> ___ ___ Python-bugs-list mailing list Unsub

[issue16499] CLI option for isolated mode

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: I don't think we need to worry about overlapping with gcc; -B, -b, -c, -d, etc. are all used by gcc for some reason or another. -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/is

[issue16497] zipimport.zipimporter.find_module() does not work with dotted module names

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: It certainly wouldn't hurt. I think all of the path-related things for that module are under-documented in terms of subdirectories, relative directories, etc. -- ___ Python tracker <http://bugs.python.org/is

[issue16506] devguide should have table of contents

2012-11-18 Thread Brett Cannon
Brett Cannon added the comment: The link does nothing because what is directly below the TOC link is the table of contents. There was originally a TOC but it was removed when it pushed too much of the quick start section off of the screen at initial load. You also don't want a large T

[issue16527] (very) long list of elif causes segfault

2012-11-22 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16527> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-23 Thread Brett Cannon
New submission from Brett Cannon: The grammar guarantees that 'yield from' statements have an expression to evaluate, plus a 'yield from' without an expression makes no sense. -- components: Library (Lib) messages: 176261 nosy: brett.cannon priority: normal severity

[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present

2012-11-23 Thread Brett Cannon
New submission from Brett Cannon: When there are no keyword-only arguments, the value of kw_defaults for FunctionDef is []. But when keyword-only arguments are present with no default values, it becomes [None]. That's bad as every other value in FunctionDef has a default of [] when the

[issue16546] ast.YieldFrom needlessly has its expr value as optional

2012-11-24 Thread Brett Cannon
Brett Cannon added the comment: Where is the doc issue? And it's a bit more than just a doc issue anyway as Python.asdl has the same issue and that is what is used to generate the code that represents the nodes. -- ___ Python tracker

[issue16545] ast.FunctionDef sets a bad value for kw_defaults when keyword-only arguments present

2012-11-24 Thread Brett Cannon
Brett Cannon added the comment: Ah, I see it now. I didn't realize that we allowed people to define keyword-only arguments in any order they wanted in terms of default values, allowing interleaving of default and non-default values. So this is correct, just different from everything

[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-28 Thread Brett Cannon
Brett Cannon added the comment: It might not be compulsory, but how else are you going to get a code object? Then again, get_code() kind of codifies the use of the word "code" for methods that return a code object. So if you want to do the work to change the name the

[issue16570] Absolute imports fail to take full path into account?

2012-11-28 Thread Brett Cannon
Brett Cannon added the comment: This test example is nonsensical. You are directly executing a package which leads to pkg/tests being put in sys.path first. That means you end up with http in pkg/tests masking the one in the stdlib, which causes your ``from http.clients import HTTPConnection

[issue16570] Absolute imports fail to take full path into account?

2012-11-28 Thread Brett Cannon
Brett Cannon added the comment: When you execute a module on the command line, sys.path[0] is set to that containing directory (e.g. pkg/tests in your example; just have pkg/tests/__init__.py print out sys.path to see what I mean). ``import http`` is going to look on sys.path no matter what

[issue16570] Absolute imports fail to take full path into account?

2012-11-28 Thread Brett Cannon
Brett Cannon added the comment: Glad it makes sense now. =) I was writing my reply while you sent yours. Anyway, your PYTHONPATH setting goes on to sys.path *after* the directory containing the script being executed. This is so that when you execute Python code somewhere it will get the local

[issue16574] clarify policy on updates to final peps

2012-11-28 Thread Brett Cannon
Brett Cannon added the comment: Once PEPs reach their final status, I view them basically done if there is more official docs. For instance, I updated PEP 302 because the import and importlib docs were not as thorough as they are now thanks to Barry. But now that we have proper docs I don&#

[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object

2012-11-29 Thread Brett Cannon
Brett Cannon added the comment: Are you still planning on committing this, Andrew? -- ___ Python tracker <http://bugs.python.org/issue16421> ___ ___ Python-bug

[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-11-29 Thread Brett Cannon
Brett Cannon added the comment: The doc patch LGTM. -- ___ Python tracker <http://bugs.python.org/issue16194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15031] Split .pyc parsing from module loading

2012-12-04 Thread Brett Cannon
Brett Cannon added the comment: So we have IronPython who has their own format, Jython who has their own format *and* .pyc files (which would screw with __cached__ so I assume they won't try to use both at the same time), PyPy which use .pyc files, and CPython which uses .pyc file

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-09 Thread Brett Cannon
New submission from Brett Cannon: I'm wondering which modules in the stdlib lack pure Python implementations (and could legitimately have one, e.g. sqlite can't really have a pure Python implementation). Once we know how big/small the list is a decision could be made as to whether

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-10 Thread Brett Cannon
Brett Cannon added the comment: So expat doesn't count as that literally wraps the expat library. Random also requires accessing the system randomization libraries to work properly so I don't think that is a candidate either. As for the compression libraries, those could be re-i

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-10 Thread Brett Cannon
Brett Cannon added the comment: No, sqlite does not belong on this list as it wraps a C library. Plus there is an explicit block for ctypes-based modules in the stdlib which would prevent moving over the PyPy implementation. And I'm sure pure Python versions of all the crypto librarie

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-10 Thread Brett Cannon
Brett Cannon added the comment: Sure, a general XML parsing library could be written in Python, but they wouldn't be named expat. =) The expat module wraps a specific XML parser (expat) so I still do not consider it applicable for this list. As for random, you are right that it doesn&

[issue16659] Pure Python implementation of random

2012-12-11 Thread Brett Cannon
Brett Cannon added the comment: To see how to write tests that exercise both the C and Python versions look at test_heapq and test_warnings as examples. It will require some refactoring, but it's easy to do. -- ___ Python tracker

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-11 Thread Brett Cannon
Brett Cannon added the comment: Alex: yes, the builtins could almost all be re-implemented in pure Python, but there is a performance consideration vs. benefit (e.g. if we re-implemented map() in Python which VMs would use it vs. implement it in some native way for performance?). But one

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-13 Thread Brett Cannon
Brett Cannon added the comment: Eric, I know you didn't just mean to suggest Python != efficient. =) Yes, it should be in the list because other VMs might not want to re-implement that code in some native language to the VM. And I assume all code in the stdlib tries to be efficient, so

[issue15974] Optional compact and colored output for regrest

2012-12-17 Thread Brett Cannon
Brett Cannon added the comment: Clang's test runner output is really nice; green-coloured progress bar on one line, next line listing what is executing. Eventual output listing details of the run (e.g. counts of what was run, expected failures

[issue16703] except statement turns defined variable into undefined

2012-12-18 Thread Brett Cannon
Brett Cannon added the comment: As Mark pointed out, this is on purpose and is not going to change since Python lacks block-level scoping of variables and thus causes the last case related to the variable to take precedence. It might be a little unexpected, but it's not that unreasonable

[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions

2012-12-19 Thread Brett Cannon
Brett Cannon added the comment: If Antoine can't think of any then I think there aren't any more. This does need a test, though. -- ___ Python tracker <http://bugs.python.o

[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions

2012-12-19 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> test needed type: -> behavior ___ Python tracker <http://bugs.python.org/issue16730> ___ ___ Python-bugs-list

[issue16746] clarify what should be sent to peps@

2012-12-21 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon nosy: +brett.cannon priority: normal -> low stage: -> patch review ___ Python tracker <http://bugs.python.or

[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-21 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16748> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-22 Thread Brett Cannon
Brett Cannon added the comment: I would totally support tossing relative file paths in Python 3.4 as it has been nothing but backwards-compatibility headaches and is essentially wrong as the module's file is not relative to the current directory necess

[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Brett Cannon
Brett Cannon added the comment: This was committed in default through rev d22e9e3a3326 but there was some error in the connection from hg.python.org and so it didn't get tacked on. Thanks to Thomas for the report and Berker for the patch! -- nosy: +brett.cannon resolution: -&g

[issue16803] Make time_importlib run tests under both _frozen_importlib and importlib._bootstrap

2012-12-28 Thread Brett Cannon
New submission from Brett Cannon: Need to do some work on the importlib tests such that they get run using both _frozen_importlib and importlib._bootstrap to prevent any drift between importlib/_bootstrap.py and import.c (and to make it easier to develop). -- components: Tests

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2012-12-28 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue16795> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2012-12-28 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker <http://bugs.python.org/issue7325> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    33   34   35   36   37   38   39   40   41   42   >