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:
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
FWIW: I just ran into a situation where the new approach resulted
in pip, setuptools and zc.buildout not working anymore.
This was on an AIX system which did come with CA root certificates
at all.
Now, I knew how to fix this, but the solution was not
an obvious one. I had to use truss to figure
On 05.04.2015 22:49, Donald Stufft wrote:
>
> Donald Stufft added the comment:
>
>> I don't consider monkey patching a proper way to configure a Python
>> installation.
>
> The point is that that TLS validation on/off isn't conceptually a Python level
>
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue23910>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Travis A. Everett:
When BaseException.with_traceback(tb) is used, the __traceback__ property is
properly set, but the property gets overwritten when the exception is raised.
The attached file demonstrates the issue by raising exception a, which doesn't
use with_trac
Travis A. Everett added the comment:
Thanks, Martin--I should've thought to check to see if it'd just been pushed
back in the list. I was just focusing on a workaround for another problem and
did a double-take when the traceback value didn't match what was set.
This resolutio
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
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue28086>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
I think this bug actually is fixed now. I've tried my previously failing case
in Python 3.5 and 3.6 head and I don't get the error.
--
resolution: -> out of date
status: open -> closed
___
Pytho
Barry A. Warsaw added the comment:
Thanks Steve! Closing.
--
nosy: +barry
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue16700>
___
_
Barry A. Warsaw added the comment:
Two things: is it worth fixing this bug given the impending move to github?
Also, why is this reported here and not the pydotorg tracker?
https://github.com/python/pythondotorg/issues
Given that the last comment was 2014, I'm going to go ahead and
On 15.09.2016 11:11, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> Hum, since the discussion restarted, I reopen the issue ...
>
> "Well, pybench is not just one benchmark, it's a whole collection of
> benchmarks for various different aspects of
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue28160>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
I'm -1 also, mostly on the grounds that it's not (IME) a very common need and
it does clutter up the API.
--
nosy: +barry
___
Python tracker
<http://bugs.python.o
New submission from Barry A. Warsaw:
Sometimes we want to control the order of arguments printed by an argparse
defined cli. In practice, arguments are printed in the order in which they are
added via add_argument(), but I don't think this is documented and thus should
be consider
New submission from Barry A. Warsaw:
I'd love to sneak this into 3.6, but I can accept being too late. In any case,
_MutuallyExclusiveGroup.__init__() should accept title and description
arguments and pass them to the super class. Otherwise, you can't great a
mutually exclusive
Barry A. Warsaw added the comment:
Hmm, it might be more complicated than that, so let's ignore 3.6
--
versions: -Python 3.6
___
Python tracker
<http://bugs.python.org/is
Barry A. Warsaw added the comment:
The workaround is to do something like:
group = parser.add_argument_group(title, description)
me_group = group.add_mutually_exclusive_group()
me_group.add_argument(...blah blah blah...)
--
___
Python tracker
<h
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue17218>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
On Sep 24, 2016, at 05:06 PM, R. David Murray wrote:
>Barry, would you care to render an opinion on this proposed fix?
I think the general approach is probably the best you can do. I noticed a
couple of things though with RDM's v.2 patch.
First, I
Barry A. Warsaw added the comment:
While I was reviewing
https://gitlab.com/mailman/mailman/merge_requests/197/diffs I noticed the
KeyError and it made me thing "hmm, I wonder if this should be turned into one
of the email package e
New submission from Barry A. Warsaw:
This might also affect other Python version; I haven't checked, but I know it
affects Python 3.5.
In Mailman 3, we have a subclass of WSGIRequestHandler for our REST API, and we
got a bug report about an error condition returning a 400 in the body o
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue10721>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue26578>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
On Oct 28, 2016, at 10:42 PM, Martin Panter wrote:
>I think you should be able to reproduce this without Mailman or tox, by just
>running “python -m http.server”.
Yep, indeed.
>The problem is the “HTTP/0.9” protocol that Python is assuming does not
Barry A. Warsaw added the comment:
On Oct 28, 2016, at 10:57 PM, Martin Panter wrote:
>Parsing the version from words[-1] rather than words[2] may be a minor
>improvement however.
Indeed; I thought about that too.
--
___
Python tracker
Barry A. Warsaw added the comment:
On Oct 29, 2016, at 02:20 AM, Martin Panter wrote:
>Here is a patch to parse the version from the request in more cases. Since it
>is more of a cosmetic improvement for handling erroneous requests, I would
>probably only apply it to the next Pytho
Barry A. Warsaw added the comment:
FWIW, this breaks Mailman 3.1 (and probably 2.1)
--
nosy: +barry
___
Python tracker
<http://bugs.python.org/issue27030>
___
___
Barry A. Warsaw added the comment:
Specifically, point #2; undefined combinations of \ + ASCII becoming an error.
--
___
Python tracker
<http://bugs.python.org/issue27
Barry A. Warsaw added the comment:
On Nov 22, 2016, at 04:13 PM, Serhiy Storchaka wrote:
>Could Mailman be fixed? Undefined combinations of \ + ASCII emitted warnings
>in 3.5. And now they emit warnings even just in string literals
>(issue27364). If Mailman use undefined escape combina
Changes by Barry A. Warsaw :
--
nosy: +ned.deily
priority: normal -> release blocker
status: closed -> open
___
Python tracker
<http://bugs.python.org/i
Barry A. Warsaw added the comment:
I disagree that the documentation is at fault. This is known to break existing
code, e.g. http://bugs.python.org/msg281496
I think it's not correct to change the documentation but leave the
error-raising behavior for 3.6 because the deprecation was
Changes by Barry A. Warsaw :
--
priority: release blocker -> normal
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue27030>
___
___
Barry A. Warsaw added the comment:
On Nov 22, 2016, at 07:28 PM, Serhiy Storchaka wrote:
>The reason for disallowing some undefined escapes is the same as in pattern
>strings: this would allow as to introduce new special escape sequences.
I'll note that technically speaking, yo
A. Jesse Jiryu Davis added the comment:
If the patch requires a rewrite and its value is uncertain then I'll excuse
myself from this issue.
--
___
Python tracker
<https://bugs.python.org/is
Change by A. Jesse Jiryu Davis :
--
nosy: -emptysquare
___
Python tracker
<https://bugs.python.org/issue6721>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from A. Jesse Jiryu Davis:
In threading.Thread.__bootstrap_inner(), the thread sets self.__started before
adding itself to the _active collection. If a different thread forks between
these two operations, we're left with a thread that believes it's alive
althoug
A. Jesse Jiryu Davis added the comment:
Charles-François, I agree that many guarantees are impossible to enforce in a
multithreaded application that calls fork().
But the threading module does try to guarantee, after a fork, that isAlive() is
False for all threads but one. I claim that it can
A. Jesse Jiryu Davis added the comment:
Patch #2:
* Add comment before .set() as requested.
* setcheckinterval(0) and try 20 times to repro the bug, inspired by
test_enumerate_after_join. This reliably repros in 2.7.5.
--
Added file: http://bugs.python.org/file30934
Changes by A. Jesse Jiryu Davis :
Added file:
http://bugs.python.org/file30935/fix_is_alive_and_fork_python_33.patch
___
Python tracker
<http://bugs.python.org/issue18
A. Jesse Jiryu Davis added the comment:
Bump.
--
___
Python tracker
<http://bugs.python.org/issue18418>
___
___
Python-bugs-list mailing list
Unsubscribe:
2401 - 2500 of 2582 matches
Mail list logo