[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Changes by Eric Price : Removed file: http://bugs.python.org/file40844/rl_sigwinch_update.patch ___ Python tracker <http://bugs.python.org/issue23735> ___ ___ Python-bug

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Eric Price added the comment: At the moment, it just overwrites any existing SIGWINCH handler. I don't know how to do anything better -- one could try to store an existing SIGWINCH handler and call it, but it still wouldn't really work for an application that wanted to add and remov

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-04 Thread Eric Snow
Eric Snow added the comment: Review posted. Aside from a couple minor comments, LGTM. Thanks for doing this. Incidentally, it should be possible to auto-detect independent changes to the underlying dict and sync the odict with those changes. However, doing so likely isn't wor

[issue25410] Clean up and fix OrderedDict

2015-11-04 Thread Eric Snow
Eric Snow added the comment: I will review those patches soon. -- ___ Python tracker <http://bugs.python.org/issue25410> ___ ___ Python-bugs-list mailin

[issue25410] Clean up and fix OrderedDict

2015-11-05 Thread Eric Snow
Eric Snow added the comment: All 3 patches look fine to me. In "odict_resize_sentinel.patch", it would be nice if you could accomplish that with a single sentinel. However, fixing the bug is more critical. -- ___ Python trac

[issue25410] Clean up and fix OrderedDict

2015-11-05 Thread Eric Snow
Changes by Eric Snow : -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue25410> ___ ___ Python-bugs-list mailing list Un

[issue25462] Avoid repeated hash calculation in C implementation of OrderedDict

2015-11-07 Thread Eric Snow
Eric Snow added the comment: I agree with Raymond. -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org/issue25462> ___ ___ Py

[issue25616] Extract OrderedDict tests into separate file

2015-11-13 Thread Eric Snow
Eric Snow added the comment: FWIW, I totally support this. I originally had a patch up that did so but Raymond indicated that he'd rather not split the tests out though I made exactly the same arguments that you have. Perhaps he's changed his mind in the intervening y

[issue25623] Keep the link to Python implementation of OrderedDict

2015-11-20 Thread Eric Snow
Eric Snow added the comment: I agree with Raymond. -- ___ Python tracker <http://bugs.python.org/issue25623> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25711] Rewrite zipimport from scratch

2015-11-23 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow, superluser ___ Python tracker <http://bugs.python.org/issue25711> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2015-11-23 Thread Eric Snow
Changes by Eric Snow : -- nosy: +superluser ___ Python tracker <http://bugs.python.org/issue25710> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25914] Fix OrderedDict.__sizeof__

2015-12-21 Thread Eric Snow
Eric Snow added the comment: LGTM Thanks for doing that. It's definitely cleaner. :) -- stage: patch review -> commit review ___ Python tracker <http://bugs.python.org

[issue26042] Consider dropping magic number for more detailed .pyc file name

2016-01-07 Thread Eric Snow
Eric Snow added the comment: That's an interesting thought. My intuition is that it wouldn't be worth doing. It would certainly trade one development overhead for another, so it's a bit of a wash there, I think. Are there other spots in the stdlib that rely on the magic numb

[issue26252] Add an example to importlib docs on setting up an importer

2016-01-31 Thread Eric Fahlgren
Changes by Eric Fahlgren : -- nosy: +eric.fahlgren ___ Python tracker <http://bugs.python.org/issue26252> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26110] Speedup method calls 1.2x

2016-02-01 Thread Eric Fahlgren
Changes by Eric Fahlgren : -- nosy: +eric.fahlgren ___ Python tracker <http://bugs.python.org/issue26110> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-18 Thread Eric Snow
Eric Snow added the comment: python-dev thread: https://mail.python.org/pipermail/python-dev/2016-February/143374.html Notably: https://github.com/pantsbuild/pex/pull/211 -- nosy: +eric.snow ___ Python tracker <http://bugs.python.

[issue26281] Clear sys.path_importer_cache from importlib.invalidate_caches()

2016-02-23 Thread Eric Snow
Eric Snow added the comment: (Note that PathFinder.invalidate_caches() loops over sys.path_importer_cache and invalidates the cache of each path entry finder therein. What you're suggesting is clearing sys.path_importer_cache after the loop finishes.) Hmm. The distinction is be

[issue26281] Clear sys.path_importer_cache from importlib.invalidate_caches()

2016-02-23 Thread Eric Snow
Eric Snow added the comment: Re: the kw-only arg, it seems weird to accommodate the implementation of one meta-path finder in the signature of importlib.invalidate_caches(). Here's an alternative: Use a different sys.path_importer_cache sentinel internally (in PathFinder) and never

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-26 Thread Eric Fahlgren
New submission from Eric Fahlgren: When trying out dis.dis on some synthetically long functions, I noted that spurious branch targets were being generated in the output. First one is at address 8: 157 0 LOAD_CONST 1 (1) 3 DUP_TOP 4

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-26 Thread Eric Fahlgren
Eric Fahlgren added the comment: My test case: def long(): z = a = b = c = d = e = f = g = h = 1 while x: x = x if x and x or not x else x above line repeated 2999 more times import dis print(dis.findlabels(long.__code__.co_code)[:10]) Buggy output: [35510, 35509, 62

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-26 Thread Eric Fahlgren
Eric Fahlgren added the comment: Our paths crossed, I don't know exactly how you'd add a test case for this, maybe construct the monster function in a string, eval the string, the use the synthesized function in dis.findlabels? --

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-26 Thread Eric Fahlgren
Eric Fahlgren added the comment: Well, now that I'm thinking about it, you could synthesize a bytecode stream trivially and have a much better test. This is completely off the top of my head, so take it is guaranteed to (probably) not work as written, but it should get you started:

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-26 Thread Eric Fahlgren
Eric Fahlgren added the comment: The findlabels function takes a bytecode array of type bytes, usually the actual code from a function. My original test case uses the full Python compiler from source code to a CodeType object to create the bytecodes (plus all that other stuff that makes up a

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-27 Thread Eric Fahlgren
Eric Fahlgren added the comment: Lookin' good so far. How about we try it on all the opcodes that have arguments? See attached example for which I can see two obvious improvements: 1) It could be improved by taking apart that "args" list and using it to synthesize "samp

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-28 Thread Eric Fahlgren
Eric Fahlgren added the comment: Oh, don't worry about time between responses, we all have lives (well, some of us anyhow :) ). After looking at Lib/test/test_dis.py, I think it's just an oversight that there is no specific findlabels test (it's tested implicitly by ``dis.d

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-28 Thread Eric Fahlgren
Eric Fahlgren added the comment: I just remembered that code can have more than one (up to three?) EXTENDED_ARG operators before the real opcode, so I added that generalization to build code around the args list... -- Added file: http://bugs.python.org/file42046/testfindlabels.py

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-28 Thread Eric Fahlgren
Eric Fahlgren added the comment: Two things: 1) Verified this has always been a problem and still is in the development branch, so I added 2.7 and 3.6 to the versions list. 2) Couldn't tolerate the duplicate code handling the extended args operator, so in the interests of DRY, I move

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-28 Thread Eric Fahlgren
Eric Fahlgren added the comment: Oops, wrong/bad patch, delete line 310 "arg = None" in _get_instruction_bytes... -- ___ Python tracker <http://bugs.python.o

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-03-02 Thread Eric Fahlgren
Eric Fahlgren added the comment: Barun, take a look at the latest version of the testfindlabels.py, see what you think. If it works for you, maybe move the test function into Lib/test/test_dis.py as part of the standard dis module tests. Still need to look at the code that's being t

[issue26495] super() does not work in nested functions, genexps, listcomps, and gives misleading exceptions

2016-03-10 Thread Eric Snow
Changes by Eric Snow : -- nosy: +benjamin.peterson, rhettinger ___ Python tracker <http://bugs.python.org/issue26495> ___ ___ Python-bugs-list mailing list Unsub

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-18 Thread Eric Snow
Eric Snow added the comment: Oh, and spec.loader for namespace package is set to None. -- ___ Python tracker <http://bugs.python.org/issue26569> ___ ___ Python-bug

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-19 Thread Eric Snow
Eric Snow added the comment: Also, beside namespace packages, custom loaders may run into a similar problem with get_filename() and probably other code in there. It looks like the pyclbr module assumes that modules will be either builtin or loaded through SourceFileLoader. For example, you

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-19 Thread Eric Snow
Eric Snow added the comment: Ah, you're talking about deleting Lib/test/__init__.py. Doing so makes it a namespace package. The loader we use for namespace packages [1] does not have a get_filename() method. So the problem to solve is supporting namespace packages in Lib/pycl

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-19 Thread Eric Snow
Eric Snow added the comment: Well, your patch is correct even if not ideal. :) Landing it as a short-term solution is fine. Just keep this issue open so we can address the problem more completely later. -- components: +Interpreter Core stage: -> commit review type: -> be

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-19 Thread Eric Snow
Eric Snow added the comment: And thanks for addressing this here. :) -- ___ Python tracker <http://bugs.python.org/issue26569> ___ ___ Python-bugs-list mailin

[issue26584] pyclbr module needs to be more flexible on loader support

2016-03-19 Thread Eric Snow
New submission from Eric Snow: (see issue26569) The pyclbr module is showing its age (born 1995). It assumes there are only 2 module types (builtin and source-based), particularly in readmodule() and readmodule_ex(). Really it should be source-based and "everything else". For in

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support namespace packages

2016-03-19 Thread Eric Snow
Eric Snow added the comment: Yeah, I've opened issue26584 to keep the matters separate. We can address a more comprehensive cleanup there. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python

[issue26569] pyclbr.readmodule() and pyclbr.readmodule_ex() don't support packages

2016-03-20 Thread Eric Snow
Eric Snow added the comment: Hmm. These two should be equivalent: if spec.loader.is_package(fullmodule): dict['__path__'] = [os.path.dirname(fname)] if spec.submodule_search_locations is not None: dict['__path__'] = spec.submodule_search_locations Do you

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-22 Thread Eric Price
Eric Price added the comment: rl_resize_terminal was added in readline 4.0, released in 1999. I think we can rely on it. =) I don't know editline, but it probably doesn't include the readline 6.3 change that makes this necessary, so your patch for it could just IFDEF out that line

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-22 Thread Eric Price
Eric Price added the comment: Hmm, OK. I've made a new version of the patch that chains signal handlers. I think that should make it match previous functionality, and work with basic combined usage or python signal handlers. It probably still won't work if you, say, want to star

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-22 Thread Eric Price
Eric Price added the comment: (To be clear, it now works in general for Python signal handlers, and when C handlers are inserted but not deleted.) For a conditional ifdef, does that mean I should add another test/variable in configure.ac

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-26 Thread Eric Price
Eric Price added the comment: Well, I could piggyback on the existing flags if I just wanted to support readline -- there are already two flags for readline 4.0 -- but if our real goal is to be compatible with editline, we probably need another flag. I think you're right that it s

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-27 Thread Eric Price
Eric Price added the comment: Hmm, I'm not seeing comments in the review? You're right about the order. When we don't have sigaction, python's signal handler will reinstall itself, so we need to reinstall this one after calling the old handler. -- Added file: ht

[issue19944] Make importlib.find_spec load packages as needed

2016-04-04 Thread Eric Snow
Eric Snow added the comment: Yeah, I'm pretty sure that TODO is out of date. -- ___ Python tracker <http://bugs.python.org/issue19944> ___ ___ Python-bugs-l

[issue26697] tkFileDialog crash on askopenfilename Python 2.7 64-bit Win7

2016-04-05 Thread Eric Johnson
New submission from Eric Johnson: Attempting to run tkFileDialog.askopenfilename() using Python 64-bit on Windows 7 crashes. Running SysWOW64\cmd.exe: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Windows\SysWOW64>python Pyt

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-04-24 Thread Eric Hanchrow
Changes by Eric Hanchrow : -- nosy: +Eric.Hanchrow ___ Python tracker <http://bugs.python.org/issue15873> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23496] Steps for Android Native Build of Python 3.4.2

2016-04-25 Thread Eric Snow
Eric Snow added the comment: FYI: https://mail.python.org/pipermail/python-dev/2016-April/144320.html -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue23

[issue26865] Meta-issue: support of the android platform

2016-04-26 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue26865> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22893] Idle: __future__ does not work in startup code.

2016-05-07 Thread Eric Fahlgren
Changes by Eric Fahlgren : -- nosy: +eric.fahlgren ___ Python tracker <http://bugs.python.org/issue22893> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2016-05-10 Thread Eric Snow
Eric Snow added the comment: I've gone ahead and pushed the patch. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker <http://bugs.pyth

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

2016-05-10 Thread Eric Snow
Eric Snow added the comment: Could I get a quick review on this. There shouldn't be anything surprising or controversial here. I'm pretty confident about the patch and it's pretty low-impact so if I don't hear back in the next day or two I'll merge it. Note: the po

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

2016-05-12 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.or

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

2016-05-12 Thread Eric Snow
Eric Snow added the comment: The last dependencies have now been closed! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

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

2016-05-12 Thread Eric Snow
Changes by Eric Snow : -- versions: +Python 3.6 -Python 3.5 ___ Python tracker <http://bugs.python.org/issue19711> ___ ___ Python-bugs-list mailing list Unsub

[issue24254] Make class definition namespace ordered by default

2016-05-12 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file39456/just-default-to-odict.diff ___ Python tracker <http://bugs.python.org/issue24254> ___ ___ Python-bug

[issue24254] Make class definition namespace ordered by default

2016-05-12 Thread Eric Snow
Eric Snow added the comment: Here's a refresh of the patch that only sets the default definition namespace (and does not introduce __definition_order__). -- Added file: http://bugs.python.org/file42834/just-default-to-odict.diff ___ Python tr

[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Eric Wieser
New submission from Eric Wieser: https://docs.python.org/3.2/reference/compound_stmts.html#function-definitions and onwards say the following decorator ::= "@" dotted_name ["(" [parameter_list [","]] ")"] NEWLINE This is a regression

[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Eric Wieser
Eric Wieser added the comment: The offending patch can be found at https://hg.python.org/cpython/rev/71ff2235bb4c -- ___ Python tracker <http://bugs.python.org/issue27

[issue27042] Incorrect grammar for function definitions

2016-05-16 Thread Eric Wieser
Eric Wieser added the comment: The parent commit is also bad: https://hg.python.org/cpython/rev/b65007ef59c0 -- ___ Python tracker <http://bugs.python.org/issue27

[issue20703] RuntimeError caused by lazy imports in pdb

2015-02-26 Thread Eric Snow
Eric Snow added the comment: I haven't looked to closely but I'm guessing that pdb.set_trace() causes something to get imported (i.e. there's an import statement in a function body somewhere). Consequently sys.modules is updated (by that "distant" import statement

[issue23159] argparse: Provide equivalent of optparse.OptionParser.{option_groups, option_list, get_option}

2015-03-25 Thread Eric McDonald
Eric McDonald added the comment: @paul.j3, thanks for the sample code for argparse extension. I agree that subclassing is a way to go for use in third-party projects. But, if someone ever wanted to add an abstraction layer in front of argparse.ArgumentParser and configparser.ConfigParser in

[issue23731] Implement PEP 488

2015-03-28 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue23731> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16991] Add OrderedDict written in C

2015-03-30 Thread Eric Snow
Eric Snow added the comment: I've opened a feature clone to better track the work (features/cordereddict). Here's the updated patch against default from that clone. I haven't added any argument client stuff. I also haven't addressed any of the feedback from Antoin

[issue16991] Add OrderedDict written in C

2015-03-30 Thread Eric Snow
Eric Snow added the comment: s/argument client/Argument Clinic/ -- ___ Python tracker <http://bugs.python.org/issue16991> ___ ___ Python-bugs-list mailin

[issue16991] Add OrderedDict written in C

2015-03-31 Thread Eric Snow
Eric Snow added the comment: I expect Antoine is trying to limit the scope of the change, which makes sense. In this case, though, once (if?) the patch lands I plan on using it in the interpreter, so the C-API bits will be necessary. -- ___ Python

[issue16991] Add OrderedDict written in C

2015-04-01 Thread Eric Snow
Eric Snow added the comment: Thanks for speaking up, Antoine. Keep in mind that a C implementation of OrderedDict has a strict compatibility requirement with the existing pure Python one. The Python implementation subclasses dict so the C implementation must as well. I agree that it would

[issue23731] Implement PEP 488

2015-04-01 Thread Eric Snow
Eric Snow added the comment: Thanks for doing this, Brett. It's so simple a change yet such a great one. :) -- ___ Python tracker <http://bugs.python.org/is

[issue21319] WindowsRegistryFinder never added to sys.meta_path

2015-04-02 Thread Eric Snow
Eric Snow added the comment: Awesome. Thanks Tim. -- ___ Python tracker <http://bugs.python.org/issue21319> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery and namespaced packages

2015-04-07 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue23882> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery and namespaced packages

2015-04-08 Thread Eric Snow
Eric Snow added the comment: Is there any reason for unittest to not use pkgutil.iter_modules or pkgutil.walk_packages? Either should work. -- ___ Python tracker <http://bugs.python.org/issue23

[issue23910] C implementation of namedtuple (WIP)

2015-04-10 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker <http://bugs.python.org/issue23910> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-04-10 Thread Eric Snow
New submission from Eric Snow: The bootstrap code has a clear division between the core import functionality and the path-based import machinery. The attached patch makes that division explicit by moving the latter into its own module. The module is also frozen, necessarily. In addition to

[issue23731] Implement PEP 488

2015-04-09 Thread Eric Snow
Eric Snow added the comment: LGTM -- ___ Python tracker <http://bugs.python.org/issue23731> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: Note that (in my mind, unfortunately) the pickle module looks up several dunder methods on instances. That isn't quite the same thing since the issue is about callable not triggering the descriptor protocol. However it is closely related. I point this out be

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: > What would be the "right thing"? My suggestion of using a metaclass is actually not effective here because __call__ has meaning for metaclasses. Otherwise you could have made __call__ more dynamic via a metaclass. Except that is another

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: Just to be clear, I'm still -1 on any of this. On the one hand, there's a risk of backward-compatibility breakage (just as much a corner-case as the need expressed in this issue). On the other hand, I'd actually push for _PyObject_LookupSpecial

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: s/TypeError/RuntimeError/ -- ___ Python tracker <http://bugs.python.org/issue23990> ___ ___ Python-bugs-list mailing list Unsub

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: > Ionel Cristian Mărieș added the comment: > #1. "It's specified/documented, therefore it's intended" > > The first thing a maintainer does is check the docs. This is a sensible thing > to do - as you cannot have all the details

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: > Ionel Cristian Mărieș added the comment: > It's not. Did you see the example with iter()/__iter__? It does convert > the AttributeError into a TypeError. callable and iter are not the same thing though. callable checks for a capability. iter invoke

[issue23990] Callable builtin doesn't respect descriptors

2015-04-19 Thread Eric Snow
Eric Snow added the comment: > Ionel Cristian Mărieș added the comment: > What exactly are you proposing? Getting rid of AttributeError masking? That isn't really a practical thing to consider, so no. :) Instead I'm suggesting there isn't a lot of justification to c

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-04-19 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch, with the PEP 489 changes merged in. Only one test isn't passing and it is due to something in the pip that is bundled into ensurepip. I'll work on fixing that when I have some time. I'm sure there's documenta

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-04-19 Thread Eric Snow
Eric Snow added the comment: s/PEP 489/PEP 488/ -- ___ Python tracker <http://bugs.python.org/issue23911> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24014] Second pass of PyCode_Optimize

2015-04-20 Thread Eric Snow
Eric Snow added the comment: > Also, Python/importlib.h blew up in the diff; should this be included in the patch? Yes. It is the frozen bytecode for bootstrapping importlib as the import system. So changes to bytecode generation like this will propagate there. -- nosy: +eric.s

[issue23990] Callable builtin doesn't respect descriptors

2015-04-20 Thread Eric Snow
Eric Snow added the comment: > Ionel Cristian Mărieș added the comment: > Also, descriptors are a core mechanism in new-style classes - you can't > have methods without descriptors. Why would you even consider removing > descriptors from the special method lookup if that

[issue23990] Callable builtin doesn't respect descriptors

2015-04-20 Thread Eric Snow
Eric Snow added the comment: FYI, I'll re-iterate something I said before, there is a different approach you can take here if this is just an issue of proxying. Use two different proxy types depending on if the proxied object is callable or not: class Proxy: # all the proxy

[issue24020] threading.local() must be run at module level (doc improvement)

2015-04-21 Thread Eric Snow
Eric Snow added the comment: FYI, I've used thread-local namespaces with success in several different ways and none of them involved binding the thread-local namespace to global scope. I don't think anything needs to be fixed here. The SO answer is misleading and perhaps even w

[issue24020] threading.local() must be run at module level (doc improvement)

2015-04-21 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <http://bugs.python

[issue24020] threading.local() must be run at module level (doc improvement)

2015-04-21 Thread Eric Snow
Eric Snow added the comment: @Ethan, it may help you to read through the module docstring in Lib/_threading_local.py. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24020] threading.local() must be run at module level (doc improvement)

2015-04-21 Thread Eric Snow
Eric Snow added the comment: Think of threading.local this way: instances of threading.local are shared between all the threads, but the effective "__dict__" of each instance is per-thread. Basically, the object stores a dict for each thread. In __getattribute__, __seta

[issue24029] Surprising name binding behavior of submodule imports needs documenting

2015-04-22 Thread Eric Snow
Eric Snow added the comment: Guido describes the global invariant for *all* the forms of importing a submodule, including explicit relative imports: > I just mean that for relative import > there is no need to bind the submodule to the parent, is there? But there *is* a reason. The sub

[issue24029] Surprising name binding behavior of submodule imports needs documenting

2015-04-22 Thread Eric Snow
Eric Snow added the comment: LGTM. You've covered all the key points and the example is good. -- ___ Python tracker <http://bugs.python.org/issue24029> ___ ___

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-04-27 Thread Eric Snow
Eric Snow added the comment: Glad to hear the patch is conceptually consistent with other components. :) And the "internal"/"external" suggestion is a good one. I'll update the patch when I have a minute. --

[issue11205] Evaluation order of dictionary display is different from reference manual.

2015-04-28 Thread Eric Snow
Eric Snow added the comment: Changes to importlib.h should always be committed. It is the frozen importlib._bootstrap module, which is the implementation of the import system used by the interpreter. So failure to commit changes to importlib.h means your changes to importlib._bootstrap will

[issue4356] Add "key" argument to "bisect" module functions

2015-04-30 Thread Eric Reynolds
Eric Reynolds added the comment: In the meantime here is a workaround https://gist.github.com/ericremoreynolds/2d80300dabc70eebc790 -- nosy: +ericreynolds ___ Python tracker <http://bugs.python.org/issue4

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: Either the docs are out-of-date or they are really poorly worded. Most likely it's the former, but I'm taking a look. -- ___ Python tracker <http://bugs.python.o

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: I've verified that the documentation is correct under Python 2.3. The behavior changed under Python 2.4 (and the docs were not updated). I expect that the change in behavior is an unintended consequence of a change in the import system for 2.4. There were

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: I'm pretty sure this is the culprit: changeset: 32882:331e60d8ce6da19b168849418776fea0940787ec branch: legacy-trunk user:Tim Peters date:Mon Aug 02 03:52:12 2004 + summary: PyImport_ExecCodeModuleEx(): remove module from sys.mo

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: patch LGTM for the 3 branches. -- ___ Python tracker <http://bugs.python.org/issue24081> ___ ___ Python-bugs-list mailing list Unsub

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-05-02 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch with "_pathy.py" changed to "_bootstrap_external.py" (and similar changes with freezing). The patch does not include fixing the venv test (i.e. the bundled pip). Also, I'll be adding a note to NEWS

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-05-02 Thread Eric Snow
Eric Snow added the comment: As I mentioned, I'm pretty sure that the failing venv test is due to the bundled pip. Here's the test output: test test_venv failed -- Traceback (most recent call last): File "/home/esnow/projects/cpython/Lib/test/test_venv.py", line 35

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