[issue10839] email module should not allow some header field repetitions

2016-06-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 13, 2016, at 12:09 AM, Martin Panter wrote: >I think I would support deprecating the __setitem__() etc methods, perhaps >with a cleanup of the alternatives, e.g. add remove_all(). Also, >__getitem__() is equivalent to get(), which does

[issue10839] email module should not allow some header field repetitions

2016-06-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 12, 2016, at 09:19 PM, Raymond Hettinger wrote: >Would you consider raising an exception at least for the case of a "To:" >header or perhaps a warning or someother failsafe. No, not for compat32 policy. Seriously, I do not want to chan

[issue10839] email module should not allow some header field repetitions

2016-06-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 13, 2016, at 06:38 AM, Berker Peksag wrote: >I don't know if it's a good idea or API but can we add a 'policy' keyword >argument to email.mime.base.MIMEBase? Right now, this is the only way to >change the default po

[issue10839] email module should not allow some header field repetitions

2016-06-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 13, 2016, at 08:34 AM, Berker Peksag wrote: >Berker Peksag added the comment: > >> I think we just need to plumb a `policy` argument through to the ultimate >> base class, email.message.Message > >That's already possible:

[issue26988] Add AutoNumberedEnum to stdlib

2016-06-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I don't really think much more needs to be done other than agree on this tracker issue that it's something we want, and that Ethan's implementation is good enough. It's been a while since I looked that the code but it seemed good to me

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 09, 2016, at 03:20 PM, Ethan Furman wrote: >As far as I can tell there is only one "good" way around this: > >- store any names you don't want auto-numbered into an `_ignore_` > attribute (this only needs to be global and

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 10, 2016, at 05:42 PM, Ethan Furman wrote: >class Color(Enum, settings=AutoNumber): [...] >class Color(Enum, settings=AutoName): I guess `settings` would take an AutoType enum. But that can't also be autonumbered or it would be autos all t

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 11, 2016, at 12:27 AM, Ethan Furman wrote: >Not sure. At this point I have the stdlib enum, enum34 enum, and aenum enum. > >In terms of capability, aenum is the most advanced, followed by the stdlib >enum, and finally enum34 (really the onl

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 11, 2016, at 07:05 PM, Ethan Furman wrote: >class BaseZeroEnum(Enum, start=0): > "initial integer is 0" > ... > >? Oh, and yes if you specify a starting number you also activate the >AutoNumber feature. I

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Ethan, the suggestion has come up several times about using a dummy value such as the empty tuple to do autonumbering, thus looking more Pythonic. I'm not a huge fan of the empty tuple, and I'm still not sure whether we need this, but I wonder i

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Hey, I just realized that you can get pretty darn close with just a little bit of extra typing, and existing stdlib: from enum import Enum from itertools import count auto = count() class Color(Enum): red = next(auto) green

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue27814> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18139] email module should have a way to prepend and insert headers

2016-08-22 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue18139> ___ ___ Python-bugs-list mailin

[issue18139] email module should have a way to prepend and insert headers

2016-08-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've updated this to Python 3.6, but I don't know if there's time to design an API and implementation in the time left before beta 1. But a use case has come up, so I want to reboot this discussion (yes, it should go to email-sig too).

[issue18139] email module should have a way to prepend and insert headers

2016-08-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I meant .items() -- ___ Python tracker <http://bugs.python.org/issue18139> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17170] string method lookup is too slow

2013-02-13 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17170> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15767] add ImportNotFoundError

2013-02-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 19, 2013, at 07:24 PM, Serhiy Storchaka wrote: >Can this be the same ImportError but with special flag? Like an attribute on the exception? +1 -- ___ Python tracker <http://bugs.python.org/issu

[issue15767] add ImportNotFoundError

2013-02-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 19, 2013, at 07:49 PM, Brett Cannon wrote: >Serihy & Barry: no. We do that now and it's already a nasty little hack. It >would be better to let people catch an exception signaling that an import >didn't happen because some module

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-02-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Does the 2.x patch apply cleanly to 2.6? If so, then I think it should be applied (though I'd like to review it first). 2.6 is still under security maintenance until October 2013. I'm thinking we'll probably do one last security release a

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-02-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: +Python 2.6 ___ Python tracker <http://bugs.python.org/issue16248> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-02-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Release blocking for 2.6.9 (oh how I wish we could release block for specific Python versions). -- nosy: +georg.brandl, larry priority: normal -> release blocker ___ Python tracker <http://bugs.pyth

[issue17258] multiprocessing.connection challenge implicitly uses MD5

2013-02-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +doko ___ Python tracker <http://bugs.python.org/issue17258> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17258] multiprocessing.connection challenge implicitly uses MD5

2013-02-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17258> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17186] no way to introspect registered atexit handlers

2013-02-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17186> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16037] httplib: header parsing is not delimited

2013-02-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry versions: +Python 2.6 ___ Python tracker <http://bugs.python.org/issue16037> ___ ___ Python-bugs-list mailin

[issue16043] xmlrpc: gzip_decode has unlimited read()

2013-02-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry versions: +Python 2.6 ___ Python tracker <http://bugs.python.org/issue16043> ___ ___ Python-bugs-list mailin

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-02-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm working on applying the 2.x patch to 2.6, but one thing interesting of note: sudo, at least on Debian and derivatives going back at least to Squeeze, generally reset the environment by default (i.e. env_reset). So you'd have to either hav

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-02-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I think this has now been applied to all of 2.6, 2.7, 3.1, 3.2, 3.3, and 3.4. So, closing. -- ___ Python tracker <http://bugs.python.org/issue16

[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 22, 2013, at 06:54 PM, Charles-François Natali wrote: >Charles-François Natali added the comment: > >> Barry advised me to open this issue as it's a functional regression from >> Python 2. > >But it was relying on a private

[issue16801] Preserve original representation for integers / floats in docstrings

2013-02-23 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue16801> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16997] subtests

2013-03-04 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue16997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17330] Stop checking for directory cache invalidation in importlib

2013-03-04 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17330> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14266] pyunit script as shorthand for python -m unittest

2013-03-04 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue14266> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14266] pyunit script as shorthand for python -m unittest

2013-03-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: As I mentioned on python-dev, having a `pyunit` script is nice (whatever it's called), but we need to keep the `-m invocation` which will probably be the recommendation on distros such as Debian which provide multiple versions of Python. We're no

[issue14266] pyunit script as shorthand for python -m unittest

2013-03-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 04, 2013, at 07:45 PM, Antoine Pitrou wrote: > >Antoine Pitrou added the comment: > >> We're not going to want to install all possible flavors of >> `pyunit2.6`, `pyunit2.7`, `punit2.6-dbg`, `pyunit-3.2-dbg`, etc. etc. >

[issue17379] Zen amendment

2013-03-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17379> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17379] Zen amendment

2013-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 07, 2013, at 03:58 PM, Antoine Pitrou wrote: >Disagreed. This is the kind of sentence that cannot be correctly >understood without the (missing) original context. Plus, we fear change. ;) -- ___

[issue17370] PEP should note if it has been superseded

2013-03-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 09, 2013, at 03:30 AM, Terry J. Reedy wrote: >I think you are, in effect, asking for expansion of the 'PEP Header Preamble' >section of PEP-0001. I have added some of the PEP editors listed in the PEP >as nosy. I will let them decid

[issue17370] PEP should note related PEPs

2013-03-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It seems to me that the right thing to add a related PEPs section to any PEP which needs it, but I don't think we need an official header for it. Thus, I'm closing this PEP as Won't Fix. Feel free to open new bugs for any specific PEP that n

[issue15806] Add context manager for the "try: ... except: pass" pattern

2013-03-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15806> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15805] Add stdout redirection tool to contextlib

2013-03-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15805> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3982] support .format for bytes

2013-03-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue3982> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17445] Return the type you accept

2013-03-17 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: This came up at the Pycon 2013 Python 3 porting clinic. There are many cases in the stdlib that claim (either explicitly or implicitly) to accept bytes or strings, but that don't return the type of the arguments they accept. An examp

[issue17445] Return the type you accept

2013-03-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 17, 2013, at 03:10 PM, R. David Murray wrote: >There was a long thread about this on python-dev that might be worth going >back over, where I had the same misconception (that functions should always >return the same type as their arguments).

[issue17527] PATCH as valid request method in wsgiref.validator

2013-03-23 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17527> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17565] segfaults during serialization

2013-03-28 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17565> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15867] make importlib documentation easier to use

2013-03-28 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15867> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-03-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: You also end up with this nice bit of inconsistency: >>> x = myint(7) >>> from operator import index >>> range(10)[6:x] range(6, 7) >>> range(10)[6:x.__index__()] range(6, 8) >>> range(10)[6:index(x)] range(6, 7)

[issue17576] PyNumber_Index() is not int-subclass friendly

2013-03-29 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: operator.index() is just a thin wrapper around PyNumber_Index(). The documentation for operator.index() claims that it is equivalent to calling obj.__index__() but for subclasses of int, this is not true. In fact, PyNumber_Index() first does (e.g. in

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-03-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- title: PyNumber_Index() is not int-subclass friendly -> PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) ___ Python tracker <http://bugs.python.org/issu

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-03-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 30, 2013, at 12:29 AM, Eric Snow wrote: >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_inde

[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-03-30 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17579> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs

2013-04-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 01, 2013, at 07:40 PM, Brett Cannon wrote: >Barry, Eric: can you clarify why you made module_repr an abstractmethod and >thus require its overloading? Maybe Eric can, but I can't. ;) I honestly don't remember why we made it abstract

[issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs

2013-04-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 01, 2013, at 09:04 PM, Brett Cannon wrote: >If Eric doesn't have anything to add then I would like to change >importlib.abc.Loader.module_repr() to no longer be abstract and the default >to be defined as ``return repr(module)``. Els

[issue10379] locale.format() input regression

2013-04-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 02, 2013, at 11:32 AM, Eric V. Smith wrote: >My suggestion is to have format() be an alias for >format_string(). Deprecating format() is an optional step, but may not be >worth the hassle. Agreed on bo

[issue10379] locale.format() input regression

2013-04-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 02, 2013, at 03:04 PM, Eric V. Smith wrote: >I think it would be a bug fix and thus should be backported. It's not like >we'd be breaking any working code, unless it was expecting the exception. That would

[issue17621] Create a lazy import loader mixin

2013-04-02 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17621> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3

2013-04-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Okay, so this is not a Python problem, but an Ubuntu problem. It's also not a problem with Ubuntu's version of Python. I can reproduce it on Ubuntu 13.04 with hg trunk, but not Debian Wheezy with hg trunk. Closing as invalid and will investigate

[issue17630] Create a pure Python zipfile importer

2013-04-03 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17630> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-04-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17636> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17685] Frozenset literal?

2013-04-10 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17685> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15657] Error in Python 3 docs for PyMethodDef

2013-04-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I just ran into this too. -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15657> ___ ___ Python-bugs-list mailin

[issue15657] Error in Python 3 docs for PyMethodDef

2013-04-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: We should fix the code for 3.2 through 3.4, but change the docs for 3.2 and 3.3 to remove the parenthetical note. For 3.4 we can leave the parenthetical note but say this is new in 3.4 (or maybe, that it doesn't actually work in some versions <

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17012> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: >From a documentation standpoint, path='' is not the same as "When no path is >specified", so indeed it should return None when path=''. Serhiy's patch >looks good to me. -- _

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- assignee: -> barry ___ Python tracker <http://bugs.python.org/issue17012> ___ ___ Python-bugs-list mailing list Unsubscri

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- assignee: barry -> serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue17012> ___ ___ Python-bugs-list mai

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Serhiy, I'd say go ahead and commit it. +1 from me. -- ___ Python tracker <http://bugs.python.org/issue17012> ___ ___

[issue17750] allow the testsuite to run in the installed location

2013-04-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17750> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17712] test_gdb failures

2013-04-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry, doko ___ Python tracker <http://bugs.python.org/issue17712> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17712] test_gdb failures

2013-04-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Possibly this issue: Possibly this issue: https://bugzilla.redhat.com/show_bug.cgi?id=312011 I'm seeing tons of this on Ubuntu 13.04. -- ___ Python tracker <http://bugs.python.org/is

[issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04

2013-04-16 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: socket.gethostbyname('sadflkjsasf.i.nvali.d') gives a TimeoutError instead of an IOError on Ubuntu 13.04, causing the test to fail. % ./python -m unittest test.test_urllibnet .E../home/barry/projects/python/cpython/Lib/test/test_urlli

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I couldn't wait. :) -- assignee: serhiy.storchaka -> barry ___ Python tracker <http://bugs.python.org/issue17012> ___ _

[issue17012] Differences between /usr/bin/which and shutil.which()

2013-04-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue17012> ___ ___ Python-bugs-list

[issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04

2013-04-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 16, 2013, at 03:26 PM, R. David Murray wrote: >I can't see how this could be classed as a bug in Python. An invalid domain >should quickly return a DNS error on a correctly configured operating system, >which is what the test is tes

[issue17788] Add a with expression, for use in comprehensions

2013-04-18 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17788> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-18 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: As described here: http://www.wefearchange.org/2013/04/python-3-language-gotcha-and-short.html the following code will produce an UnboundLocalError when the exception is triggered: def bad(): e = None try: do_something() except

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 19, 2013, at 12:01 AM, Ezio Melotti wrote: > >Maybe we could raise a warning when the deleted name already exists in the >local namespace? Ideally, I think a SyntaxError if you could detect a previously bound name in the namespace being u

[issue4617] SyntaxError when free variable name is also an exception target

2013-04-18 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue4617> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 19, 2013, at 12:37 AM, R. David Murray wrote: >And what if it weren't a print statement? An error is better than a >"randomly" changed value, I think. I'm really not sure there is anything we >can do here, beyond Ezio

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17800> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Ezio, the problem with your patch is that it also gives a warning on this code, which is totally safe: def good(): exc = None try: bar(int(sys.argv[1])) except KeyError as e: print('ke') exc = e except Value

[issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings

2013-04-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17843> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17827] Document codecs.encode and codecs.decode

2013-04-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17827> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17828] More informative error handling when encoding and decoding

2013-04-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17828> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17839] base64 module should use memoryview

2013-04-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17839> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17853] Conflict between lexical scoping and name injection in __prepare__

2013-04-28 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17853> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17872] Crash in marshal.load() with bad reader

2013-04-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17872> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-05-06 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15535> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17921] explicit empty check instead of implicit booleaness

2013-05-08 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17921> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-09 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17941> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17961> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 12, 2013, at 10:57 AM, Nick Coghlan wrote: >I encountered an interesting suggestion [1] regarding the enum.Enum >convenience API: use the member names as their values, rather than the >current integers starting from one. > >Since

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 12, 2013, at 8:35 PM, Ethan Furman wrote: > Ethan Furman added the comment: > > The class syntax (and default Enum) no longer have preferential treatment for > integers (even __int__ is gone); so it is completely up to us as what should

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 13, 2013, at 10:10 AM, Antoine Pitrou wrote: >I agree with Nick here, there's no reason to auto-number constants in >Python. This is not C :-) Why should they be strings? Why not object()? Why is `x.value == str(x)` a useful invari

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17966> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It's not *particularly* silly[1], but I think that with Government backing, he could make it very silly. [1] I mean, the right hand side isn't silly at all and the left hand side merely does a forward aerial half turn every alternative

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-13 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17959> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 12, 2013, at 06:51 AM, Nick Coghlan wrote: >>>> class Shape(Enum): >... square = 2 >... diamond = 1 >... circle = 3 >... alias_for_square = square I see Guido pronounced against it, but I'm just registering that I

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 13, 2013, at 02:06 PM, Antoine Pitrou wrote: >Antoine Pitrou added the comment: > >> >I agree with Nick here, there's no reason to auto-number constants >> >in >> >Python. This is not C :-) >> >

<    20   21   22   23   24   25   26   27   28   >