[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*.

[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 bound method Thread.__bootstrap of Thread(Thread-1, stopped -1326462144) Traceback (most recent call

[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 rep...@bugs.python.org

[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

[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24323 ___

[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

[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

[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 rep...@bugs.python.org

[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

[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 rep...@bugs.python.org

[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

[issue24004] avoid explicit generator type check in asyncio

2015-05-31 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Martin! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24004 ___ ___ Python-bugs-list mailing list

[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

[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

[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. --

[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():

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue19543 ___

[issue24323] Typo in Mutable Sequence Types documentation.

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24323 ___

[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

[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:

[issue24342] coroutine wrapper reentrancy

2015-05-31 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- stage: - patch review title: coroutine wrapper recursion - coroutine wrapper reentrancy type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24342

[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 -- ___

[issue24317] Change installer Customize default to match quick settings

2015-05-31 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24317 ___

[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

[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-three@') _ =

[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 steve.do...@microsoft.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24293 ___

[issue24317] Change installer Customize default to match quick settings

2015-05-31 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24317 ___ ___

[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 yseliva...@gmail.com: -- nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24303 ___ ___ Python-bugs-list

[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 yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24340 ___ ___ Python-bugs-list

[issue24284] Inconsistency in startswith/endswith

2015-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___

[issue24284] Inconsistency in startswith/endswith

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset a82498f424fe by Serhiy Storchaka in branch '3.5': Issue #24284: The startswith and endswith methods of the str class no longer https://hg.python.org/cpython/rev/a82498f424fe New changeset 04162e06323f by Serhiy Storchaka in branch 'default': Issue

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

2015-05-31 Thread Rohith PR
New submission from Rohith PR: It would be cleaner to do list(obj) than obj.to_list() (Eg: in numpy). PS: this is the first time that I'm contributing to python. If this feature request is accepted can I work on it myself? -- messages: 244522 nosy: Rohith.PR priority: normal severity:

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

2015-05-31 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22852 ___ ___

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24336 ___ ___ Python-bugs-list

[issue24264] imageop Unsafe Arithmetic

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report John. -- assignee: - serhiy.storchaka resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24264

[issue24264] imageop Unsafe Arithmetic

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset de0ccaaf2e64 by Serhiy Storchaka in branch '2.7': Issue #24264: Fixed buffer overflow in the imageop module. https://hg.python.org/cpython/rev/de0ccaaf2e64 -- nosy: +python-dev ___ Python tracker

[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 stdin, line 1, in module File

[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') --

[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__

[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 rep...@bugs.python.org

[issue24284] Inconsistency in startswith/endswith

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Martin. -- assignee: - serhiy.storchaka versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___

[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

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Library (Lib) nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24336 ___

[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 rep...@bugs.python.org http://bugs.python.org/issue24336

[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 rep...@bugs.python.org http://bugs.python.org/issue16991 ___

[issue24336] Allow arbitrary keywords to @contextmanager functions

2015-05-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - ncoghlan nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24336 ___

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue24326 ___

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

2015-05-31 Thread Ram Rachum
Changes by Ram Rachum r...@rachum.com: -- 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 ___

[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:

[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 'x __y' in dir(args) True

[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2015-05-31 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5054 ___ ___

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

2015-05-31 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- dependencies: +CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053

[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

[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 rep...@bugs.python.org

[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

[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. --

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue24339

[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 rep...@bugs.python.org http://bugs.python.org/issue24336

[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: