[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc

2015-05-31 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
New submission from Martin Panter: This patch allows many context managers to accept keyword arguments called “func” and “self”. Current behaviour: >>> with TestCase().subTest(func="blaua"): pass ... Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.4/contextli

[issue24004] avoid explicit generator type check in asyncio

2015-05-31 Thread Martin Panter
Martin Panter added the comment: Yury, your last change causes DeprecationWarning: [ 38/398] test_asyncio /media/disk/home/proj/python/cpython/Lib/test/test_asyncio/test_pep492.py:119: DeprecationWarning: Please use assertEqual instead. self.assertEquals(coro.send(None), 'spam') -- n

[issue24335] Provide __list__(self) along the lines of __str__(self)

2015-05-31 Thread Ethan Furman
Ethan Furman added the comment: If somebody wants their class to support being turned into a list, the obvious answer is to have that class support iteration, and there are already three ways to do that: - supply an __iter__ that returns a separate iterator - supply an __iter__/__next__ t

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: Sorry here’s a better version that adapts some monkey-patching in the test suite (test_with). -- Added file: http://bugs.python.org/file39572/context-kw.v2.patch ___ Python tracker

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-31 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The changed test passes on 3.4 branch, but fails on 2.7 branch: $ python2.7 -m test.test_audioop test_add (__main__.TestAudioop) ... ok test_adpcm2lin (__main__.TestAudioop) ... ok test_alaw2lin (__main__.TestAudioop) ... ok test_avg (__main

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ee122fac1e8 by Serhiy Storchaka in branch '2.7': Fixed the array module in unicode disabled build (regression of issue20014). https://hg.python.org/cpython/rev/6ee122fac1e8 -- ___ Python tracker

[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d6a6028b104 by Serhiy Storchaka in branch '2.7': Fixed test_audioop for issue #24326. https://hg.python.org/cpython/rev/7d6a6028b104 -- ___ Python tracker ___

[issue24326] Audioop: weightB not divided by GCD, weightA divided twice

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Arfrever. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailin

[issue24337] Implement `http.client.HTTPMessage.__repr__` to make debugging easier

2015-05-31 Thread Ram Rachum
Changes by Ram Rachum : -- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Implement `http.client.HTTPMessage.__repr__` to make debugging easier type: enhancement versions: Python 3.5 ___ Python tracker <

[issue23684] urlparse() documentation does not account for default scheme

2015-05-31 Thread Martin Panter
Martin Panter added the comment: Here is a patch changing the table entries to “*scheme* argument”. Hopefully this is fairly obvious and doesn’t sound like it defaults to itself. I also made the descriptions of “scheme” and “allow_fragments” more specific, and added some unit tests, because th

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: New version with simpler test; thanks Serhiy. Looking closer at the history, this actually seems to be a regression caused by revision e4ba097123f6 (Issue 11647). Python 2 is not affected. -- Added file: http://bugs.python.org/file39574/context-kw.v3.pa

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: But maybe it wouldn’t hurt adding the test case in test_contextlib to Python 2. -- versions: +Python 2.7 ___ Python tracker ___ _

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-05-31 Thread py.user
New submission from py.user: >>> import argparse >>> >>> parser = argparse.ArgumentParser() >>> _ = parser.add_argument('foo bar') >>> _ = parser.add_argument('--x --y') >>> args = parser.parse_args(['abc']) >>> >>> args Namespace(foo bar='abc', x __y=None) >>> >>> 'foo bar' in dir(args) True

[issue16991] Add OrderedDict written in C

2015-05-31 Thread Stefan Krah
Stefan Krah added the comment: Opening again. I have too many questions. :) -- nosy: +skrah status: pending -> open ___ Python tracker ___ ___

[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2015-05-31 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []

2015-05-31 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed stage: needs patch -> patch review ___ Python tracker ___ __

[issue24337] Implement `http.client.HTTPMessage.__repr__` to make debugging easier

2015-05-31 Thread Martin Panter
New submission from Martin Panter: HTTPMessage essentially has exactly the same functionality as email.message.Message. It has been suggested to replace it with an alias to the Message class; see Issue 5053. So perhaps it would be best to add __repr__() to the underlying Message class instead?

[issue24337] Implement `http.client.HTTPMessage.__repr__` to make debugging easier

2015-05-31 Thread Ram Rachum
Ram Rachum added the comment: Regarding a unified `__repr__`: Sounds good. What I needed is to know whether there are any headers in there or not. So the number of headers, or the first 2-3, would have solved my problem. -- ___ Python tracker

[issue24339] iso6937 encoding missing

2015-05-31 Thread John Helour
New submission from John Helour: Please add encoding for the iso6937 charset. Many settopboxes (DVB-T/S) and relevant devices uses it for displaying EPG, videotext, etc. I've wrote (please look at the attached file) the encoding/decoding conversion codec some years ago. -- components:

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Nick Coghlan
Nick Coghlan added the comment: The v3 patch looks good to me, and indeed it's a regression I introduced back in 3.2. I don't see much value in adding the test to the 2.7 test suite (with contextlib2 just a pip install away, it's very unlikely the standard library version will see any signifi

[issue24339] iso6937 encoding missing

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New encoding can be added only in new Python release (3.6). -- nosy: +lemburg, loewis, serhiy.storchaka versions: +Python 3.6 -Python 2.7 ___ Python tracker _

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. The patch isn't applied cleanly to 2.7. If you Martin will provide the patch with tests for 2.7, I don't see why not apply it. -- ___ Python tracker __

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: They are accessible. >>> getattr(args, 'foo bar') 'abc' The limitation that argument names should be Python identifiers is too strong and adding it will break existing code (for example the use of such popular options as -0 or -@). -- nosy: +serhiy

[issue24004] avoid explicit generator type check in asyncio

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8296f0119f20 by Yury Selivanov in branch '3.5': Issue 24004: Fix DeprecationWarning in a unittest https://hg.python.org/cpython/rev/8296f0119f20 New changeset 60f5091cbfbf by Yury Selivanov in branch 'default': Issue 24004: Fix DeprecationWarning in

[issue24004] avoid explicit generator type check in asyncio

2015-05-31 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Martin! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: There isn't much defense against an overly literal reading of the docs. Both ``s.pop([i])`` and ``s.pop(i=-1)`` fail (the latter because pop doesn't take key word arguments and the docstring calls it "index". Also, you would have to define *s* and *i*.

[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: I don't feel particularly strongly about it. It's mildly more confusing in the 3.x docs than 2.7 because it's the only use in that section of an optional argument. I disagree that s.pop(i) is wrong, since it agrees with the "Results" column. But I agree it's n

[issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode()

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf6e782a7f94 by Serhiy Storchaka in branch '2.7': Issue #19543: Emit deprecation warning for known non-text encodings. https://hg.python.org/cpython/rev/cf6e782a7f94 -- ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf6e782a7f94 by Serhiy Storchaka in branch '2.7': Issue #19543: Emit deprecation warning for known non-text encodings. https://hg.python.org/cpython/rev/cf6e782a7f94 -- nosy: +python-dev ___ Python tracke

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf6e782a7f94 by Serhiy Storchaka in branch '2.7': Issue #19543: Emit deprecation warning for known non-text encodings. https://hg.python.org/cpython/rev/cf6e782a7f94 -- ___ Python tracker

[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-31 Thread Marc Jofre
Marc Jofre added the comment: Hi all, I did more tests, identifying that the main issue I have resides in another script (multiprocessing), when using nuitka compiler. I will get back to you with more info when I solve the multiprocessing issue. The command prompt dump is: data: HTTP/1.0 200

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed patch covers a large part of this issue, but not all. Following patch emits py3k warning for unicode.decode(). For now unicode(u'a', 'ascii') is forbidden, but u'a'.decode('ascii') is allowed in 2.7. The risk of false positive in this patch is lowe

[issue24340] co_stacksize estimate can be highly off

2015-05-31 Thread Armin Rigo
New submission from Armin Rigo: The computation of `co_stacksize' by the compiler is known to give only an upper bound estimate. http://bugs.python.org/issue1754094 is an example of fixing a "leak" where every repetition of a statement makes `co_stacksize' bigger by 1. However, in the whole

[issue24341] Test suite emits many DeprecationWarnings about sys.exc_clear() when -3 is enabled

2015-05-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -3 -We -bb -m test.regrtest -uall -W test___all__ test_threading [1/2] test___all__ [2/2] test_threading Unhandled exception in thread started by > Traceback (most recent call last): File "/home/serhiy/py/cpython2.7/Lib/threading.py", line 783, i

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0347f6e14ad6 by Tal Einat in branch '3.5': Issue #19543: Implementation of isclose as per PEP 485 https://hg.python.org/cpython/rev/0347f6e14ad6 -- ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c8c123943cf by Tal Einat in branch 'default': Issue #19543: Implementation of isclose as per PEP 485 https://hg.python.org/cpython/rev/5c8c123943cf -- ___ Python tracker

[issue24270] PEP 485 (math.isclose) implementation

2015-05-31 Thread Tal Einat
Tal Einat added the comment: I've just committed this into 3.5 and 3.6. (I accidentally included the wrong issue number in the commit message, so the bot hasn't posted here about it. Sorry!) -- ___ Python tracker

[issue24270] PEP 485 (math.isclose) implementation

2015-05-31 Thread Christopher Barker
Christopher Barker added the comment: I wrote: """I will update the PEP to indicate that it is float-only, or complex for the cmath implementation (thanks, Tal!).""" Done: https://github.com/PythonCHB/close_pep/blob/master/pep-0485.txt Hopefully pushed to the official PEP repo soon.

[issue24293] Windows installer unreadable with std/custom themes

2015-05-31 Thread Steve Dower
Steve Dower added the comment: Reopening this because the lack of a background colour means that the progress text accumulates while installed. I'll get to this sooner or later, but b2 is probably going to have this issue. -- resolution: fixed -> stage: resolved -> status: closed ->

[issue24340] co_stacksize estimate can be highly off

2015-05-31 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24180] PEP 492: Documentation

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3eb817e19090 by Yury Selivanov in branch '3.5': Issue 24180: Document sys.(set|get)_coroutine_wrapper https://hg.python.org/cpython/rev/3eb817e19090 New changeset ca489c50fbd1 by Yury Selivanov in branch 'default': Issue 24180: Document sys.(set|get

[issue24180] PEP 492: Documentation

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a185bb62a25 by Yury Selivanov in branch '3.5': Issue 24180: Mention sys.(get|set)_coroutine_wrapper in whatsnew https://hg.python.org/cpython/rev/8a185bb62a25 New changeset 10f92b4d55ed by Yury Selivanov in branch 'default': Issue 24180: Mention sy

[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-05-31 Thread py.user
py.user added the comment: Serhiy Storchaka wrote: > for example the use of such popular options as -0 or -@ Ok. What about inconsistent conversion dashes to underscores? >>> import argparse >>> >>> parser = argparse.ArgumentParser(prefix_chars='@') >>> _ = parser.add_argument('--x-one-two-th

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-05-31 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Maybe the __repr__ of _AttributeHolder should be changed so that invalid args are shown as unpacked dict in the signature ? Something that would : >>> argparse.Namespace(**{'foo bar':1}) argparse.Namespace(**{'foo bar':1}) -- nosy: +mbussonn ___

[issue24293] Windows installer unreadable with std/custom themes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset c7210097ac90 by Steve Dower in branch '3.5': Issue #24293: Adds mapping from explicit colours to system colours to correctly handle user themes. https://hg.python.org/cpython/rev/c7210097ac90 -- ___ Pyth

[issue24317] Change installer Customize default to match quick settings

2015-05-31 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue24317] Change installer Customize default to match quick settings

2015-05-31 Thread Steve Dower
Changes by Steve Dower : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24317] Change installer Customize default to match quick settings

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bc396eb4e56 by Steve Dower in branch '3.5': Issue #24317: Makes Customize page default to installing per-user, and switching to All Users enable CompileAll. https://hg.python.org/cpython/rev/5bc396eb4e56 -- nosy: +python-dev _

[issue24293] Windows installer unreadable with std/custom themes

2015-05-31 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-li

[issue24338] In argparse adding wrong arguments makes malformed namespace

2015-05-31 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Minimal changes to the repr seem to work. I can submit a proper patch. class N2(Namespace): def __repr__(self): type_name = type(self).__name__ arg_strings = [] unarg={} for arg in self._get_args(): arg_s

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Martin Panter
Martin Panter added the comment: Here is a patch with just the test case for 2.7, although I don’t have a strong opinion on whether it needs to be added or not. -- Added file: http://bugs.python.org/file39577/context-kw-2.7.patch ___ Python tracker

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0708aabefb55 by Yury Selivanov in branch '3.4': Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines https://hg.python.org/cpython/rev/0708aabefb55 New changeset 1dc232783012 by Yury Selivanov in branch '3.5': Issue 24017: Fix asyn

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0a699b828e7 by Yury Selivanov in branch '3.5': Issue 24017: Add a test for CoroWrapper and 'async def' coroutines https://hg.python.org/cpython/rev/a0a699b828e7 New changeset 89521ac669f0 by Yury Selivanov in branch 'default': Issue 24017: Add a te

[issue24342] coroutine wrapper recursion

2015-05-31 Thread Yury Selivanov
New submission from Yury Selivanov: Consider following piece of code: async def foo(): return 'spam' def wrapper(coro): async def wrap(coro): print('before') try: return await coro finally: print('after'

[issue24342] coroutine wrapper reentrancy

2015-05-31 Thread Yury Selivanov
Changes by Yury Selivanov : -- stage: -> patch review title: coroutine wrapper recursion -> coroutine wrapper reentrancy type: -> behavior ___ Python tracker ___ __

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Nick Coghlan
Nick Coghlan added the comment: The last two commit notifications were intended for issue #24270. -- ___ Python tracker ___ ___ Python

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2015-05-31 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue24270] PEP 485 (math.isclose) implementation

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset bbb3a3129c12 by Serhiy Storchaka in branch '3.5': Moved Misc/NEWS entry (issue #24270) to correct section. https://hg.python.org/cpython/rev/bbb3a3129c12 New changeset ff1938d12240 by Serhiy Storchaka in branch 'default': Moved Misc/NEWS entry (issu

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-31 Thread Lars Gustäbel
Lars Gustäbel added the comment: @Martin: This is actually a nice idea that I hadn't thought of. I updated the Python 3 patch to use a seek() that moves to one byte before the next header block, reads the remaining byte and raises an error if it hits eof. The code looks rather clean compared

[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-31 Thread Lars Gustäbel
Changes by Lars Gustäbel : Added file: http://bugs.python.org/file39580/issue24259-2.x-2.diff ___ Python tracker ___ ___ Python-bugs-list mail