Barry A. Warsaw added the comment:
First failure in test run afaict:
==
ERROR: test_recursive_dict_subclass_and_inst
(test.test_cpickle.cStringIOCPicklerFastTests
Barry A. Warsaw added the comment:
But if I just run test_cpickle.py, it succeeds!
--
___
Python tracker
<http://bugs.python.org/issue25698>
___
___
Python-bug
Barry A. Warsaw added the comment:
I set a breakpoint where the error occurs. I'm in test_cpickle.py dumps().
Doing cPickle.dumps(arg) in the bp, I get the error. arg is:
(Pdb) arg
{<__main__.H object at 0x7ff8e2a870d0>: None}
(Pdb) type(arg)
Look again at the AttributeE
Barry A. Warsaw added the comment:
I'm duping this one to issue25698 because while it came later, it has a lot
more information. They are clearly the same bug.
--
nosy: +barry
superseder: -> The copy_reg module becomes unexpectedly empty in test
Barry A. Warsaw added the comment:
Well, one thing I noticed is that init_stuff() in cPickle.c can leak the
copy_reg module object, if any of the subsequent PyObject_GetAttr*() calls
fail. They return -1 without decref'ing copyreg. Probably not a horrible leak
since it's probably
Barry A. Warsaw added the comment:
At the problematic breakpoint mentioned in msg255630, copy_reg is nearly empty.
(Pdb) sys.modules['copy_reg']
(Pdb) dir(sys.modules['copy_reg'])
['__builtins__', '__doc__', '__file__', '__name__', &
Barry A. Warsaw added the comment:
This just gets weirder. I've narrowed it down to running this command:
build-static/python Lib/test/regrtest.py test_doctest test_cpickle
fails every time. What's even weirder is that I hacked regrtest to print some
useful information before and
Barry A. Warsaw added the comment:
On Dec 01, 2015, at 06:26 PM, Barry A. Warsaw wrote:
>I'll note one other thing. Doko mentioned that in our build environment,
>cPickle is built in, not an extension.
Which may be relevant because in a from-hg-head build of Python 2.7, this
prob
Barry A. Warsaw added the comment:
On Dec 01, 2015, at 06:47 PM, Serhiy Storchaka wrote:
>Thanks Barry. Running test_cpickle after test_doctest I now can reproduce the
>problem in a from-hg-head build of Python 2.7.
That's interesting because I can't! (Neither from the 2
Barry A. Warsaw added the comment:
I added cPickle to Modules/Setup.local and rebuilt from hg. cPickle's a
built-in but I still can't reproduce the problem.
--
___
Python tracker
<http://bugs.python.o
Barry A. Warsaw added the comment:
On Dec 05, 2015, at 07:03 AM, Benjamin Peterson wrote:
>The underlying issue is classic: PyDict_SetItem returns NULL if the stack is
>too deep. This confuses import.
Thanks for digging into this Benjamin. I'm not able to investigate further
atm
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue25833>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
I'm reopening this issue because we're starting to see a bunch of regressions
in Debian and Ubuntu we think is caused by the changes here. We've definitely
started seeing them with 3.5.1, where packages that use Cython built just fine
in 3.5
Barry A. Warsaw added the comment:
On Jan 06, 2016, at 10:13 PM, Serhiy Storchaka wrote:
>What return __reduce_ex__(4) for the NameAssignment instance in 3.5.0?
I'm not sure yet (it takes some time to set up the right environment to test
this), but I do know which TypeError is
Barry A. Warsaw added the comment:
Your explanation still doesn't entirely make sense to me yet because the crash
is happening in what seems to be a Cython implementation class, not a generated
class based on a .pyx in some other project using Cython.
I tried to search the Cython Tra
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue26036>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
You asked what reductor(4) returns in Python 3.5.0:
> /usr/lib/python3.5/copy.py(176)deepcopy()
-> rv = reductor(4)
(Pdb) reductor(4)
(, (,), None, None, None)
And this is completely reasonable:
(Pdb) p rv
(, (,), None, None, None)
(Pdb) p rv[0]
Barry A. Warsaw added the comment:
I added some debugging to the if(required) clause. This is interesting:
basicsize 16
slotnames 0 basicsize 16
tp_basicsize 80 basicsize 16
tp_basicsize comes in at 16 bytes. tp_dictoffset and tp_weaklistoffset must
both be 0, and while slotnames is not
Barry A. Warsaw added the comment:
So yeah, I guess Cython is doing something magical to boost the instance's
type's basicsize, but I can't tell what from the Python prompt. It also
clearly doesn't affect the un/picklability of the instance, so I think the
entire check i
Barry A. Warsaw added the comment:
I've verified that backing out the typeobject.c change allows kivy and pysam to
build. s3ql still fails but for other reasons, though its build does get past
the cython failure. This clinches it for me. I am going to remove the
typeobject.c clause
Barry A. Warsaw added the comment:
On Jan 11, 2016, at 05:50 PM, Serhiy Storchaka wrote:
>
>Therefore my guess was true. There is a bug in Cython. It creates classes
>that can't be correctly unpickled or copied.
I don't think that's necessarily true. Clearly the cla
Barry A. Warsaw added the comment:
On Jan 11, 2016, at 07:20 PM, Serhiy Storchaka wrote:
>I think we have to left this restriction in 3.6 (and Cython should fix its
>bug by providing either __getnewargs__/ __getnewargs_ex__, __getstate__ or
>__reduce__/__reduce_ex__). But in 2.7 a
Barry A. Warsaw added the comment:
BTW Serhiy, can you please file a bug with upstream Cython? I think you're the
right person to do it since you added this restriction. With reverting this in
2.7 and 3.5 it's not urgent, but we don't want to have to reopen this w
Barry A. Warsaw added the comment:
Thanks Stefan and Serhiy! I think this issue is now resolved.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Barry A. Warsaw added the comment:
Is this a bug though? No guarantees of dict order exists, regardless of
whether the dict changes or not, right? Even if the implementation used to, or
in some circumstances still does, appear to preserve iteration order, you
shouldn't count
Barry A. Warsaw added the comment:
Tangentially, I'm kind of hoping we can get this into 3.6 as an asyncio
replacement for smtpd: https://gitlab.com/python-smtpd-hackers/aiosmtpd
--
___
Python tracker
<http://bugs.python.org/is
Barry A. Warsaw added the comment:
Thanks for digging deeply and fixing this!
--
___
Python tracker
<http://bugs.python.org/issue25698>
___
___
Python-bugs-list m
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue26408>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Barry A. Warsaw :
--
assignee: docs@python -> barry
___
Python tracker
<http://bugs.python.org/issue26408>
___
___
Python-bugs-list mailing list
Un
Barry A. Warsaw added the comment:
Thanks! I like some of the changes, and may tweak a few others. Thanks for
the contribution.
--
___
Python tracker
<http://bugs.python.org/issue26
Barry A. Warsaw added the comment:
On Feb 22, 2016, at 02:20 PM, Georg Brandl wrote:
>Georg Brandl added the comment:
>
>-Consistency within one module or function is most important.
>+Consistency within one module or function is the most important.
>
>You left out "th
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue26176>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue26426>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
I was thrown off a bit by the description below. it's not that the OP wants to
generate an Enum lazily (the functional API lets them do that), it's that the
OP wants to *extend* an Enum lazily.
Seems like a pretty obscure use case to me. I&
New submission from Barry A. Warsaw:
This is probably terrible, but given how difficult it is to keep __all__'s up
to date, maybe something like this can be useful. I literally whipped this up
in about 5 minutes, so sit back and watch the bikeshedding!
import sys
def public(thing):
Barry A. Warsaw added the comment:
Oh, and it should be a built-in
--
___
Python tracker
<http://bugs.python.org/issue26632>
___
___
Python-bugs-list mailin
Barry A. Warsaw added the comment:
On Mar 24, 2016, at 02:48 AM, Ethan Furman wrote:
>On the down side, you know somebody is going to @public a class' method --
>how do we check for that?
Do we need to? Consenting adults and __all__.
OT1H, you do get an AttributeError if you
Barry A. Warsaw added the comment:
On Mar 24, 2016, at 10:31 PM, Martin Panter wrote:
>FWIW I already invented this :) as written in Issue 22247. Although I think I
>only used it once or twice in my own personal librarie(s). So it’s a nice
>sign that we came up with the same @public
Barry A. Warsaw added the comment:
On Mar 25, 2016, at 12:14 AM, Ethan Furman wrote:
>public = Public(globals())
>
>@public
>def baz(a, b):
>#blah blah
>
>public('CONST1', 2)
I'm not crazy about that, plus I rather don't like the implicit binding of
Barry A. Warsaw added the comment:
On Mar 28, 2016, at 06:34 AM, Raymond Hettinger wrote:
>I have to agree with that part ;-) Sorry, but this feels "yucky" and is
>likely to cause more problems than it solves.
I've been experimenting with something like this in a Mailman
Barry A. Warsaw added the comment:
On Mar 28, 2016, at 04:26 PM, Serhiy Storchaka wrote:
>There is a helper in test.support that helps to add a test for __all__, and
>we slowly add these test for all modules. So this is not large issue for the
>stdlib.
>
>New module level name
Barry A. Warsaw added the comment:
On Mar 25, 2016, at 02:12 AM, Eryk Sun wrote:
>I added a prototype to Python/bltinmodule.c that gets or creates the __all__
>list from the current globals (i.e. PyEval_GetGlobals).
Hi Eryk. Can you post your diff to bltinmodule.c? I'd like to se
Barry A. Warsaw added the comment:
Here's my implementation based on eryksun's idea:
def public(thing=None, **kws):
mdict = (sys._getframe(1).f_globals
if thing is None
else sys.modules[thing.__module__].__dict__)
dunder_all = mdict.setdefaul
New submission from Barry A. Warsaw:
Too many times I hit failing assert statements, and have no idea what value is
causing the assertion to fail. Sure, you can provide a value to print (instead
of just the failing code) but it seems to be fairly rarely used. And it can
also lead to code
Barry A. Warsaw added the comment:
On Apr 06, 2016, at 03:07 PM, Serhiy Storchaka wrote:
>I think in this particular case you are more interesting in the value of k
>than k.replace('.', '').replace('-'
Changes by Barry A. Warsaw :
--
status: closed -> open
___
Python tracker
<http://bugs.python.org/issue25731>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue26763>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
Here's a C implementation. I'm a bit under the weather so please do double
check my refcounting logic. ;)
No tests or docs yet, but those would be easy to add. Here's an example:
@public
class Foo:
pass
public(qux=3)
print(qux)
Barry A. Warsaw added the comment:
Agreed with Serhiy. Raymond's approach is nicer, but I'm still not convinced
about the use case. Closing.
If someone wants to run with this again, an updated patch would be needed, and
the issue could be reopened, but I also suggest following th
Changes by Barry A. Warsaw :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue18531>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
Eric should chime in on the str.format() implications.
--
___
Python tracker
<http://bugs.python.org/issue18531>
___
___
Pytho
Barry A. Warsaw added the comment:
I think I missed a decref. New diff.
--
Added file: http://bugs.python.org/file42758/26632-in-c-2.diff
___
Python tracker
<http://bugs.python.org/issue26
Barry A. Warsaw added the comment:
On May 06, 2016, at 03:41 PM, Eric V. Smith wrote:
>I agree it would be a 3.6 only change (and I've change the versions to
>reflect that).
The reason the other versions were included was because this was originally
reported as a documentation bug.
Barry A. Warsaw added the comment:
Updated.
--
Added file: http://bugs.python.org/file42760/26632-in-c-3.diff
___
Python tracker
<http://bugs.python.org/issue26
Barry A. Warsaw added the comment:
One more diff. As I was working on tests, I realized that the decorator
version wasn't returning the thing it was decorating. Changing this also
allowed me to simplify the exit path.
I should be putting up a PyPI package soon which implements thi
Barry A. Warsaw added the comment:
Here's a standalone version for older Python 3's:
http://public.readthedocs.io/en/latest/
https://pypi.python.org/pypi/atpublic
--
___
Python tracker
<http://bugs.python.o
Barry A. Warsaw added the comment:
On May 09, 2016, at 04:19 PM, Ethan Furman wrote:
>`from ... import *` should not be used with packages that do not have an
>__all__ unless they support that usage (check their docs).
Good idea; I added a warni
Barry A. Warsaw added the comment:
Wow Ethan, that's quite interesting. I'm not sure if I like it or not. :)
It's better than having to assign a dummy value to the enum items, and if we
did require that, I'd suggest just throwing away the values for autonumbering.
But n
Barry A. Warsaw added the comment:
Now with docs and tests.
--
Added file: http://bugs.python.org/file42833/26632-in-c-5.diff
___
Python tracker
<http://bugs.python.org/issue26
Barry A. Warsaw added the comment:
aiosmtpd already defaults decode_data to False. We should consider pulling
this into 3.6 (not just for this reason of course).
http://aiosmtpd.readthedocs.io/en/latest/
--
___
Python tracker
<h
Barry A. Warsaw added the comment:
I refer again to https://bugs.python.org/issue26632 :)
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue27
New submission from Barry A. Warsaw:
Let's say you use a custom opener, and that opener happens to return exactly
-1. You end up with a SystemError because NULL got returned without an
exception being set:
def negative(fname, flags):
return -1
with open('/tmp/foo.txt'
Barry A. Warsaw added the comment:
On May 20, 2016, at 12:12 AM, ppperry wrote:
>Also, `OSError [Errno 0] Error` isn't the most helpful error message.
No, definitely not. ;)
--
___
Python tracker
<http://bugs.python.org
Barry A. Warsaw added the comment:
Here's a proposed fix.
--
assignee: -> barry
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file42907/27066-1.patch
___
Python tracker
<http://bugs.python.
Barry A. Warsaw added the comment:
On May 20, 2016, at 07:21 AM, Franklin? Lee wrote:
>I am iffy about using ``public`` to define other values. That part might be
>considered unpythonic.
It's a bit of a stretch. I like it for the convenience, and the
implementation is simple,
Barry A. Warsaw added the comment:
On May 20, 2016, at 07:02 AM, Berker Peksag wrote:
>+1 for the idea. I saw a lot of different 'all' or 'public' decorators in the
>wild. It would be nice to have a complete solution in Python. It would be
>good to add a note to Doc
Barry A. Warsaw added the comment:
On May 22, 2016, at 11:30 PM, Martin Panter wrote:
>Here are two examples where publicly-documented module attributes are
>intentionally omitted from __all__:
>
>* Issue 26234: typing.re and typing.io
>* Issue 23439: HTTP st
Changes by Barry A. Warsaw :
Added file: http://bugs.python.org/file42956/27066-2.patch
___
Python tracker
<http://bugs.python.org/issue27066>
___
___
Python-bugs-list m
Barry A. Warsaw added the comment:
On May 23, 2016, at 02:43 PM, Franklin? Lee wrote:
>I sometimes wrap functions that return iterators to make functions that
>return lists, because I work on the interpreter a lot. From there, it's not
>much of a stretch to imagine funct
Barry A. Warsaw added the comment:
BTW, I may wait to commit this until after we've moved to GitHub. :)
--
___
Python tracker
<http://bugs.python.org/is
Barry A. Warsaw added the comment:
On May 24, 2016, at 08:48 PM, R. David Murray wrote:
>Maybe we should blacklist MailmanProxy? I think we are planning to deprecate
>it but just haven't yet done the work. Looks fine otherwise.
It's probably not used much TBH. aiosmtpd has
Barry A. Warsaw added the comment:
On May 25, 2016, at 07:56 AM, Franklin? Lee wrote:
>>AttributeError: 'tuple' object has no attribute 'append'
>>which seems pretty obvious.
>
>I don't think the C version shows a traceback, so it won't be
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue19035>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
Ha! Apparently this bug broke coverage for the Mailman 3 source code:
https://bitbucket.org/ned/coveragepy/issue/360/html-reports-get-confused-by-l-in-the-code
--
___
Python tracker
<http://bugs.python.
Barry A. Warsaw added the comment:
Poor performance could fall under the category of bug fixes, so for an
in-maintenance mode release, a fix that does not in any way change user visible
behavior could be acceptable. It would probably be fine for 3.4 but I'm just
+0 on it. Larry
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue23731>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Barry Alan Scott:
I'm seeing a random traceback when starting a new thread on Mac OS X 10.10.2
with python 3.4.3 final.
Exception in thread Thread-1:
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/th
Barry Alan Scott added the comment:
I should point out using Python2.7 with wxPython I do not see this issue.
This issue was exposed during my efforts to port pysvn from py2.7+wxPython to
py3.4+wxpython-phoenix.
I do setup locale on the main thread very early before starting the background
Barry Alan Scott added the comment:
Mac OS X use the __CF_USER_TEXT_ENCODING env var to setup the locale in for
native libraries.
I found that for GUI python code I needed to convert the value in
__CF_USER_TEXT_ENCODING into a suitable call to setlocale().
The code I use is attached to
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue23842>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
+1 for keyed by site
There have been a number of issues over the years for which a configuration
file (or files) would have been useful. I think a discussion over on
python-ideas is the right way to move forward on this point
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue23910>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
@rdm: I'm pretty sure you're right about nobody noticing. :) Make it so!
--
___
Python tracker
<http://bugs.python.o
New submission from Barry A. Warsaw:
As described here:
http://news.gmane.org/find-root.php?message_id=20150422115959.1ff2ee58%40limelight.wooz.org
Importing a submodule binds the submodule's name in the parent module's
namespace. This is surprising, but it seems intentional and i
Barry A. Warsaw added the comment:
>From Guido:
It's definitely intentional, and it's fundamental to the package import
design. We've had many implementations of package import (remember "ni.py"?
last seen as "knee.py") and it was always there, because this
Barry A. Warsaw added the comment:
More rationale from the thread:
> The surprising part is that it also happens for explicit relative
> imports. I'm guessing that part was unintentional and simply not
> noticed when PEP 328 was implemented.
>
No, that must also have
Barry A. Warsaw added the comment:
Here's some new text for the Language Reference.
--
Added file: http://bugs.python.org/file39175/issue24029-1.txt
___
Python tracker
<http://bugs.python.org/is
Barry A. Warsaw added the comment:
Cool, thanks! I'll commit it and we can always clean it up/add to it later if
needed.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Barry A. Warsaw :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue24029>
___
___
Python-bugs-list
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue23699>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue23058>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
> Wouldn't it be safer all around if the subparsers took different arguments,
> or at least different namespace 'dest', than the main parser?
IMHO, yes. I agree that the semantics of what the original code is trying to
do is quite
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue24077>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
@rhettinger: OTOH, a macro can provide uniformity and correctness. If (as
appears evident from the patch) those "10 lines of boilerplate" are actually
implemented subtly differently each time, bugs can be easily introduced. So a
well written and
Barry A. Warsaw added the comment:
An increase of 13 characters doesn't seem so bad.
--
___
Python tracker
<http://bugs.python.org/issue6598>
___
___
Pytho
Barry A. Warsaw added the comment:
On May 19, 2015, at 07:23 AM, Serhiy Storchaka wrote:
>Now there is a question. Is it worth to use base16 (hexadecimal) to compact
>message id to 34 characters or base32 to compact it to 27 characters? Using
>base16 is pretty easy: just replace %
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue27921>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue27997>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
LGTM +1
--
___
Python tracker
<http://bugs.python.org/issue27988>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
On Sep 09, 2016, at 08:30 PM, Terry J. Reedy wrote:
>I think we should definitely fall back to using the .py file. A cache is an
>implementation convenience, not a language feature.
+1. If the cache is corrupt, it should be ignored and recreated. The
2601 - 2700 of 2726 matches
Mail list logo