[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Eric Snow
Eric Snow added the comment: The failure output with -v: ... # /home/esnow/projects/cpython/Lib/http/__pycache__/__init__.cpython-33.pyc matches /home/esnow/projects/cpython/Lib/http/__init__.py # code object from /home/esnow/projects/cpython/Lib/http/__pycache__/__init__.cpython-33.pyc

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Eric Snow
Eric Snow added the comment: Here's a simple patch the allows bogus names in the fromlist. I'm going to verify that this matches the 3.2 semantics, which may not be so cut-and-dry. -- keywords: +patch Added file: http://bugs.python.org/file26876/issue

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-16 Thread Eric Snow
Eric Snow added the comment: The following seems to indicate that an ImportError should be raised as expected. I'm guessing that somewhere along the line the exception gets silently eaten. -- (3.2) Python/import.c:ensure_fromlist() [1] submod = import_subm

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-17 Thread Eric Snow
Eric Snow added the comment: When people want to import modules with "runtime" names, they regrettably turn to __import__() and likely will for a while. What a source of headaches! If it were less convenient to use __import__(), perhaps fewer people would use it. Could we remo

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2012-08-17 Thread Eric Snow
Changes by Eric Snow : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue14905> ___ ___ Python-bugs-list mailing list Un

[issue15720] move __import__() out of the default lookup chain

2012-08-17 Thread Eric Snow
New submission from Eric Snow: When people want to import modules with "runtime" names, they regrettably turn to __import__(), have done so for many years, and likely will for a while. If it were less convenient to use __import__(), fewer people would use it. I'm putting t

[issue15715] __import__ now raises with non-existing items in fromlist in 3.3

2012-08-17 Thread Eric Snow
Eric Snow added the comment: I've taken the tanget over to issue15720. -- ___ Python tracker <http://bugs.python.org/issue15715> ___ ___ Python-bugs-list m

[issue15578] Crash when modifying sys.modules during import

2012-08-17 Thread Eric Snow
Eric Snow added the comment: Here's the deal. import_module_level() gets called for v1 from sa (where "globals" comes from). In that function it first calls get_parent(), which returns a borrowed reference to the sa module object. Then that parent object is passed to load_n

[issue15716] Ability to specify the PYTHONPATH via a command line flag

2012-08-17 Thread Eric Snow
Eric Snow added the comment: Would issue14803 be sufficient? Certainly not quite as concise, but deferring to that solution would limit the proliferation of command-line arguments to the interpreter. -- ___ Python tracker <http://bugs.python.

[issue15720] move __import__() out of the default lookup chain

2012-08-17 Thread Eric Snow
Eric Snow added the comment: Ah, __import__() is used all over the place in the stdlib. I won't have time right away to put together the patch then. However, here's what I'm planning: * expose builtin___import__() (from Python/bltinmodule.c) as imp.__import__(). * expose

[issue15767] add ModuleNotFoundError

2012-08-22 Thread Eric Snow
New submission from Eric Snow: In issue 15316 (msg168896, Brett Cannon): Create a ModuleNotFoundError exception that subclasses ImportError and catch that (breaks doctests and introduces a new exception that people will need to be aware of, plus the question of whether it should just

[issue15316] runpy swallows ImportError information with relative imports

2012-08-22 Thread Eric Snow
Eric Snow added the comment: > While I prefer 3, I think it's a bit late in the release to try to > introduce a new exception to begin separating the meaning of 16 > different ``raise ImportError`` cases in importlib._bootstrap based on > inheritance. My gut says 4 is the best s

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-08-23 Thread Eric Snow
Eric Snow added the comment: FWIW, the patch looks good to me. This is probably the last week to get this in for 3.3.0. -- ___ Python tracker <http://bugs.python.org/issue15

[issue2051] PYO file permission problem

2012-08-23 Thread Eric Snow
Eric Snow added the comment: here's a test. I'll work on a patch when I get a chance (and no one's beaten me to it :). -- keywords: +patch nosy: +eric.snow Added file: http://bugs.python.org/file26980/issue2051_test.eric.snow.diff ___

[issue2051] PYO file permission problem

2012-08-24 Thread Eric Snow
Eric Snow added the comment: So this boils down to set_data() not having a mode parameter, right? Alas, the obvious approach, adding it, breaks backward compatibility. The alternative is to use source_from_cache() in set_data() to get the source path, and then get the mode there. Of

[issue2051] PYO file permission problem

2012-08-24 Thread Eric Snow
Changes by Eric Snow : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue2051> ___ ___ Python-bugs-list mailing list Unsubscri

[issue2051] PYO file permission problem

2012-08-24 Thread Eric Snow
Eric Snow added the comment: My patch was very similar. _cache_bytecode() is a good addition. Good point about the cache, too. I'm not convinced that source_path is the right thing to add to the API (even just for SourceFileLoader). I would have thought mode would have been

[issue15781] test_threaded_import fails with -j4

2012-08-25 Thread Eric Snow
Eric Snow added the comment: So this was a random one-off (hardly even intermittent) failed test that passed on the retry. Ah, threads. Is there an easy way to find all other failures in test_threaded_import in the past, for this and for all buildbots? Do we have information about load

[issue15781] test_threaded_import fails with -j4

2012-08-25 Thread Eric Snow
Eric Snow added the comment: (sorry, only saw the first couple messages) -- ___ Python tracker <http://bugs.python.org/issue15781> ___ ___ Python-bugs-list mailin

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-08-27 Thread Eric Snow
Eric Snow added the comment: Here's a patch for 3.3 with a test. Though, I'm still setting up my windows box for building Python, I wanted to get this patch up. On its own the test should fail on Windows. In that case, it should be backport-able. If no one has a chance to verif

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-08-31 Thread Eric Snow
Eric Snow added the comment: Doesn't EIO cover pathologies which we don't want to silence? I could see adding EROFS though. -- nosy: +eric.snow ___ Python tracker <http://bugs.python.o

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-08-31 Thread Eric Snow
Eric Snow added the comment: I was thinking along the same lines, though it might make sense for EROFS and a few others. (http://aplawrence.com/Unixart/errors.html) -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue15

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-09-04 Thread Eric Snow
Eric Snow added the comment: Well, the workflow on Windows is certainly different. I've run out of time to get this sorted out in the short term. However, the patch should be pretty close to what's needed. Obviously the posix-only bit doesn't fit for a Window

[issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs

2012-09-06 Thread Eric Snow
Eric Snow added the comment: As far as the import system goes, Barry Warsaw added a really nice page to the language reference[1]. However, it sounds like your concern is with taking advantage of the tools that importlib provides. First of all, a good thing to recognize is that importlib

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: Wouldn't the following also start working (currently a NameError)? class X: def f(self): print(f.__qualname__) def g(self): f(None) X().f() X().g() How about this[1] (also currently a NameError): class Outer:

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: Actually, that second would still not work (it would have to pass through the non-lexical inner scope that Nick mentioned). Is that also the case for the first one? -- ___ Python tracker <http://bugs.python.

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-09-07 Thread Eric Snow
Eric Snow added the comment: sounds like it would be worth a shot -- ___ Python tracker <http://bugs.python.org/issue12370> ___ ___ Python-bugs-list mailin

[issue15885] @staticmethod __getattr__ doesn't work

2012-09-08 Thread Eric Snow
Eric Snow added the comment: In Python 2 the code example generates an old-style class. When I tried it with a new style class, it worked fine: class Wrapper(object): @staticmethod def __getattr__(item): return repr(item) # dummy a = Wrapper() print(a.foo

[issue15891] A public facing API for __unittest = True

2012-09-10 Thread Eric Snow
Eric Snow added the comment: yeah, I keep thinking we need a better API for managing tracebacks. One of these days... -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue15

[issue15911] Debugging import problems is hard

2012-09-10 Thread Eric Snow
Eric Snow added the comment: This comes back to #14657, which addressed the frozen vs. non-frozen copies of importlib. It sounds like one useful solution for your situation would be for _frozen_importlib to be used only long enough for bootstrap purposes. This was discussed in that other

[issue15912] Intermittent import failure

2012-09-10 Thread Eric Snow
Eric Snow added the comment: The FileFinder class (a "path entry finder") uses a cache to efficiently track changes to files. You can manually clear this cache by calling importlib.invalidate_caches(). The Python test suite has several examples of clearing the FileFinder cache i

[issue15912] Intermittent import failure

2012-09-10 Thread Eric Snow
Changes by Eric Snow : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue15912> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15912] Intermittent import failure

2012-09-10 Thread Eric Snow
Eric Snow added the comment: Thinking about it, it may be worth adding a note to the docs for sys.modules making it clear about importlib.invalidate_caches(). I'll see about writing up a patch when I get a chance. -- status: pending -&

[issue15912] Intermittent import failure

2012-09-11 Thread Eric Snow
Eric Snow added the comment: The relationship between invalidate_caches() and sys.modules is definitely tenuous. However, my rationale was that people would look for an explanation on why modifying sys.modules was not working as expected. The sys.modules doc entry was the one that seemed to

[issue16160] subclassing types.SimpleNamespace does not work

2012-10-09 Thread Eric Snow
Eric Snow added the comment: Yikes. I'll get a patch up tonight. -- assignee: -> eric.snow ___ Python tracker <http://bugs.python.org/issue16160> ___ _

[issue16160] subclassing types.SimpleNamespace does not work

2012-10-09 Thread Eric Snow
Eric Snow added the comment: Here's a patch that fixes subclass support. It was supposed to work in the first place. Guess I had tunnel vision at the time. The fix is essentially a copy of the code in dict_new() in Objects/dictobject.c. I left out the part about releasing GC if the ty

[issue16160] subclassing types.SimpleNamespace does not work

2012-10-10 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file27512/issue16160.diff ___ Python tracker <http://bugs.python.org/issue16160> ___ ___ Python-bugs-list m

[issue16160] subclassing types.SimpleNamespace does not work

2012-10-10 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch that addresses Éric's review comments. -- Added file: http://bugs.python.org/file27524/issue16160.diff ___ Python tracker <http://bugs.python.o

[issue16202] sys.path[0] security issues

2012-10-13 Thread Eric Snow
Eric Snow added the comment: > For 3.4, I plan to have a look at the organically-grown-over-time mess > that is CPython's current interpreter initialisation system and see if I > can figure out something a bit more sane and easier to configure/control > (especially when embe

[issue16160] subclassing types.SimpleNamespace does not work

2012-10-13 Thread Eric Snow
Eric Snow added the comment: Am I good to commit this? -- ___ Python tracker <http://bugs.python.org/issue16160> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12486] tokenize module should have a unicode API

2012-10-13 Thread Eric Snow
Changes by Eric Snow : ___ Python tracker <http://bugs.python.org/issue12486> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
New submission from Eric Snow: While traversing the passed iterable, untokenize() will go to "compatibility mode" one it hits a 2-tuple instead of a 5-tuple (coming from the iterable). That token will not go through the normal steps that other tokens do. Most critically, if tha

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
Changes by Eric Snow : -- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file27559/untokenize_compat.diff ___ Python tracker <http://bugs.python.org/issu

[issue16223] untokenize returns a string if no encoding token is recognized

2012-10-13 Thread Eric Snow
New submission from Eric Snow: If you pass an iterable of tokens and none of them are an ENCODING token, tokenize.untokenize() returns a string. This is contrary to what the docs say: It returns bytes, encoded using the ENCODING token, which is the first token sequence output by

[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2012-10-13 Thread Eric Snow
New submission from Eric Snow: When tokenize.untokenize() encounters a 2-tuple, it moves to compatibility mode, where only the token type and string are used from that point forward. There are two closely related problems: * when the iterable is a sequence, the portion of the sequence prior

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
Eric Snow added the comment: issue16224 _may_ supercede this ticket. -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue16221> ___ ___

[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2012-10-13 Thread Eric Snow
Eric Snow added the comment: Actually, here's a patch with the first option. It preserves iterators as iterators, rather than dumping them into a list. I've also rolled the tests from issue16221 into this patch. Consequently, if the patch is suitable, that issue can

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
Eric Snow added the comment: The patch that I have in #16224 takes care of this issue. If that issue goes in another direction however... -- status: open -> pending superseder: -> tokenize.untokenize() misbehaves when moved to "compati

[issue16251] object.__reduce__()

2012-10-16 Thread Eric Snow
New submission from Eric Snow: In Objects/typeobject.c, reduce_2() makes _PyObject_GetAttrId() calls to pull some methods for the object in question. This is a problem when the object's type defines __getattr__() or __getattribute__() and returns something like None when the attribute i

[issue16251] some special methods are looked up on the instance rather than the type

2012-10-16 Thread Eric Snow
Changes by Eric Snow : -- title: object.__reduce__() -> some special methods are looked up on the instance rather than the type ___ Python tracker <http://bugs.python.org/issu

[issue16251] pickle special methods are looked up on the instance rather than the type

2012-10-16 Thread Eric Snow
Eric Snow added the comment: > Before any change gets made, it should be discussed on python-dev > (especially if you intend on backporting the change). Agreed. -- ___ Python tracker <http://bugs.python.org/i

[issue16259] Replace exec() in test.regrtest with __import__

2012-10-16 Thread Eric Snow
Eric Snow added the comment: Rather, importlib.import_module(). :) -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue16259> ___ ___ Python-bug

[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-18 Thread Eric Snow
Eric Snow added the comment: The catch is that when abstractmethod is the inner decorator, __isabstractmethod__ is set on the object that classmethod/staticmethod is wrapping. When abstractmethod is the outer decorator, __isabstractmethod__ is set on the resulting classmethod/staticmethod

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-19 Thread Eric Snow
Eric Snow added the comment: Sounds good. Thanks for getting this done, Nick. -- ___ Python tracker <http://bugs.python.org/issue6074> ___ ___ Python-bugs-list m

[issue16309] "PYTHONPATH=" different from no PYTHONPATH at all

2012-10-25 Thread Eric Snow
Eric Snow added the comment: > Given how confusing it seems, perhaps we should change it to > adopt a PATH-like behaviour. Wouldn't that introduce a backward-compatibility issue? FWIW, otherwise I agree that it makes a lot of sense to conform to the same behavior as PATH.

[issue19640] Drop _source attribute of namedtuple

2014-03-18 Thread Eric Snow
Eric Snow added the comment: It does not necessarily require a metaclass. You can accomplish it using a custom descriptor: class classattr: def __init__(self, getter): self.getter = getter def __get__(self, obj, cls): return self.getter(cls) FWIW, this is a descriptor

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread Eric Snow
Eric Snow added the comment: Both abstractnethod and abstractproperty work by setting __isabstractmethod__ to True on the decorated function. Then type.__new__ looks for any attributes of the current class (including inherited ones) that have __isabstractmethod__ set to True. The signature

[issue20897] @abstractmethod does not enforce method signatures

2014-03-18 Thread Eric Snow
Eric Snow added the comment: Oops, typos. > Both abstractmethod and abstractproperty work by setting __isabstractmethod__ to True on the decorated function. Then type.__new__ That should be type.__call__ or object.__new__, I don't remember which. > looks for any attributes of

[issue19640] Drop _source attribute of namedtuple (waste memory)

2014-03-18 Thread Eric Snow
Eric Snow added the comment: Also be sure the have Raymond's sign-off before committing anything for this. :) -- ___ Python tracker <http://bugs.python.org/is

[issue17621] Create a lazy import loader mixin

2014-03-22 Thread Eric Snow
Eric Snow added the comment: Review posted. Thanks for working on this, Brett. -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue17621> ___ ___

[issue17621] Create a lazy import loader mixin

2014-03-26 Thread Eric Snow
Eric Snow added the comment: I wonder if there would be any benefit to using this for some of the modules that get loaded during startup. I seem to remember there being a few for which lazy loading would have an effect. -- ___ Python tracker

[issue17621] Create a lazy import loader mixin

2014-03-26 Thread Eric Snow
Eric Snow added the comment: New review posted. Basically LGTM. -- ___ Python tracker <http://bugs.python.org/issue17621> ___ ___ Python-bugs-list mailin

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-03-26 Thread Eric Snow
Eric Snow added the comment: Review posted. -- ___ Python tracker <http://bugs.python.org/issue20942> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17373] Add inspect.Signature.from_callable()

2014-03-27 Thread Eric Snow
Eric Snow added the comment: Thanks, Yury! -- ___ Python tracker <http://bugs.python.org/issue17373> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-03-28 Thread Eric Snow
Eric Snow added the comment: Latest patch LGTM. -- ___ Python tracker <http://bugs.python.org/issue20942> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20942] _frozen_importlib should not have a __file__ attribute

2014-03-28 Thread Eric Snow
Eric Snow added the comment: As I've thought about it, I've gone from -0 to +1 on applying this to both 3.4 and 3.5. The bug and fix should impact very little* code. In fact, I doubt anyone would have noticed if Nick hadn't. :) It would be nice to have this right in 3.4.

[issue21087] imp.frozen_init() incorrectly removes module during reload

2014-03-28 Thread Eric Snow
New submission from Eric Snow: While reviewing code[1] for issue 20942, I noticed that when someone uses imp.frozen_init[2], the module is removed from sys.modules in some error cases. However, this should not be done when the module already exists (e.g. reload). As Brett pointed out in his

[issue21087] imp.frozen_init() incorrectly removes module during reload

2014-03-28 Thread Eric Snow
Eric Snow added the comment: The only concrete example I can think of that would be impacted is using PJE's lazy loader on a frozen module, and even that is unlikely to trigger the error case. -- nosy: +pje ___ Python tracker

[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-03-28 Thread Eric Snow
Eric Snow added the comment: Martin: are you okay with Claudiu's latest patch? -- ___ Python tracker <http://bugs.python.org/issue19714> ___ ___ Python-bugs-l

[issue21089] macro SET_SYS_FROM_STRING_BORROW doesn't get unset

2014-03-28 Thread Eric Snow
New submission from Eric Snow: In Python/sysmodule.c (_PySys_Init), the SET_SYS_FROM_STRING_BORROW macro is created right next to SET_SYS_FROM_STRING. However, while SET_SYS_FROM_STRING is unset at the end of _PySys_Init, SET_SYS_FROM_STRING_BORROW is not unset. I expect that it should be

[issue19697] Document the possible values for __main__.__spec__

2014-03-28 Thread Eric Snow
Eric Snow added the comment: Here's a basic patch. It introduces __main__ in import.rst and then identifies the cases where __spec__ is set to None or otherwise. There are a few :ref: links to labels on other pages that I had trouble with. I'll address those when I put up a new d

[issue19711] add test for changed portions after reloading a namespace package

2014-03-28 Thread Eric Snow
Eric Snow added the comment: A related addition (Lib/test/test_importlib/test_api.py - test_reload_namespace_changed): changeset: 86819:88c3a1a3c2ff3c3ab3f2bd77f0d5d5e5c1b37afa parent: 86816:13a05ed33cf7 user:Eric Snow date:Thu Oct 31 22:22:15 2013 -0600 summary

[issue21089] macro SET_SYS_FROM_STRING_BORROW doesn't get unset

2014-03-28 Thread Eric Snow
Eric Snow added the comment: Thanks, Benjamin. -- ___ Python tracker <http://bugs.python.org/issue21089> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19697] Document the possible values for __main__.__spec__

2014-03-28 Thread Eric Snow
Eric Snow added the comment: That did the trick, Nick. I swear there's always something I forget about ReST. :) Otherwise do you have any objections to the patch? I imagine there's more we could put in the section (for language spec purposes), but I figure what I have there is g

[issue19697] Document the possible values for __main__.__spec__

2014-03-28 Thread Eric Snow
Eric Snow added the comment: Wish I had done that in the opposite direction. Anyway, thanks Nick. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed versions: +Python 3.5 ___ Python track

[issue19711] add test for changed portions after reloading a namespace package

2014-03-28 Thread Eric Snow
Eric Snow added the comment: Here's a patch that adds the test. However, the test is failing and my gut's telling me it's a legitimate failure. I'll verify as soon as I have a chance and open a new issue if it is legit (i.e. a regression in 3.4, albeit an unlikely corne

[issue19983] When interrupted during startup, Python should not call abort() but exit()

2014-03-29 Thread Eric Snow
Eric Snow added the comment: > P.S. > I'm not sure exactly how the regular development protocol > goes around here so, just for the record, please know that no > offense in intended with this ping. :-) What you did is just right. The offer to help move things along is b

[issue19983] When interrupted during startup, Python should not call abort() but exit()

2014-03-29 Thread Eric Snow
Changes by Eric Snow : -- nosy: -eric.snow stage: -> patch review versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue19983> ___ ___ Python-

[issue19711] add test for changed portions after reloading a namespace package

2014-03-29 Thread Eric Snow
Eric Snow added the comment: Well, the same patch (modulo adjusting to apply cleanly) fails in exactly the same way in 3.3. So either the test isn't right or namespace packages have never supported reload in this way. I'll keep inv

[issue19711] add test for changed portions after reloading a namespace package

2014-03-29 Thread Eric Snow
Eric Snow added the comment: Regarding this issue, keep in mind that namespace packages have a dynamic __path__ which already updates (effectively) when new portions are added to sys.path. So we just need to make sure that reloading does not break that. To that end, here's a much si

[issue21097] Move test_namespace_pkgs into test_importlib.

2014-03-29 Thread Eric Snow
New submission from Eric Snow: While working on #19711 it dawned on me that test_namespace_pkgs might be more appropriate as a submodule of test_importlib. The feature doesn't have it's own module nor is it otherwise independent of importlib. I don't want to introduce churn he

[issue21098] Address remaining PEP 451-related to-do comments.

2014-03-29 Thread Eric Snow
New submission from Eric Snow: (from msg207510 in issue 18864) There are a few lingering to-do comments: Lib/test/test_importlib/extension/test_case_sensitivity.py:# XXX find_spec tests Lib/test/test_importlib/extension/test_finder.py:# XXX find_spec tests Lib/test/test_importlib/source

[issue21099] Switch applicable importlib tests to use PEP 451 API

2014-03-29 Thread Eric Snow
New submission from Eric Snow: (from msg202657 in issue 18864) A bunch of importlib (and other?) tests make direct calls to find_module(), find_loader(), or load_module(). These are still working, as expected. However, we should probably either replace them or supplement them with

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2014-03-29 Thread Eric Snow
Changes by Eric Snow : -- dependencies: +Address remaining PEP 451-related to-do comments., Switch applicable importlib tests to use PEP 451 API ___ Python tracker <http://bugs.python.org/issue18

[issue19711] add test for changed portions after reloading a namespace package

2014-03-29 Thread Eric Snow
Changes by Eric Snow : -- assignee: -> eric.snow ___ Python tracker <http://bugs.python.org/issue19711> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21099] Switch applicable importlib tests to use PEP 451 API

2014-03-29 Thread Eric Snow
Eric Snow added the comment: Agreed. :) -- ___ Python tracker <http://bugs.python.org/issue21099> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2014-03-29 Thread Eric Snow
Eric Snow added the comment: I've gone ahead and moved all remaining work into separate issues. Once the 4 remaining sub-issues are resolved, this one can be closed. I've *finally* got a couple days free so I want to clos

[issue21098] Address remaining PEP 451-related to-do comments.

2014-03-29 Thread Eric Snow
Eric Snow added the comment: Lib/test/test_importlib/test_windows.py is addressed in #19714 #21099 should cover the other four. If any *new* tests are needed we can address them in this ticket. -- ___ Python tracker <http://bugs.python.

[issue21097] Move test_namespace_pkgs into test_importlib.

2014-03-29 Thread Eric Snow
Eric Snow added the comment: I seriously need to remember to apply to 3.4 and merge forward! :P -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue21098] Address remaining PEP 451-related to-do comments.

2014-03-29 Thread Eric Snow
Eric Snow added the comment: I don't anticipate any more tests for now. -- resolution: -> rejected stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue21099] Switch applicable importlib tests to use PEP 451 API

2014-03-29 Thread Eric Snow
Eric Snow added the comment: Here's a patch. In most spots I'm left things alone. There is a comment in the docstring for test_abc.SourceOnlyLoaderTests about reload-related tests and module_for_loader (which is deprecated now). I'm not going to worry abo

[issue4712] Document pickle behavior for subclasses of dicts/lists

2014-04-01 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue4712> ___ ___ Python-bug

[issue17621] Create a lazy import loader mixin

2014-04-04 Thread Eric Snow
Eric Snow added the comment: Sweet! -- ___ Python tracker <http://bugs.python.org/issue17621> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue21156] Consider moving importlib.abc.InspectLoader.source_to_code() to importlib.abc.Loader

2014-04-05 Thread Eric Snow
Eric Snow added the comment: source_to_code() seems like a good fit on InspectLoader to me. Is there something in particular that motivated the idea of moving it up to Loader? -- nosy: +eric.snow ___ Python tracker <http://bugs.python.

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-04-05 Thread Eric Snow
Eric Snow added the comment: Sounds good to me. -- ___ Python tracker <http://bugs.python.org/issue20383> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21156] Consider moving importlib.abc.InspectLoader.source_to_code() to importlib.abc.Loader

2014-04-05 Thread Eric Snow
Eric Snow added the comment: Now that I've thought about it a little more, I'm more open to the idea. Source is definitely a universal concept in Python, as is code. So source_to_code() makes some sense on a most-base type like Loader. On the other hand, source isn't necessa

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-04-05 Thread Eric Snow
Eric Snow added the comment: I made roughly the same point in the current import-sig thread that relates here: https://mail.python.org/pipermail/import-sig/2014-April/000805.html Basically, I agree we should be careful with both __name__ and __file__

[issue21181] Inconsistent Definition of collections.namedtuple.__dict__ in _source

2014-04-08 Thread Eric Snow
Changes by Eric Snow : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue21181> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20434] Process crashes if not enough memory to import module

2014-04-10 Thread Eric Snow
Eric Snow added the comment: I don't see a review link. Looks like your patch wasn't against tip (at attach-time) or you used the --git flag in diff. Having the patch in the review tool would be really would be really helpful. I'll take a look otherwise, but won't be

[issue21200] pkgutil.get_loader() fails on "__main__"

2014-04-11 Thread Eric Snow
New submission from Eric Snow: Prior to 3.4, pkgutil.get_loader('__main__') would return None. Now it results in an ImportError. That's because it calls importlib.util.find_spec() which fails if an existing module does not have __spec__ or it is None. -- component

<    12   13   14   15   16   17   18   19   20   21   >