Changes by Eric Snow :
Added file: http://bugs.python.org/file43169/deforder.diff
___
Python tracker
<http://bugs.python.org/issue24254>
___
___
Python-bugs-list mailin
Changes by Eric Fahlgren :
--
nosy: +eric.fahlgren
___
Python tracker
<http://bugs.python.org/issue27129>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Fahlgren added the comment:
Thanks, Serhiy. I sort of figured that it would get fixed with the
wordcode rework, and was going to verify that it was when 3.6 settled down.
On Sun, Jun 5, 2016 at 8:30 AM, Serhiy Storchaka
wrote:
>
> Serhiy Storchaka added the comment:
>
>
New submission from Eric Sprigg:
Using 'from pandas import *' leads to a ValueError exception being raised when
eval tries to execute an expression like
eval("df['Country'] == 'Brazil'")
When the alternative form 'import pandas' is used
Eric Snow added the comment:
Here's an updated patch that matches the accepted PEP. Most notably I've added
a tp_deforder slot. This was necessary because subclasses should not inherit
their parent's __definition_order__ and the ability to delete
cls.__definition_ord
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue23722>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
FTR: PEP 520 "Preserving Class Attribute Definition Order"
(https://www.python.org/dev/peps/pep-0520/)
--
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
post-review updates
--
Added file: http://bugs.python.org/file43739/deforder-with-tp-slot.diff
___
Python tracker
<http://bugs.python.org/issue24
Changes by Eric Snow :
Removed file: http://bugs.python.org/file43629/deforder-with-tp-slot.diff
___
Python tracker
<http://bugs.python.org/issue24254>
___
___
Python-bug
Changes by Eric Snow :
--
hgrepos: -310
___
Python tracker
<http://bugs.python.org/issue24254>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Are there any objections to this unittest cleanup patch? I'd like to commit it
separately prior to anything that will go in for the C OrderedDict.
--
Added file: http://bugs.python.org/file29077/cleanup-test-collections
Eric Snow added the comment:
Incidently, I'm just about done with the OrdereDict patch. I'm attaching the
current one. At present it passes the unit tests, but I have two
memory-related issues and a number of open questions (that I don't think are
critical).
The patch h
Changes by Eric Snow :
Removed file: http://bugs.python.org/file28839/cleanup-test-collections.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Pytho
Changes by Eric Snow :
Removed file: http://bugs.python.org/file28956/odict.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailin
Eric Snow added the comment:
> Why did you copy test_collections.py instead of just creating
> a new file?
To preserve the history of changes to the bulk of the code in
test_ordereddict.py.
--
___
Python tracker
<http://bugs.python.org/i
Eric Snow added the comment:
Got bit by a variation of this today in 2.7:
class Spam(object):
def __getattr__(self, attr):
raise AttributeError(attr)
@property
def eggs(self):
return self.ham
s = Spam()
s.eggs
Traceback (most recent call last):
File "&quo
Changes by Eric Snow :
Added file: http://bugs.python.org/file29083/cleanup-test-collections.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bug
Changes by Eric Snow :
Removed file: http://bugs.python.org/file29083/cleanup-test-collections.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Pytho
Eric Snow added the comment:
I should clarify, odict.diff passes test_ordereddict. Regardless, it's pretty
close. I'm going to figure out why the review link hates me on this issue, but
until then any extra eyes here would be appreciated. The memory-related issues
are pushing we
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue10965>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
FWIW, I'm working toward making **kwargs an OrderedDict. First step: issue
#16991
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
At present, I don't see a need to make the C API public.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org
Changes by Eric Snow :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.4 -Python 3.3
___
Python tracker
<http://bugs.python.or
Eric Snow added the comment:
I've yanked the __weakref__ attr--apparently builtins don't have them. I've
also update the test. Is the updated test sufficient? I expect that if
weakref.ref(ns) works, the rest of the weakref functionality works as well.
--
A
Eric Snow added the comment:
Looking this over, it seems like there were outstanding objections to adding
this to the devguide and to the content. I still think the devguide is the
right place and that something like my second patch would be appropriate.
Before I take any time to update the
Eric Snow added the comment:
I've posted to python-dev about this:
http://mail.python.org/pipermail/python-dev/2013-February/124114.html
At the very least the pickle docs deserve some mention of the behavior. That
way people won't need to spend as much time trying to figure out
Eric Snow added the comment:
One proposal would lead to the sys module growing descriptors:
http://mail.python.org/pipermail/python-ideas/2013-January/019075.html
In that case, sys.modules could update the underlying interp->modules.
--
___
Pyt
Eric Snow added the comment:
+1 on just getting it done with ModuleNotFoundError. FWIW, I'd be glad to do
it. I'm taking a self-imposed break from the nearly finished C-OrderedDict!
--
___
Python tracker
<http://bugs.python.o
Eric Snow added the comment:
The common case for catching ImportError is exactly what ModuleNotFoundError
represents. If people are already going to change their code to handle just
this special case, I'd think having the subclass would be the better route. I
find it simpler (both to u
Eric Snow added the comment:
Right. Sorry I wasn't more clear. Existing code will continue to work either
way. The point is in exposing the distinct module/name-not-found case, which I
consider to be the common case for catching ImportError. My examples cover the
case where you wa
Eric Snow added the comment:
Good point. Thanks. I've updated the test. Does that cover it?
--
Added file: http://bugs.python.org/file29127/simplenamespace-weakref.diff
___
Python tracker
<http://bugs.python.org/is
Changes by Eric Snow :
Removed file: http://bugs.python.org/file29094/simplenamespace-weakref.diff
___
Python tracker
<http://bugs.python.org/issue15004>
___
___
Pytho
Eric Snow added the comment:
The whole AttributeError gaining an attribute seems impractical, but the second
approach still seems reasonable to me. I've attached a rough patch to
demonstrate. If that looks okay, I can flesh it out.
--
keywords: +patch
Added file:
Eric Snow added the comment:
Yanking the implicit cache validation does seem to be the simplest solution
here. Perhaps we could come up with a complex way of making this work, but I
don't think it's worth it.
What may be worth it is making the admonition of "use invalidate_ca
New submission from Eric Snow:
minidom already has something like this:
http://docs.python.org/3/library/xml.dom.minidom.html#xml.dom.minidom.Node.toprettyxml
This is something that appears to have almost made it in quite a while ago:
http://effbot.org/zone/element-lib.htm#prettyprint
http
New submission from Eric Snow:
While working on a subclass of inspect.Signature, I realized that
inspect.signature is treated as the constructor. So subclassing isn't so
simple. At first I considered adding an extra parameter to inspect.signature
allowing different Signature classes.
Eric Snow added the comment:
I'm closing this as #17037 offers a better solution and it's unlikely this
proposal would make it if that one doesn't.
--
resolution: -> wont fix
status: open -> closed
___
Python tracker
&l
New submission from Eric Snow:
Currently type_new() in Objects/typeobject.c enforces a restriction that the
namespace be a dict or dict subclass. It does this via the
PyArg_ParseTupleAndKeywords() call there.
This means that valid mappings may not be used even though they should work
just
New submission from Eric Snow:
(related to PEP 422 and issue #17044)
The execution namespace from a class definition is passed as the third argument
to the metaclass (see builtin___build_class__() in Python/bltinmodule.c). When
applicable, which is almost always, the subsequent call to type
Eric Snow added the comment:
We should definitely have a way to expose the original dictionary from
__prepare__(). Along with Nick's point, another reason is to allow class
decorators to have access to that original, which is important to any use case
that involves post-cre
Eric Snow added the comment:
I've also opened #17421 for dropping the restriction on the namespace passed to
the metaclass and #17422 for documenting that the passed namespace is copied
into a new dict.
--
___
Python tracker
Eric Snow added the comment:
> Given that, it is probably also better to revert the namespace keyword
> to accepting an instance rather than a factory function, since the copy
> operation after execution of the class body is automatic.
Agreed. Of course, the related note is
Eric Snow added the comment:
Sorry I wasn't clear. Later in type.__new__() it copies that passed namespace
into a new dict (see issue #17422). So as long as the namespace argument is a
valid argument to dict(), it's going to work fine. We don't need the extra
explicit che
Eric Snow added the comment:
I'm fine with that. Would it make sense to have the signature of
__init_class__ parallel meta.__init__():
__init_class__(cls, name, bases, namespace)
or even
__init_class__(cls, name, bases, ns, *, namespace=None, *
Eric Snow added the comment:
My current patch ends up with O(n) deletion, which won't fly, so I'm
refactoring. While I'm at it I'm also planning on using the BSD queue.h
doubly-linked list rather than the one that I rolled. I'm also going to pull
the ordered dict
Eric Snow added the comment:
The documentation seems pretty clear on the nature of the dict returned by
locals(). [1] What documentation are you referring to?
[1] http://docs.python.org/3.4/library/functions.html#locals
--
nosy: +eric.snow
type: -> enhancement
versions: -Python
Eric Snow added the comment:
Sorry, didn't mean to change the attributed version. However the 2.7
documentation says the same thing.
--
versions: +Python 2.7 -Python 3.4
___
Python tracker
<http://bugs.python.org/is
Eric Wald added the comment:
The approach used in 2.7.4rc1 also works, building cleanly on LFS 7.2; thank
you.
--
nosy: +eswald
___
Python tracker
<http://bugs.python.org/issue9
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue5135>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
So the problem you are having is that inside functions the dict returned by
locals() does not get updated when the "current local symbol table" changes?
Keep in mind that for modules and classes (the other two execution blocks), the
dict returned by loc
Eric Snow added the comment:
Thanks for the details, Anatoly. I am surprised by the behavior you've
described. It may be that functions don't use fast locals when tracing is
turned on. I'll have to check. If that's the case, I think the documentation
for locals(
Eric Snow added the comment:
Thanks for the script Anatoly. That's pretty much what I was imagining from
your description. This definitely reinforces my belief that profiling.
--
versions: +Python 3.3, Python 3.4
___
Python tracker
Eric Snow added the comment:
Okay, I found it. sys.settrace() ultimately results in the setting of
tstate->use_tracing to true and sets tstate->c_tracefunc and tstate_c_traceobj
(see sys_settrace() in Python/sysmodule.c and PyEval_SetTrace() in
Python/ceval.c). tstate->c_tracefu
Eric Snow added the comment:
I should also point out that the following from that note may actually also be
a CPython implementation detail:
Each call to locals() will return the same dictionary, updated to
the contents of the current local symbol table.
We'd want to be sure that
Changes by Eric Snow :
--
superseder: -> Document the circumstances where the locals() dict gets updated
___
Python tracker
<http://bugs.python.org/iss
Eric Snow added the comment:
I've indicated that this issue supercedes issue #7083.
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org
Eric Snow added the comment:
> Changing the type of the locals() return isn't the right way to solve
> this problem. Better docs is the way to do it. If someone is calling
> locals(), they should read the docs. Examining the type of values is
> discouraged in Python, we
New submission from Eric Promislow:
>>> import re
>>> p = re.compile(r'^(?:\\"|.|)*?"', re.S|re.M)
>>> s = 'sub foo {\n\tprint "\n\t\tbar\n\t\t";\n}\n'
>>> m = p.findall(s)
Python doesn't return.
Dropping the
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17563>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Would it be okay to do a check on __index__ after the PyLong_Check() succeeds?
Something like this:
if (PyLong_Check(item) &&
item->ob_type->tp_as_number->nb_index ==
PyLong_Type.tp_as_number->nb_index) {
Py_INCREF(item);
Eric Snow added the comment:
> Marc-Andre Lemburg added the comment:
> Same here. The heuristic may work for short strings that easily fit
> into the CPU cache, but as soon as you use it on longer strings,
> this will result in much slower comparisons.
When testing both, would it
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17636>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Wieser:
It would be nice if there was a `with` "expression". Such that instead of:
with open(...) as f:
result = foo(f)
One could write:
result = foo(f) with open(...) as f
This would be particularly useful in comprehensions. Instead of:
Changes by Eric Wieser :
--
components: +Interpreter Core
___
Python tracker
<http://bugs.python.org/issue17788>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
FWIW this has come up before:
http://mail.python.org/pipermail/python-dev/2012-October/122504.html
and relatedly:
issue16429
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue17
Changes by Eric Schulz :
--
nosy: +lostdog
___
Python tracker
<http://bugs.python.org/issue16177>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Schulz added the comment:
I can repo with MacOS 10.8.3 and Tcl 8.5.13. I'm fairly certian it is
triggered by the calltip. However, it is intermittent. I can work for a
while, get comfortable and let my guard down, then hit the crash. Typically
after I have a good amount of un
New submission from Eric Promislow:
While much of Komodo's source code has been released under MIT/GPL/LGPL, the
Python debugger hasn't, so I can't post it here. We can work out an
arrangement later, although it might not be necessary once I describe
the problem:
Komodo
Eric Promislow added the comment:
I'm running it inside gdb to see if I can figure it out.
I don't see a way of isolating this from the whole product.
--
___
Python tracker
<http://bugs.python.o
Eric Promislow added the comment:
I found a workaround in our debugger code, so you can lower the priority on
this, or even mark it "Wontfix", although I still
think the frame stack is getting messed up.
One thing about our debugger, it essentially runs all the Python code in a
Eric Snow added the comment:
It's worth noting that issue10977 is pretty closely related to this isssue.
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
> I just looked at the test-collections patch and don't want it
> committed. It is full of trivial edits that make it hard to
> review and doesn't make the test suite better.
Thanks for the feedback, Raymond. I agree that there are a number of t
Eric Snow added the comment:
Raymond, do you have any objections to splitting the OrderedDict-related tests
into their own module. Doing so allows for testing all the those test classes
at once, which is handy when working on OrderedDict. This is more relevant now
with the extra PEP-399
Eric Snow added the comment:
I finally had some time so here's an updated patch (including O(1) deletions).
I've also added a bunch of notes at the top of odictobject.c. Some notable
things left to do:
* address two recently failing tests due to r83881 (issue 17900)
* che
Changes by Eric Snow :
Removed file: http://bugs.python.org/file29077/cleanup-test-collections.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Pytho
Changes by Eric Snow :
Removed file: http://bugs.python.org/file29078/odict.diff
___
Python tracker
<http://bugs.python.org/issue16991>
___
___
Python-bugs-list mailin
Changes by Eric Beurre :
--
nosy: +egbutter
___
Python tracker
<http://bugs.python.org/issue21288>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric Haszlakiewicz:
I'm trying to emit a single line of csv without any line terminators, but
specifying lineterminator=None results in a "lineterminator must be set" error,
and setting lineterminator='' results in lack of quotes around certa
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue22986>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
> It's not a builtin yet, solely because we get far fewer arguments about the
> contents of the types module than we do builtins :)
Exactly. As Mark noted, I did have hopes of it reaching that status though. :)
So +1 from me for adding the namesp
Eric Snow added the comment:
FYI, you probably don't want to be patching out sys.modules. It isn't
guaranteed that doing so will have the expected effect on import semantics.
--
nosy: +eric.snow
___
Python tracker
<http://bu
Eric Snow added the comment:
I haven't had time for a while to do much work on this. At the last posting
this patch was basically done. I'm sure it no longer applies cleanly. The
biggest obstacle to wrapping this issue up is the size of the patch. It's hard
to get a
Eric Snow added the comment:
At least for CPython sys.modules is initially set to the modules dict on the
interpreter struct. As of 3.4 the import system itself only cares about
sys.modules (I'll have to double check on builtin___import__). However, if I
recall correctly at least pa
Eric Snow added the comment:
Ah. Never mind then. :)
--
___
Python tracker
<http://bugs.python.org/issue21600>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Thanks for bringing this up, Brett. The goal and approach seem good to me.
Did you bring this up during the PEP 451 discussions? If so, sorry I missed
it. You've made a good point. And hopefully this will encourage people to
subclass Loader
Eric Snow added the comment:
At some point should we make create_module (and exec_module) always required?
In other words, when should would drop the legacy loader support? I expect the
answer is Python 4. :)
--
___
Python tracker
<h
Eric Snow added the comment:
Same here.
--
___
Python tracker
<http://bugs.python.org/issue19698>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
@Nick
As long as those esoteric cases can be handled without much work via
create_module and exec_module, we should have a goal in mind for yanking legacy
load_module support. If there are valid use cases that can't be handled via
PEP 451 then I'd say
Eric Snow added the comment:
@Brett
Discussing this at PyCon sounds good. I'm in favor of dropping load_module as
soon as possible (if possible), as you might have guessed by the way I
implemented the module spec code. :) I agree that we should make a decision
about load_module one w
Eric Snow added the comment:
Keep in mind that the global import lock is only held long enough to create a
module-level lock. The cache of module locks is found at line 166 of
Lib/importlib/_bootstrap.py and the code related to module-level locking
follows. So unfortunately it won't
Eric Snow added the comment:
I'm open to suggestions on how to help make the patch more reviewable.
Currently at roughly +2500 lines of code it's a lot to ask someone to review.
While probably not the only way to help reviewers, I expect the best thing I
could do is to split th
Eric Snow added the comment:
> (Unless I've missed something, we don't run user code with the global
import lock held any more)
Ah. You are correct.
--
___
Python tracker
<http://bugs.pytho
Eric Snow added the comment:
Suggestions from Antoine on python-dev:
* do not make cOrderedDict "builtin"; drop changes to:
- Include/Python.h
- Objects/object.c
- Makefile.pre.in
* do not add a C-API
* include the linked list pointers in the hash entries? (may simplify things)
Eric Snow added the comment:
@sbromberger, there's no need for your own package. Just use something like
this:
_addr_cache = {}
def ipaddr(addr):
try:
return _addr_cache[addr]
except KeyError:
_addr_cache[addr] = ipaddress.ipaddress(addr)
return _addr_
New submission from Eric McDonald:
There are several use cases for having the equivalent of the
optparse.OptionParser 'get_option' method and the 'option_groups' and
'option_list' properties in argparse.ArgumentParser class.
(1) Easy alteration of the text of
Changes by Eric Snow :
--
nosy: +eric.snow
___
Python tracker
<http://bugs.python.org/issue23389>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
Hmm. If I recall correctly, we set __spec__ for namespace packages... What's a
quick way to consistently reproduce the ImportError?
--
___
Python tracker
<http://bugs.python.org/is
Eric Snow added the comment:
This implies to me that someone didn't include importlib.h in their commit when
they changed something that required it to be rebuilt. However, if it's a
Windows-only thing then perhaps there is something else afoot. Steve?
--
nosy: +br
Eric Snow added the comment:
> I'm going to echo the previous comment that maybe trying to emulate the
> existing dict implementation too carefully just adds complexity.
The whole dance with _odict_get_index and _odict_resize is due to the
requirement that OrderedDict maintain O(1
Eric Snow added the comment:
> Should dictobject.h get a bit more changes? In particular, should the
> following be expanded?
>
> #define PyDictKeys_Check(op) (Py_TYPE(op) == &PyDictKeys_Type)
> #define PyDictItems_Check(op) (Py_TYPE(op) == &PyDictItems_Type)
> #de
3401 - 3500 of 6686 matches
Mail list logo