[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-09 Thread Nick Coghlan
Nick Coghlan added the comment: (Correction to the above: the case where this came up turned out to be due to consuming code monkeypatching things when it really shouldn't have been, so it fell into the second category of "It would have been helpful to be able to more easily rule this out as

[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-09 Thread Nick Coghlan
New submission from Nick Coghlan: Some of the hardest compatibility issues to track down in Python 3 migrations are those where existing code is depending on an implicit str->unicode promotion something in the depths of a support library (or sometimes even the standard library - the context

[issue28402] Add signed catalog files for stdlib on Windows

2016-10-09 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28402] Add signed catalog files for stdlib on Windows

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e050ed5da06d by Steve Dower in branch '3.6': Issue #28402: Adds signed catalog files for stdlib on Windows. https://hg.python.org/cpython/rev/e050ed5da06d New changeset 27edae50e62c by Steve Dower in branch 'default': Issue #28402: Adds signed

[issue28402] Add signed catalog files for stdlib on Windows

2016-10-09 Thread Steve Dower
New submission from Steve Dower: On Windows, we sign all binaries with the PSF code signing certificate. We can also sign all the standard library and tools .py files using a catalog, which will put the hashes of the original files into a signed bundle. This can then be validated by users

[issue28394] Spelling fixes

2016-10-09 Thread Martin Panter
Martin Panter added the comment: Thanks Ville. I added some more fixes of my own I had been saving up. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: The cost is really small (an integer compare vs memory malloc and copy). The advantages are fast path for empty strings and retaining consistency with other codes in unicodeobject.c. You can see other places use the same optimization, e.g. PyUnicode_FromUnicode,

[issue28397] Faster index range checks

2016-10-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Don't change the code in the collections module. While semantically valid, the change obfuscates the code. The meaning of maxlen < 0 is that there is no maximum length. I don't want this test hidden; otherwise, I would have changed it long ago as was

[issue28394] Spelling fixes

2016-10-09 Thread Roundup Robot
New submission from Roundup Robot: New changeset 6b1df8905012 by Martin Panter in branch '3.5': Issue #28394: Spelling and typo fixes in code comments and changelog https://hg.python.org/cpython/rev/6b1df8905012 New changeset bd113af10005 by Martin Panter in branch '3.6': Issue #28394: Merge

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-10-09 Thread Joshua Jay Herman
Joshua Jay Herman added the comment: Hi I performed the rebase on the default branch. -- Added file: http://bugs.python.org/file45041/rebased_addMissingEnvironmentalVariables.patch ___ Python tracker

[issue28373] input() prints to original stdout even if sys.stdout is wrapped

2016-10-09 Thread Martin Panter
Martin Panter added the comment: >From memory, there are at least three code paths for input(): 1. Fallback implementation, used when stdout is a pipe or other non-terminal 2. Default PyOS_ReadlineFunctionPointer() hook, used when stdout is a terminal:

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-10-09 Thread Mingye Wang
Mingye Wang added the comment: The "join the web people" solution should look like this: $ diff -Naurp a/_codecs_cn.c b/_codecs_cn.c --- a/_codecs_cn.c2016-10-09 14:24:04.675111500 -0700 +++ b/_codecs_cn.c2016-10-09 14:27:06.600961500 -0700 @@ -128,6 +128,12 @@ ENCODER(gbk)

[issue28092] Build failure for 3.6 on Centos 5.11

2016-10-09 Thread Martin Panter
Martin Panter added the comment: For replacing macros, I think “static inline” may be fine, even with older compilers. Maybe these PyDTrace_ functions could also be static inline, since they were originally macros. Or do they really need to be linkable inline functions? --

[issue28400] Remove uncessary checks in unicode_char and resize_copy

2016-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28400] Remove uncessary checks in unicode_char and resize_copy

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 61e454a1c9d7 by Serhiy Storchaka in branch 'default': Issue #28400: Removed uncessary checks in unicode_char and resize_copy. https://hg.python.org/cpython/rev/61e454a1c9d7 -- nosy: +python-dev ___

[issue28400] Remove uncessary checks in unicode_char and resize_copy

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Additional check has a non-zero cost. What is the benefit of this change? -- ___ Python tracker ___

[issue28183] Clean up and speed up dict iteration

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Few weeks I tried to rewrite loops in more fast way, but I have not found anything significantly faster or clearer. Some forms of was a few percent faster, but I would be difficult to explain this effect. Most likely it was an artifact of the compilation.

[issue28183] Clean up and speed up dict iteration

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 112714f3745d by Serhiy Storchaka in branch '3.6': Issue #28183: Optimize and cleanup dict iteration. https://hg.python.org/cpython/rev/112714f3745d -- nosy: +python-dev ___ Python tracker

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: Hm. I agree that _getframe() is horrible. But I'm not sure I want code outside typing.py to be aware of __origin__. -- priority: release blocker -> deferred blocker ___ Python tracker

[issue12974] array module: deprecate '__int__' conversion support for array elements

2016-10-09 Thread Oren Milman
Changes by Oren Milman : -- nosy: +Oren Milman ___ Python tracker ___ ___ Python-bugs-list

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I tried and all tests pass on 3.7a also with prior import of typing. A larger fix is not _necessary_, but I would _prefer_ to go with the option 4 that I proposed above, i.e.: Instead of special casing abc and functools in __subclasshook__ in typing via

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: So is a larger fix not necessary? If so we can close this (assuming the tests now pass). -- ___ Python tracker ___

[issue3401] wsgiref can't handle unicode environments

2016-10-09 Thread R. David Murray
R. David Murray added the comment: Since this is a buildbot error report and we don't release unless the buildbots in the stable set are green, I think we can close this now :) -- nosy: +r.david.murray resolution: -> out of date stage: test needed -> resolved status: open -> closed

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-09 Thread Attila Vangel
Attila Vangel added the comment: Thanks for fixing this issue. I checked the changed documentation online, and I came up with a very similar solution. One difference is that although this example overrides the make_connection() method, but omits the following lines which are present in the

[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2016-10-09 Thread Stefano Rivera
New submission from Stefano Rivera: setup.py build for a library using py_limited_api will always generate a stable ABI tagged shared library, even under the pydebug interpreter. This means that extensions that are built for a pydebug interpreter may be accidentally (and brokenly) imported in

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2016-10-09 Thread R. David Murray
R. David Murray added the comment: Issue 25154 has deprecated pyvenv in 3.6. The docs, however, still need updating. The updated docs should mention pyvenv only to say that it is deprecated, I think. This change could be applied to 3.5 if we get it in before 3.5 final. -- stage:

[issue28400] Remove uncessary checks in unicode_char and resize_copy

2016-10-09 Thread Xiang Zhang
New submission from Xiang Zhang: In resize_copy we don't need to PyUnicode_READY(unicode) since when it's not PyUnicode_WCHAR_KIND it should be ready. In unicode_char, PyUnicode_1BYTE_KIND is handled by get_latin1_char. -- components: Interpreter Core files:

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I think this is the right way to fix this, as discussed on python-dev, memoryview is not considered consistent with ByteString. -- ___ Python tracker

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe this fix helps? I tried your repro and it no longer fails. -- ___ Python tracker ___

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69fe5f2e5aae by Guido van Rossum in branch '3.5': Issue #28339: Remove ByteString.register(memoryview(...)) from typing.py. https://hg.python.org/cpython/rev/69fe5f2e5aae New changeset 8958836a2c89 by Guido van Rossum in branch '3.6': Issue #28339:

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: Oh the line ByteString.register(type(memoryview(b''))) should be removed from typing.py. -- priority: deferred blocker -> release blocker ___ Python tracker

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: Fine. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is just a cleaning up of not very important code. -- ___ Python tracker ___

[issue27972] Confusing error during cyclic yield

2016-10-09 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you for reporting this! Closing the issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue27972] Confusing error during cyclic yield

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d877876aa89 by Yury Selivanov in branch '3.5': Issue #27972: Prohibit Tasks to await on themselves. https://hg.python.org/cpython/rev/8d877876aa89 New changeset 41c4f535b5c0 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #27972)

[issue26081] Implement asyncio Future in C to improve performance

2016-10-09 Thread Yury Selivanov
Yury Selivanov added the comment: Yes, I think it's a good idea. -- ___ Python tracker ___ ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-09 Thread INADA Naoki
INADA Naoki added the comment: How about changing module name? _asyncio_speedup for example. -- ___ Python tracker ___

[issue28399] Remove UNIX socket from FS before binding

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3b162d5e70a by Yury Selivanov in branch '3.5': Issue #28399: Remove UNIX socket from FS before binding. https://hg.python.org/cpython/rev/a3b162d5e70a New changeset 019c5c2f1239 by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28399)

[issue28399] Remove UNIX socket from FS before binding

2016-10-09 Thread Yury Selivanov
New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/441 -- assignee: yselivanov components: asyncio messages: 278367 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Remove UNIX socket from FS before

[issue28399] Remove UNIX socket from FS before binding

2016-10-09 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-09 Thread Yury Selivanov
Yury Selivanov added the comment: I mean another optimization possibility. -- ___ Python tracker ___ ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-09 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you, INADA! Next task -- optimize asyncio.Task in C in 3.7. Another 10-15% performance improvement. -- ___ Python tracker

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-10-09 Thread Xiang Zhang
New submission from Xiang Zhang: Right now in _PyUnicode_FromASCII, it only optimises for size 1 not size 0. All other places getting the same situation in unicodeobject.c do both. -- files: _PyUnicode_FromASCII.patch keywords: patch messages: 278364 nosy: haypo, serhiy.storchaka,

[issue25720] Fix curses module compilation with ncurses6

2016-10-09 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Thanks, building is fine here. By the way, testing is broken due to other bugs (/tmp not available on Android). It's unrelated and I'll open a new issue for that. -- ___ Python tracker

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-09 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94c9c314f5d9 by Berker Peksag in branch '3.5': Issue #28389: Fix ProxiedTransport example in xmlrpc.client documentation https://hg.python.org/cpython/rev/94c9c314f5d9 New changeset 60c5c77c0190 by Berker Peksag in branch '3.6': Issue #28389: Merge

[issue28392] shlex - non-posix-mode: error in Multiple occurances of quotes substrings/words

2016-10-09 Thread R. David Murray
R. David Murray added the comment: >>> shlex.split('"Do""This""Separate"', posix=False) ['"Do"', '"This"', '"Separate"'] >>> shlex.split('Do"SeparateThis"', posix=False) ['Do"SeparateThis"'] Both of these are as documented. The first has three separate words, since each word that starts

[issue25720] Fix curses module compilation with ncurses6

2016-10-09 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Thank you for confirming, Yen :) In this case, It seems necessary that resolves headers. I think missing headers issue maybe solve by #28190. I wrote a join test patch for #28190 and #25720. Would you be able to resolve headers using this? -- Added

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Xiang Zhang
Xiang Zhang added the comment: We don't need to remove it for 3.5 and 3.6? -- ___ Python tracker ___ ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-09 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> resolved versions: +Python 3.7 ___ Python tracker ___

[issue23782] Leak in _PyTraceback_Add

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: More refactoring. -- Added file: http://bugs.python.org/file45036/_PyTraceback_Add_leak2.patch ___ Python tracker ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-09 Thread INADA Naoki
INADA Naoki added the comment: I close this issue for now. Further improvements can be new issue. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue27945] Various segfaults with dict

2016-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +inada.naoki versions: +Python 2.7, Python 3.7 ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1be8cd7cee92 by Serhiy Storchaka in branch 'default': Issue #28379: Removed redundant check. https://hg.python.org/cpython/rev/1be8cd7cee92 -- ___ Python tracker

[issue28397] Faster index range checks

2016-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45035/check_index.cocci ___ Python tracker ___

[issue28397] Faster index range checks

2016-10-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The expression for testing that some index is in half-open range from 0 to limit can be written as index >= 0 && index < limit or as (size_t)index < (size_t)limit The latter form generates simpler machine code. This is idiomatic code, it is

[issue28394] Spelling fixes

2016-10-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +martin.panter ___ Python tracker ___ ___

[issue28396] Remove *.pyo references from man page

2016-10-09 Thread Ville Skyttä
Changes by Ville Skyttä : -- assignee: docs@python components: Documentation files: man-pyo.patch keywords: patch nosy: docs@python, scop priority: normal severity: normal status: open title: Remove *.pyo references from man page type: enhancement Added file:

[issue28395] Remove unnecessary semicolons

2016-10-09 Thread Ville Skyttä
Changes by Ville Skyttä : -- components: Tests files: semicolons.patch keywords: patch nosy: scop priority: normal severity: normal status: open title: Remove unnecessary semicolons type: enhancement Added file: http://bugs.python.org/file45032/semicolons.patch

[issue28394] Spelling fixes

2016-10-09 Thread Ville Skyttä
Changes by Ville Skyttä : -- assignee: docs@python components: Documentation files: spelling.patch keywords: patch nosy: docs@python, scop priority: normal severity: normal status: open title: Spelling fixes type: enhancement Added file:

[issue28393] Update encoding lookup docs wrt #27938

2016-10-09 Thread Ville Skyttä
New submission from Ville Skyttä: The attached patch brings codecs docs up to date with respect to changes in #27938. -- assignee: docs@python components: Documentation files: codecs-doc.patch keywords: patch messages: 278354 nosy: docs@python, haypo, scop priority: normal severity:

[issue25720] Fix curses module compilation with ncurses6

2016-10-09 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: headers.sh in ncurses changes "#include " to the actual path. For example here's a line in my unctrl.h: #include -- ___ Python tracker

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-09 Thread Oren Milman
Oren Milman added the comment: Thanks for the reviews and patience :) -- ___ Python tracker ___ ___

[issue28392] shlex - non-posix-mode: error in Multiple occurances of quotes substrings/words

2016-10-09 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez: See also 28391: Multiple occurances of: Closing quotes separate words The issue 28391 is accepted, as it is defined: Quotes *within* words are ignored, only a leading quoted string will result in a separate word. (That's recursive: try

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Alternative patch chain original exception as __cause__ instead of __context__. What is better? >>> class FaultyImplementation: ... def __set_name__(self, *args): ... 1/0 ... >>> class TheoreticallyCouldWork: ... attr =

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shouldn't it be RuntimeError? Proposed patch makes RuntimeError be raised with chained original exception. This preserves more information. >>> class FaultyImplementation: ... def __set_name__(self, *args): ... 1/0 ... >>> class