[issue17314] Stop using imp.find_module() in multiprocessing

2013-05-25 Thread Brett Cannon
Brett Cannon added the comment: Catching the AttributeError is in case a loader is used that doesn't define init_module_attrs(). Since it will be new to Python 3.4 I can't guarantee that it will exist (in case someone doesn't subclass

[issue18055] Stop using imp in IDLE

2013-05-25 Thread Brett Cannon
Brett Cannon added the comment: If you would prefer to keep using imp in IDLE to make management across versions easier I'm fine with that, just understand my goal is to deprecate imp in Python 3.4 (but won't remove it until Python 4 so people can write Python 2/3 compatible code,

[issue18065] set __path__ = [] for frozen packages

2013-05-25 Thread Brett Cannon
New submission from Brett Cannon: If you import the frozen __phello__ package, you will notice that __phello__.__path__ == ['__phello__']. While that seems innocuous, that could potentially lead to incorrect results if there just so happens to be a directory named __phello__ which

[issue17314] Stop using imp.find_module() in multiprocessing

2013-05-26 Thread Brett Cannon
Brett Cannon added the comment: In the common case of SourceLoader it will set __loader__, __package__, __file__, and __cached__. -- ___ Python tracker <http://bugs.python.org/issue17

[issue18070] change importlib.util.module_for_loader to unconditionally set attributes

2013-05-27 Thread Brett Cannon
New submission from Brett Cannon: importlib.util.module_for_loader (as well as set_package and set_loader) only set those attributes either when they are not already set or when the module is new. I realized this is a problem as it means a reload won't work the way one might expect. I

[issue18072] Add an implementation of importlib.abc.InspectLoader.get_code

2013-05-27 Thread Brett Cannon
New submission from Brett Cannon: I'm contemplating adding an implementation of importlib.abc.InspectLoader.get_code() which relies on get_source() (and then another version in ExecutionLoader which uses get_filename()). The reason I'm hesitant is get_source() is often an expensive

[issue18072] Add an implementation of importlib.abc.InspectLoader.get_code

2013-05-27 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue18072> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18070] change importlib.util.module_for_loader to unconditionally set attributes

2013-05-27 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue18070> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18072] Add an implementation of importlib.abc.InspectLoader.get_code

2013-05-27 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue18072> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18072] Add an implementation of importlib.abc.InspectLoader.get_code

2013-05-27 Thread Brett Cannon
Brett Cannon added the comment: So it turns out I will simply have to make the methods not abstract anymore. Thanks to multiple inheritance I can't implement the method in ExecutionLoader and keep it abstract in case someone subclasses InspectLoader and then creates another subcla

[issue18075] Infinite recursion tests triggering a segfault

2013-05-27 Thread Brett Cannon
New submission from Brett Cannon: If you run any test that has infinite recursion (test_json test_exceptions test_sys test_runpy) it will segfault with a fresh checkout under OS X 10.8.3 using Clang. Not sure how widespread this is. I did check that I am using a clean checkout of the default

[issue18072] Add an implementation of importlib.abc.InspectLoader.get_code

2013-05-27 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18076] Implement importlib.util.decode_source_bytes()

2013-05-27 Thread Brett Cannon
New submission from Brett Cannon: Right now importlib.abc.SourceLoader implements get_source(), but most of it is decoding bytes properly. That should probably be abstracted out to importlib.util so that it's available even for loaders which don't provide get_data() or ge

[issue18055] Stop using imp in IDLE

2013-05-27 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue18055> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18075] Infinite recursion tests triggering a segfault

2013-05-28 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- assignee: -> ronaldoussoren ___ Python tracker <http://bugs.python.org/issue18075> ___ ___ Python-bugs-list mai

[issue18085] Verifying refcounts.dat

2013-05-28 Thread Brett Cannon
Brett Cannon added the comment: Wow, I didn't even know that file existed. It could actually help with some static analysis of the C code to verify that the refcounts are as expected w/o actually having to do inter-procedural analysis to figure out all of the refcount values. I wond

[issue15767] add ImportNotFoundError

2013-05-28 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue15767> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18070] change importlib.util.module_for_loader to unconditionally set attributes

2013-05-28 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18086] Create importlib.util.set_attrs_post_import()

2013-05-28 Thread Brett Cannon
New submission from Brett Cannon: There is no good reason to have set_loader and set_package separately. There should just be a single decorator which sets both of those attributes post-import (with the proper doc note saying use module_for_loader instead when possible to have the attributes

[issue18088] Create importlib.abc.Loader.init_module_attrs()

2013-05-28 Thread Brett Cannon
New submission from Brett Cannon: There are a bunch of attributes that need to be set on a module, and yet they are only handled by various decorators in importlib.util. The problem with that is there is no way in the API to override or expand upon setting those attributes pre-loading; only

[issue18086] Create importlib.util.set_attrs_post_import()

2013-05-28 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> rejected status: open -> closed superseder: -> Create importlib.abc.Loader.init_module_attrs() ___ Python tracker <http://bugs.python.or

[issue18089] Create importlib.abc.InspectLoader.load_module()

2013-05-28 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Create importlib.abc.Loader.init_module_attrs() ___ Python tracker <http://bugs.python.org/issue18089> ___ ___ Pytho

[issue18089] Create importlib.abc.InspectLoader.load_module()

2013-05-28 Thread Brett Cannon
New submission from Brett Cannon: -- assignee: brett.cannon components: Library (Lib) messages: 190261 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Create importlib.abc.InspectLoader.load_module() type: enhancement versions: Python 3.4

[issue18089] Create importlib.abc.InspectLoader.load_module()

2013-05-31 Thread Brett Cannon
Brett Cannon added the comment: New changeset e873f2e67353 by Brett Cannon in branch 'default': Issues #18088, 18089: Introduce http://hg.python.org/cpython/rev/e873f2e67353 -- resolution: -> fixed stage: test needed -> committed/rejected status

[issue18088] Create importlib.abc.Loader.init_module_attrs()

2013-05-31 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18114] Update PyImport_ImportFrozenModuleObject() to use importlib

2013-05-31 Thread Brett Cannon
New submission from Brett Cannon: _imp.init_frozen is not really necessary; you can implement imports entirely using the other frozen-related functions. Because of that it's probably better to simply rewrite PyImport_ImportFrozenModuleObject() to use importlib to make the code easi

[issue18115] Use importlib.util.module_to_load in all loaders in importlib

2013-05-31 Thread Brett Cannon
New submission from Brett Cannon: BuiltinImporter, FrozenImporter, and ExtensionFileLoader all have their own custom code to manage clearing sys.modules if something goes wrong. Should see if any of them would break if they used importlib.util.module_to_load. And if they would break thanks to

[issue18065] set __path__ = [] for frozen packages

2013-05-31 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18115] Use importlib.util.module_to_load in all loaders in importlib

2013-05-31 Thread Brett Cannon
Brett Cannon added the comment: Turns out BuiltinImporter doesn't like having a pre-existing module, so a new keyword argument will be necessary to allow for only the cleanup code to run and not the construction of a new module. -- ___ P

[issue18021] Update broken link to Apple Publication Style Guide

2013-06-03 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue18021> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18021] Update broken link to Apple Publication Style Guide

2013-06-03 Thread Brett Cannon
Changes by Brett Cannon : -- stage: patch review -> needs patch ___ Python tracker <http://bugs.python.org/issue18021> ___ ___ Python-bugs-list mailing list Un

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-04 Thread Brett Cannon
Brett Cannon added the comment: I'm going to toss Armin's request over to core-mentorship since the fix is easy. Is all you are after, Armin, a ``not os.path.isfile(cfile) or os.path.islink(cfile)`` check which if true raises an exception? -- assignee: brett.cannon -> s

[issue18136] test_distutils failing under OS X 10.8 w/ clang

2013-06-04 Thread Brett Cannon
New submission from Brett Cannon: I have not had test_distutils succeed in ages. It looks like various header files are not being passed to the compiler properly as all three test failures stem from PyModuleDef_HEAD_INIT supposedly not existing or some other macro. Below is an example failure

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-04 Thread Brett Cannon
Brett Cannon added the comment: Armin: I'm going off of http://bugs.python.org/msg189428 where you say you want an exception raised. If there is something else you want to suggest that's fine as long as it's not to revert the semantics since I'm no

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the clarification, Armin! -- ___ Python tracker <http://bugs.python.org/issue17222> ___ ___ Python-bugs-list mailin

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: OK, so here was what a patch will need: * Change py_compile to raise an exception when ``not os.path.isfile(cfile) or os.path.islink(cfile)``; probably raise ValueError and mention that import itself would replace the file w/o raising an exception * Add tests

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: You use importlib.import_module to do programmatic imports (and FYI dots never go into the first argument of __import__). -- ___ Python tracker <http://bugs.python.org/issue17

[issue18143] ssl.get_default_verify_paths()

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: I have no clue what is being returned by this function. Any chance of using types.SimpleNamespace to give meaningful names to the returned values instead of a tuple? -- nosy: +brett.cannon ___ Python tracker <h

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: If you look at the importlib source code in 2.7 it's actually really small and simply translates the call into an __import__ call under the hood. So __import__ can completely handle relative imports, but you were not using the level argument to __import_

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: I'm going to resolve this issue myself, but "blog" about it on core-mentorship so others can follow along with how I resolve the bug. -- assignee: -> brett.cannon ___ Python tracker <h

[issue18143] ssl.get_default_verify_paths()

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: That's better. As long as you use result[1::2] then the tuple is reasonable to use for the order need and still make sense as an iterable. -- ___ Python tracker <http://bugs.python.org/is

[issue18145] Strange behavior when importing internal modules in the __init__.py of a submodule

2013-06-05 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 2.7, Python 3.4 ___ Python tracker <http://bugs.python.org/issue18145> ___ ___ Python-bugs-list mailing list Unsub

[issue18145] Strange behavior when importing internal modules in the __init__.py of a submodule

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: It's because you have a nested circular import. When you import package2.subpackage from within package2.subpackage you're in package2 importing package2 and also in package2.subpackage importing package2.subpackage. You can solve your problem by do

[issue18145] Strange behavior when importing internal modules in the __init__.py of a submodule

2013-06-05 Thread Brett Cannon
Brett Cannon added the comment: It can't. The AttributeError is in the executing module code, not import itself so there is no reasonable way to tell that the failure was because of a circular loop in the import and not simply because you tried to get at an attribute that doesn't

[issue18136] test_distutils failing under OS X 10.8 w/ clang

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: > echo $CPPFLAGS -I /Users/bcannon/Developer/include -I/Users/bcannon/Developer/Cellar/readline/6.2.4/include > echo $LDFLAGS -L /Users/bcannon/Developer/lib -L/Users/bcannon/Developer/Cellar/readline/6.2.4/lib > echo $CFLAGS -Wno-unused-value -Wno-e

[issue18136] Put local build paths before system build paths in configure.ac and Makefile.pre.in

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: I'll change the title to make it more obvious what the problem is. And yes, Homebrew by default uses /usr/local if I remember correctly. -- title: test_distutils failing under OS X 10.8 w/ clang -> Put local build paths before system build

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: Much like ImportError now has 'name' and 'path', AttributeError should get an 'attr' attribute that can only be set through a keyword argument or after creating an instance. That would make the common ``try/except AttributeError``

[issue17314] Stop using imp.find_module() in multiprocessing

2013-06-07 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18055] Stop using imp in IDLE

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the help everyone! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: Current status (with test_imp stripped out): > ack "imp\.(find|load)_module" Lib Lib/modulefinder.py 482:return imp.find_module(name, path) Lib/pkgutil.py 189:file, filename, etc = imp.find_module(subname, path) 251:

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: The modulefinder usage is directly exposed in its API as the return value of a find_module method, which makes removal a pain. Adding Thomas Heller to see what he has to say. The pkgutil usage is in classes that have been deprecated, so don't care. The

[issue18157] remove usage of imp.load_module() from pydoc

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: -- assignee: brett.cannon components: Library (Lib) messages: 190765 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: remove usage of imp.load_module() from pydoc type: behavior versions: Python 3.4

[issue18158] Delete test_importhooks

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: Tests don't serve much of a purpose with test_importlib covering the uses, plus the tests are old and are not worth updating. -- assignee: brett.cannon components: Tests messages: 190766 nosy: brett.cannon priority: normal severity: normal stage:

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Delete test_importhooks ___ Python tracker <http://bugs.python.org/issue14797> ___ ___ Python-bugs-list mailin

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +remove usage of imp.load_module() from pydoc ___ Python tracker <http://bugs.python.org/issue14797> ___ ___ Python-bug

[issue18162] Add index attribute to IndexError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: Give IndexError an index attribute to store the index it was raised for. Since it is typically an integer there is no reason to worry about GC and thus using a regex. -- components: Interpreter Core messages: 190777 nosy: brett.cannon priority: normal

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: KeyError could grow a 'key' attribute for the key that triggered the exception. Since keys are expected to be immutable (in order to be hashable) there is no GC issue to worry about. -- components: Interpreter Core messages: 190778 nosy: br

[issue18166] 'value' attribute for ValueError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: A 'value attribute for ValueError could store a weakref to the value which triggered the exception. It should be a weakref so at to prevent accidental prevention of GC of the value. -- components: Interpreter Core messages: 190781 nosy: brett.c

[issue18165] Add 'unexpected_type' to TypeError

2013-06-07 Thread Brett Cannon
New submission from Brett Cannon: TypeError could grow an 'unexpected_type' attribute to store the type of the argument that was used to trigger the exception. Since types are expected to not be deleted there is no GC worry. Having an 'expected' attribute makes no sense in

[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: So are you arguing it should be a weakref, or just saying you view the statement as false? -- ___ Python tracker <http://bugs.python.org/issue18

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: And standardizing on an attribute name, of course. =) -- ___ Python tracker <http://bugs.python.org/issue18156> ___ ___ Python-bug

[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon
Brett Cannon added the comment: What Benjamin said. Adding something like this is mostly about a nicer constructor (``AttributeError(attr='meth')``) and automatically creating the message for the exception (although that would require another argument like 'object' or som

[issue18034] Last two entries in the programming FAQ are out of date (import related)

2013-06-08 Thread Brett Cannon
Brett Cannon added the comment: Hasn't been moved yet. And the __import__ question should probably be rephrased as "don't do this". -- ___ Python tracker <http://bug

[issue18034] Last two entries in the programming FAQ are out of date (import related)

2013-06-08 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Document/deprecate imp ___ Python tracker <http://bugs.python.org/issue18034> ___ ___ Python-bugs-list mailin

[issue18170] define built-in exceptions in Python code

2013-06-08 Thread Brett Cannon
New submission from Brett Cannon: This quite possibly won't work because of performance, but I have been wondering how feasible it would be to define as many core exception types as possible in pure Python code and then freeze the module for loading. It would have the benefit of m

[issue18162] Add index attribute to IndexError

2013-06-09 Thread Brett Cannon
Brett Cannon added the comment: Yes, I mean weakref. -- ___ Python tracker <http://bugs.python.org/issue18162> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18170] define built-in exceptions in Python code

2013-06-09 Thread Brett Cannon
Brett Cannon added the comment: Yeah, that's the tricky bit. =) That's why I was thinking of starting with the leaf exceptions and then just slowly working down the hierarchy until I hit exceptions that just had to exist in C code (e.g. BaseException, Exception, and maybe SyntaxE

[issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__

2013-06-10 Thread Brett Cannon
Brett Cannon added the comment: Forgot that PyImport_ImportFrozenModule() uses PyImport_ImportFrozenModuleObject() and the former is used to load _frozen_importlib, so can't drop the function. The code could still be updated, though, to set __package__ before the code object is executed.

[issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__

2013-06-10 Thread Brett Cannon
Brett Cannon added the comment: Marking as easy for any C coders. -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue18114> ___ ___ Python-bug

[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue17907> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Brett Cannon
New submission from Brett Cannon: As part of deprecating imp, need to move imp.get_magic() to importlib where it now belongs. Will be exposed as an attribute instead of a function, though. -- components: Library (Lib) messages: 190981 nosy: brett.cannon priority: normal severity

[issue17177] Document/deprecate imp

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Move imp.get_magic() to importlib ___ Python tracker <http://bugs.python.org/issue17177> ___ ___ Python-bugs-list m

[issue17177] Document/deprecate imp

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Move imp.reload() to importlib ___ Python tracker <http://bugs.python.org/issue17177> ___ ___ Python-bugs-list mailin

[issue18193] Move imp.reload() to importlib

2013-06-11 Thread Brett Cannon
New submission from Brett Cannon: For convenience it should live directly off of importlib and not importlib.util. -- components: Library (Lib) messages: 190982 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Move imp.reload() to importlib

[issue18194] Move imp.source_from_cache/cache_from_source to importlib

2013-06-11 Thread Brett Cannon
New submission from Brett Cannon: To facilitate deprecating imp, need to move imp.source_from_cache() and cache_from_source() to importlib.util or as static methods on importlib.machinery.SourceLoader. -- components: Library (Lib) messages: 190983 nosy: brett.cannon priority: normal

[issue17177] Document/deprecate imp

2013-06-11 Thread Brett Cannon
Brett Cannon added the comment: There should now be issues for each of the required relocations to make imp redundant. -- dependencies: +Move imp.source_from_cache/cache_from_source to importlib ___ Python tracker <http://bugs.python.org/issue17

[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: brett.cannon -> ___ Python tracker <http://bugs.python.org/issue17907> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18192] Move imp.get_magic() to importlib

2013-06-11 Thread Brett Cannon
Brett Cannon added the comment: This could be an attribute on importlib.machinery.SourceLoader instead of an attribute in importlib.util. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18157] remove usage of imp.load_module() from pydoc

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue14797] Deprecate imp.find_module()/load_module()

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18158] Delete test_importhooks

2013-06-11 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18163] Add a 'key' attribute to KeyError

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: What David said. =) The fact that the key is the first value from args is almost happenstance as the exception message is customized in __str__() and not in what is passed to the exception. But what if I had defined __getattr__ or __getattribute__ and had some

[issue18192] Move imp.get_magic() to importlib

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: So what are your arguments to making it more accessible? The typical user won't need to use it so I don't know if it really requires being off of importlib directly like find_loader, import_module, or (eventually) reload (which for convenience-sake wh

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon : -- title: add ImportNotFoundError -> add ModuleNotFoundError ___ Python tracker <http://bugs.python.org/issue15767> ___ ___ Python-

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
New submission from Brett Cannon: The common idiom:: try: import something except ImportError: pass should be updated to use ModuleNotFoundError instead to not accidentally swallow ImportError exceptions which signal actual errors. -- components: Library (Lib) keywords: easy

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +add ModuleNotFoundError ___ Python tracker <http://bugs.python.org/issue18200> ___ ___ Python-bugs-list mailin

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: Changeset 84105:281857369a78 and 84106:c4d7228421df have some updates to use ModuleNotFoundError. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue18200> ___ ___ Python-bugs-list mailing list Un

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch that uses ModuleNotFoundError in the stdlib sans test modules. -- keywords: +patch Added file: http://bugs.python.org/file30568/use_ModuleNotFoundError.diff ___ Python tracker <http://bugs.python.

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-13 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-13 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker <http://bugs.python.org/issue18200> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Brett Cannon
Brett Cannon added the comment: Answered Berker's questions from the review. At this point Berker just needs to tweak one line in the test and it should then be good to go. -- ___ Python tracker <http://bugs.python.org/is

[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Brett Cannon
Brett Cannon added the comment: With Berker's nice use of TestCase.subTest() I think the patch is good to go! I should hopefully get this checked in today or tomorrow. -- resolution: -> fixed stage: patch review -> commit review status: open

[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Berker! -- assignee: -> brett.cannon stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17177] Deprecate imp

2013-06-14 Thread Brett Cannon
Changes by Brett Cannon : -- title: Document/deprecate imp -> Deprecate imp ___ Python tracker <http://bugs.python.org/issue17177> ___ ___ Python-bugs-list mai

[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon
Brett Cannon added the comment: Any chance I could get a response to my questions, Barry, soon? I think I can finish the rest of the issues related to deprecating imp this weekend if we can settle this quickly. -- ___ Python tracker <h

[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> barry ___ Python tracker <http://bugs.python.org/issue18192> ___ ___ Python-bugs-list mailing list Unsubscri

[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon
Brett Cannon added the comment: I'll put it into importlib.util.MAGIC. -- ___ Python tracker <http://bugs.python.org/issue18192> ___ ___ Python-bugs-list m

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-14 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

<    25   26   27   28   29   30   31   32   33   34   >