Changes by Eric Price :
Removed file: http://bugs.python.org/file40844/rl_sigwinch_update.patch
___
Python tracker
<http://bugs.python.org/issue23735>
___
___
Python-bug
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
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
Eric Snow added the comment:
I will review those patches soon.
--
___
Python tracker
<http://bugs.python.org/issue25410>
___
___
Python-bugs-list mailin
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
Changes by Eric Snow :
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue25410>
___
___
Python-bugs-list mailing list
Un
Eric Snow added the comment:
I agree with Raymond.
--
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue25462>
___
___
Py
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
Eric Snow added the comment:
I agree with Raymond.
--
___
Python tracker
<http://bugs.python.org/issue25623>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow, superluser
___
Python tracker
<http://bugs.python.org/issue25711>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +superluser
___
Python tracker
<http://bugs.python.org/issue25710>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Changes by Eric Fahlgren :
--
nosy: +eric.fahlgren
___
Python tracker
<http://bugs.python.org/issue26252>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Fahlgren :
--
nosy: +eric.fahlgren
___
Python tracker
<http://bugs.python.org/issue26110>
___
___
Python-bugs-list mailing list
Unsubscribe:
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.
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
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
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
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
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?
--
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:
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
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
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
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
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
Eric Fahlgren added the comment:
Oops, wrong/bad patch, delete line 310 "arg = None" in _get_instruction_bytes...
--
___
Python tracker
<http://bugs.python.o
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
Changes by Eric Snow :
--
nosy: +benjamin.peterson, rhettinger
___
Python tracker
<http://bugs.python.org/issue26495>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
Eric Snow added the comment:
And thanks for addressing this here. :)
--
___
Python tracker
<http://bugs.python.org/issue26569>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
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
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
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
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
Changes by Eric Hanchrow :
--
nosy: +Eric.Hanchrow
___
Python tracker
<http://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue26865>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Fahlgren :
--
nosy: +eric.fahlgren
___
Python tracker
<http://bugs.python.org/issue22893>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Changes by Eric Snow :
--
versions: +Python 3.6 -Python 3.5
___
Python tracker
<http://bugs.python.org/issue19711>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
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
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
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue23731>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Eric Snow added the comment:
s/argument client/Argument Clinic/
--
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailin
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
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
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
Eric Snow added the comment:
Awesome. Thanks Tim.
--
___
Python tracker
<http://bugs.python.org/issue21319>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue23882>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue23910>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Eric Snow added the comment:
LGTM
--
___
Python tracker
<http://bugs.python.org/issue23731>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
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
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
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
Eric Snow added the comment:
s/TypeError/RuntimeError/
--
___
Python tracker
<http://bugs.python.org/issue23990>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
Eric Snow added the comment:
s/PEP 489/PEP 488/
--
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Changes by Eric Snow :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
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
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
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
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>
___
___
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.
--
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
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
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
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
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
Eric Snow added the comment:
patch LGTM for the 3 branches.
--
___
Python tracker
<http://bugs.python.org/issue24081>
___
___
Python-bugs-list mailing list
Unsub
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
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
3701 - 3800 of 6702 matches
Mail list logo