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 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
Eric Snow added the comment:
Looks like setuptool's pkg_resources is directly importing
importlib._bootstrap. I've filed a bug:
https://bitbucket.org/pypa/setuptools/issue/378. In the meantime, what are our
options for getting that te
Eric Snow added the comment:
Here's the correct patch.
--
Added file: http://bugs.python.org/file39272/path-based-importlib.diff
___
Python tracker
<http://bugs.python.org/is
Changes by Eric Snow :
Removed file: http://bugs.python.org/file39271/path-based-importlib.diff
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bug
Eric Snow added the comment:
Gah. I had tried exactly that but did it in the wrong spot. Here's an updated
patch which fixes the test.
--
Added file: http://bugs.python.org/file39273/path-based-importlib.diff
___
Python tracker
Changes by Eric Snow :
Removed file: http://bugs.python.org/file39273/path-based-importlib.diff
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file39274/path-based-importlib.diff
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bug
Changes by Eric Snow :
Added file: http://bugs.python.org/file39275/path-based-importlib.diff
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bug
Changes by Eric Snow :
Removed file: http://bugs.python.org/file39274/path-based-importlib.diff
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bug
Changes by Eric Snow :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Eric Snow :
--
resolution: -> fixed
status: open -> pending
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bugs-list
Changes by Eric Snow :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue23911>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric Snow added the comment:
Thanks for pointing this out, Ned. Early on I ran into a problem when running
_freeze_importlib without the flag set. However, I expect that it was not
necessary after a certain point (e.g. once I had a valid
_importlib_external.h). I'll remove the fl
Eric Snow added the comment:
changeset: 95887:3bea670c9830
user:Eric Snow
date:Tue May 05 21:29:31 2015 -0600
summary: Remove an unnecessary flag.
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -&g
Eric Snow added the comment:
Just in case, please take a look at issues #17457 and #23882 to see if they
already cover the bug.
--
nosy: +eric.snow, rbcollins
___
Python tracker
<http://bugs.python.org/issue24
Eric Snow added the comment:
@Yury, I'm mostly just waiting for Raymond to give it at least a quick
sanity-check. I know there is at least 1 ref leak, but that can be sorted out.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Eric Snow :
--
priority: normal -> release blocker
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailing list
Un
Eric Snow added the comment:
The problem is right where the traceback says. Apparently there is a gap in
the namespace package tests that I slipped through with my recent work to split
out path-based import. I'll work up a patch.
--
___
P
Eric Snow added the comment:
Hmm, look like the test suite masks the issue due to the fact that importlib
gets imported before running the applicable tests in test_namespace_pkgs.py.
This causes _frozen_importlib.__package__ to get set properly, thus masking the
problem.
The problem is the
Eric Snow added the comment:
Here's a fix. If I don't hear from anyone right away I'll push it in a few
hours (or tomorrow morning).
--
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file39386/issue24192.diff
Changes by Eric Snow :
--
assignee: -> eric.snow
___
Python tracker
<http://bugs.python.org/issue24192>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Eric Snow :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> pending
type: -> behavior
___
Python tracker
<http://bugs.python
Eric Snow added the comment:
Great! The buildbots are happy too. :)
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue24192>
___
___
Py
Eric Snow added the comment:
Thanks for taking a look, Yury. I'll follow up on the ref leak soon.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
I've updated the cordereddict branch on the feature repo to fix the ref leak on
None. I'm still seeing other leaks (regrtest -R 3:3), but I don't think that
should block landing before the feature freeze.
However, I'm concerned about a segfaul
Eric Snow added the comment:
Agreed. I wanted to be clear about what is blocking landing the patch.
--
___
Python tracker
<http://bugs.python.org/issue16
Eric Snow added the comment:
These are the leaks I'm seeing in test_collections (14/24 tests):
test_copying : 178
test_iterators : 40
test_update : 29
test_init: 22
test_move_to_end : 21
test_sorted_iterators: 20
test_setdefault
Eric Snow added the comment:
I've fixed most of the leaks now. The only remaining ones are:
test_clear : 5
test_repr_recursive : 3
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Regarding the segfault, the following does not fail:
./python -m test.regrtest --forever -m test_basic test_configparser
but this does:
for i in `seq 1 20`; do ./python -m test.regrtest -m test_basic
test_configparser ; done
Eric Snow added the comment:
Here's a diff from the current cordereddict branch of the feature repo.
--
Added file: http://bugs.python.org/file39445/cOrderedDict-4.diff
___
Python tracker
<http://bugs.python.org/is
New submission from Eric Snow:
Here's a work-in-progress patch that uses OrderedDict as the default class
definition namespace (instead of dict). While the actual class namespace is a
dict, the definition order is preserved on a new attribute on class objects:
__definition_order__. Th
Eric Snow added the comment:
Thanks for looking into this, Ned. I've changed that size_t to ssize_t which I
expect will quiet that clang warning you saw. I'm glad you pointed it out
because it means that that branch was never executing! Unfortunately fixing
that does not so
Eric Snow added the comment:
Cool. The following gives consistent failures at certain seed values:
for i in `seq 1 100`; do echo $i; PYTHONHASHSEED=$i ./python -m test.regrtest
-m test_basic test_configparser ; done
Through 100 I get segfaults with 7, 15, 35, 37, 39, 40, 42, 47, 50, 66, 67
Eric Snow added the comment:
Here's a patch that drops adding __definition_order__. You can get the same
effect by adding `__definition_order__ = list(locals())` at the bottom of your
class definition. The benefit of having `__definition_order__` is that the
information is automati
Eric Snow added the comment:
I've spent a bit of time exploring the segfault. Here's some data that might
help relative to the configparser test.
I put the following at the beginning of _odict_resize:
Py_ssize_t len = PyObject_Size((PyObject *)od);
if
Eric Snow added the comment:
As far as I can tell there aren't any patterns that repeat across multiple
seeds (which makes sense).
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Here are the last 10 frames from the backtrace (gdb):
#0 0x005b15d0 in odictiter_iternext (di=) at
Objects/odictobject.c:1888
#1 0x00453179 in PyIter_Next (iter=) at
Objects/abstract.c:2760
#2 0x005881e7 in chain_next (lz=0x72b8d878
Eric Snow added the comment:
The segfault happens at line 1888 of odictobject.c when it tries to Py_INCREF a
NULL value. The problem is that the value that gets looked up for a presumably
valid key is returned as NULL. So either the value is messed up, lookup is
broken, or the wrong key is
Eric Snow added the comment:
Yeah, Ned pointed that one out. I fixed it but haven't pushed the change.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
Include/opcode.h shouldn't be in the change (and won't be when committed). I'm
guessing it being there is related to one of the recent merges I did from
default into the feature branch.
--
___
Python
Eric Snow added the comment:
Just to narrow things down a bit further, the failure happens specifically
under ConfigParserTestCaseNoValue:
PYTHONHASHSEED=7 ./python -m unittest
test.test_configparser.ConfigParserTestCaseNoValue.test_basic -v
Eric Snow added the comment:
If I still the following at Lib/test/test_configparser.py:328:
print(len(cf._proxies), len(list(cf._proxies)), list(cf._proxies))
print(len(cf._sections), len(list(cf._sections)), list(cf._sections))
I get unexpected results that are a clear indication of a
Eric Snow added the comment:
Good point, Nick. I'd checked that earlier but did not see any relationship.
At this point it's worth checking again. :)
--
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
Good catch. I've fixed odictiter_new in the feature branch. However, I'm not
sure there's anything to be fixed in odict_new. It follows the same pattern as
dict_new (over in Objects/dictobject.c).
--
___
Changes by Eric Snow :
--
hgrepos: +309
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric Snow :
--
hgrepos: +310
___
Python tracker
<http://bugs.python.org/issue24254>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
@mrab
gah! I could swear I originally had the _odict_clear_node first and had
switched them due to a segfault. It even crossed my mind on Friday but I
didn't pursue it. I'm guessing I did put the _odict_clear_node call first at
some point but los
Eric Snow added the comment:
@Jim,
You've got some good questions. I'll look into them today.
--
___
Python tracker
<http://bugs.python.org/issue16991>
___
__
Changes by Eric Snow :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
I have verified that this is still a problem (basically 3.6b1).
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Traceback (most recent call last):
File "/opt/python3.6/lib/python3.6/encodings/__init__.py", line 99, in
search_funct
Eric Snow added the comment:
After looking more closely, it looks like we should be ignoring such bogus
modules. Here's a patch to do so.
--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file44424/issue16
New submission from Eric Snow:
As indicated by issue #16384, the import machinery is not consistent in raising
ImportError. Some places in _bootstrap.py (and _bootstrap_external.py) raise
ImportError and others make no effort to wrap errors that get encountered. I
would expect the import
New submission from Eric Snow:
In Lib/encodings/__init__.py, search_function() looks up an encoding by name.
It loads the encoding by importing the corresponding module in the encodings
package. If there's an ImportError while importing that module then the
encoding gets silently ig
Eric Snow added the comment:
Here's an updated patch. Per a suggestion from Brett, I've chained the
original EOFError with an ImportError. The consequence is that the problematic
encoding is skipped (silently) rather than causing the interpreter to abort.
FYI, I've opened
Changes by Eric Snow :
Removed file: http://bugs.python.org/file44424/issue16384.diff
___
Python tracker
<http://bugs.python.org/issue16384>
___
___
Python-bugs-list m
Changes by Eric Snow :
--
assignee: brett.cannon -> eric.snow
resolution: rejected ->
stage: -> needs patch
status: closed -> open
versions: +Python 3.6 -Python 3.4
___
Python tracker
<http://bugs.python
New submission from Eric Snow:
As pointed out in #16384, a bad .pyc file will cause a module to fail
importing. Sometimes the .py file is okay, however. The question posed in the
other issue is if it would be desirable to fall back to the .py file.
FWIW, I don't think it'
Eric Snow added the comment:
I've opened #28007 to cover the concerns about bad a .pyc file blocking import
from a valid .py file.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Eric Snow :
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
I've applied the patch with a couple small changes. Thanks for the help!
--
nosy: +eric.snow
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.4
___
Python
Eric Snow added the comment:
Thanks for the patch Meador.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.3
___
Python tracker
<http://bugs.python.or
Changes by Eric Snow :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
pkgutil has since been updated to use importlib, meaning it relies on importlib
to sort this out.
--
components: +Library (Lib)
resolution: -> out of date
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.6 -P
2501 - 2600 of 2629 matches
Mail list logo