[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-07 Thread Eryk Sun
Eryk Sun added the comment: I'm sure Steve already has this covered, but FWIW here's a patch to call WriteConsoleW. Here's the result with the patch applied: >>> sys.ps1 = '»»» ' »»» input("αβψδ: ") αβψδ: spam 'spam' and with interactive stdin and stdout/stderr redirected to a

[issue28388] Update documentation for typing module

2016-10-07 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: Here is the patch with updates according to recent changes in typing module and PEP 484: - most things are not classes now - outcome of parameterizing generics is cached - Union does not unify everything with Any - few minor fixes This patch also fixes

[issue28374] SyntaxError: invalid token in python2.7/test/test_grammar.py

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The absence of a space is intentional. See #21642. Fix applied 2014-06-07. Hence Berker's guesses. def test_float_exponent_tokenization(self): # See issue 21642. self.assertEqual(1 if 1else 0, 1) self.assertEqual(1 if 0else 0, 0)

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-07 Thread Eryk Sun
Eryk Sun added the comment: When I pointed this issue out in code reviews, I assumed you would add the relatively simple fix to decode the prompt and call WriteConsoleW. The long-term fix in issue 17620 has to be worked out with cross-platform support, and ISTM that it can wait for 3.7. Off

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

2016-10-07 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Since the quick fix is now applied, I think it should not be a release blocker any more. -- ___ Python tracker ___

[issue28100] Refactor error messages in symtable.c

2016-10-07 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28367] Add more standard baud rate constants to "termios"

2016-10-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review versions: +Python 3.7 ___ Python tracker ___

[issue28352] winfo_pathname(..) | window id "xyz" doesn't exist in this application. | Python 3.4.4

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: At least give a minimal but complete example that works in 3.4.1 but fails in 3.4.4. What you put in the title in not valid syntax. -- nosy: +serhiy.storchaka, terry.reedy ___ Python tracker

[issue28340] TextIOWrapper.tell extremely slow

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I suggest that you try backporting the patch to 2.7 and and/or ask on #4 whether there was a positive reason not to do so (and mention that you opened this issue to do so). -- nosy: +terry.reedy ___ Python

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-07 Thread Steve Dower
Steve Dower added the comment: This may force issue17620 into 3.6 - we really ought to be getting and using sys.stdin and sys.stderr in PyOS_StdioReadline() rather than going directly to the raw streams. The problem here is that we're still using fprintf to output the prompt, even though we

[issue28334] netrc does not work if $HOME is not set

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Windows, HOME is both split into two variables and replaced by USERPROFILE. C:\Users\Terry>set HOME HOMEDRIVE=C: HOMEPATH=\Users\Terry C:\Users\Terry>set USERPROFILE USERPROFILE=C:\Users\Terry So if it make sense to run this on Windows*, I would call it a

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is a regression from 3.5.2, where input("α") displays "α". -- ___ Python tracker ___

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-07 Thread Tiago Antao
Tiago Antao added the comment: This is the first patch that I am submitting. More than willing to do any changes deemed necessary... -- ___ Python tracker

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Same output with cp437. -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue28331] "CPython implementation detail:" removed when content translated

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I abbreviated title to make most of it visible in listings. -- nosy: +terry.reedy title: "CPython implementation detail:" is removed when contents is translated -> "CPython implementation detail:" removed when content translated

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch looks plausible to me. The flush calls definitely need to be guarded. -- nosy: +terry.reedy stage: -> patch review type: -> behavior ___ Python tracker

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-07 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch to demonstrate what I meant in msg226047. Example from the REPL: >>> __import__('encodings', fromlist=[u'aliases']) Traceback (most recent call last): File "", line 1, in TypeError: Item in ``from list'' must be str, not unicode --

[issue28317] Improve support of FORMAT_VALUE in dis

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5, Python 3.7 ___ Python tracker

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d150de9edba by Serhiy Storchaka in branch '3.5': Issue #25783: Fixed test_traceback when run directly (without regrtest). https://hg.python.org/cpython/rev/8d150de9edba New changeset 4646b64139c9 by Serhiy Storchaka in branch '3.6': Issue #25783:

[issue24098] Multiple use after frees in obj2ast_* methods

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

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue28257] Regression for star argument parameter error messages

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue28257] Regression for star argument parameter error messages

2016-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35676cd72352 by Serhiy Storchaka in branch '3.5': Issue #28257: Improved error message when pass a non-mapping as a var-keyword https://hg.python.org/cpython/rev/35676cd72352 -- ___ Python tracker

[issue18287] PyType_Ready() should sanity-check the tp_name field

2016-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c459b0f2b75 by Serhiy Storchaka in branch '3.5': Issue #18287: PyType_Ready() now checks that tp_name is not NULL. https://hg.python.org/cpython/rev/5c459b0f2b75 New changeset ba76dd106e66 by Serhiy Storchaka in branch '2.7': Issue #18287:

[issue18287] PyType_Ready() should sanity-check the tp_name field

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Niklas for your report and patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28387] double free in io.TextIOWrapper

2016-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +IO nosy: +benjamin.peterson, serhiy.storchaka, stutzbach priority: normal -> high stage: -> patch review ___ Python tracker

[issue26293] Embedded zipfile fields dependent on absolute position

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report and testing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue26293] Embedded zipfile fields dependent on absolute position

2016-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9a99a88301ef by Serhiy Storchaka in branch '2.7': Issue #26293: Fixed writing ZIP files that starts not from the start of the https://hg.python.org/cpython/rev/9a99a88301ef -- ___ Python tracker

[issue28387] double free in io.TextIOWrapper

2016-10-07 Thread Sebastian Cufre
Changes by Sebastian Cufre : -- keywords: +patch Added file: http://bugs.python.org/file45005/textio.c.patch ___ Python tracker ___

[issue28387] double free in io.TextIOWrapper

2016-10-07 Thread Sebastian Cufre
New submission from Sebastian Cufre: We have found that you can produce a crash when an instance of _io.TextIOWrapper is being deallocated while there's another thread invoking the garbage collector. I've attached a simple script that should reproduce the issue (textiowrapper_crash.py)

[issue26293] Embedded zipfile fields dependent on absolute position

2016-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 005704f5634f by Serhiy Storchaka in branch '3.5': Issue #26293: Fixed writing ZIP files that starts not from the start of the https://hg.python.org/cpython/rev/005704f5634f New changeset b06e75ae1981 by Serhiy Storchaka in branch '3.6': Issue

[issue24098] Multiple use after frees in obj2ast_* methods

2016-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47d5bf5a846f by Serhiy Storchaka in branch '2.7': Issue #24098: Fixed possible crash when AST is changed in process of https://hg.python.org/cpython/rev/47d5bf5a846f New changeset f575710b5f56 by Serhiy Storchaka in branch '3.5': Issue #24098:

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-07 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, that message will be sufficient. Perfectly. -- ___ Python tracker ___

[issue28384] hmac cannot be used with shake algorithms

2016-10-07 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +christian.heimes type: -> behavior ___ Python tracker ___

[issue28378] urllib2 does not handle cookies with `,`

2016-10-07 Thread SilentGhost
SilentGhost added the comment: Could you please post an example of what you're being sent from the server and how your code handles / fails to deal with it. -- nosy: +SilentGhost stage: -> test needed versions: +Python 2.7 ___ Python tracker

[issue28386] Improve documentation about tzinfo.dst(None)

2016-10-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: None is passed to tzinfo.dst() when it is called from time.dst() method. This is documented in the relevant section: . I am not sure whether if it is worth repeating in the abstract

[issue28386] Improve documentation about tzinfo.dst(None)

2016-10-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +belopolsky ___ Python tracker ___ ___

[issue28377] struct.unpack of Bool

2016-10-07 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> struct.unpack('?', '\x02') returns (False,) on Mac OSX ___ Python tracker

[issue24452] Make webbrowser support Chrome on Mac OS X

2016-10-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: The patch looks good to me. (The test coverage for chrome browser can be improved. But that seems a like a different change than the current one). -- assignee: -> orsenthil nosy: +orsenthil versions: +Python 3.7 -Python 3.4, Python 3.5

[issue28386] Improve documentation about tzinfo.dst(None)

2016-10-07 Thread Daniel Moisset
New submission from Daniel Moisset: The datetime module documentation[1] describes the tzinfo.dst method with a single "dt" argument without being too explicit about possible values for it. The implication is that dt should be a datetime object, but the implementation of time.dst() [2]

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-07 Thread Berker Peksag
Berker Peksag added the comment: I think we can classify this one as a usability bug and improve the exception message. -- nosy: +ncoghlan ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This makes sense. Note that this is the way hashes are implemented for the datetime objects: . -- nosy: +belopolsky ___ Python tracker

[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-10-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi Jaysinh, I reviewed your changes, they look good to me. I can't approve it, so it would still be good for a core dev here to take another pass. Thanks :) -- ___ Python tracker

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-07 Thread Tim Graham
Tim Graham added the comment: As far as I can tell, this isn't an issue on Python 3. Can this be closed since Python 2 is only receiving bug fixes now? -- nosy: +Tim.Graham ___ Python tracker

[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-10-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list

[issue28128] Improve the warning message for invalid escape sequences

2016-10-07 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry for not responding earlier. It's unlikely I'll have time for this before beta 2, although I can probably get to it after that and before beta 3. Don't let me stop someone else from improving on the patch. --

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-07 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, I think we should implement this for object.__format__. Marking as easy. -- components: +Interpreter Core -Library (Lib) keywords: +easy (C) ___ Python tracker

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-07 Thread R. David Murray
R. David Murray added the comment: Bytes don't support formatting codes, so they are passed through to object, which doesn't support any formatting codes, and produces the error message you see. Since all other built in types reject invalid codes with a message that mentions their type, I

[issue25720] Fix curses module compilation with ncurses6

2016-10-07 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Thanks masamoto! There's another minor issue about this patch: if there's no curses.h (ncurses built with --without-curses-h), the detection always fails. -- ___ Python tracker

[issue26906] format(object.__reduce__) fails intermittently

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one demonstration of this bug: $ ./python -IS >>> import operator >>> operator.length_hint(iter("abc")) 0 >>> import collections.abc >>> operator.length_hint(iter("abc")) 3 -- ___ Python tracker

[issue27972] Confusing error during cyclic yield

2016-10-07 Thread Guido van Rossum
Guido van Rossum added the comment: I've meditated on this and I've changed my mind. A task that awaits itself is so obviously not following the task protocol that it should be shot on sight. No exceptions. (Only the task itself should ever set the result or exception, and *only* by returning or

[issue25720] Fix curses module compilation with ncurses6

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added a comment on Rietveld. -- ___ Python tracker ___ ___

[issue28385] Non-informative exception while formatting strings.

2016-10-07 Thread Марк Коренберг
New submission from Марк Коренберг: $ python3 -c "'{0:s}'.format(b'qwe')" Traceback (most recent call last): File "", line 1, in TypeError: non-empty format string passed to object.__format__ Spent many hours to detect bug in my code. -- components: Library (Lib) messages: 278244

[issue26081] Implement asyncio Future in C to improve performance

2016-10-07 Thread INADA Naoki
INADA Naoki added the comment: fastfuture3-wip.patch is work in progress implementation of implementing __repr__ and __del__ in C. I post it to avoid duplicated works. Known TODOs: * Support overriding Future._repr_info() * Fix __del__ is not called (Research how tp_del, tp_finalize, and

[issue25720] Fix curses module compilation with ncurses6

2016-10-07 Thread Ismail Donmez
Ismail Donmez added the comment: @masamoto thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25720] Fix curses module compilation with ncurses6

2016-10-07 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I updated the patch that add configuration check for is_pad. the is_pad is wrapped into py_is_pad at Modules/_cursesmodule.c:932 by either of three ways. Case one -- is_pad is found: Define the macro that is simple wrapping. Case two -- is_pad is not found,

[issue28384] hmac cannot be used with shake algorithms

2016-10-07 Thread Thomas Kluyver
Changes by Thomas Kluyver : -- nosy: +takluyver ___ Python tracker ___ ___

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-07 Thread Xiang Zhang
Xiang Zhang added the comment: v2 applies Serhiy's suggestions. -- Added file: http://bugs.python.org/file45001/PyUnicode_CopyCharacters_v2.patch ___ Python tracker

[issue28378] urllib2 does not handle cookies with `,`

2016-10-07 Thread Grzegorz Sikorski
Grzegorz Sikorski added the comment: It looks urllib2 works with this scenario, but upper level request fails. -- ___ Python tracker ___

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

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And merged in a6eb6acfe04a. -- ___ Python tracker ___ ___

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

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: rangeiter_new() was added in r55167. -- ___ Python tracker ___ ___

[issue28377] struct.unpack of Bool

2016-10-07 Thread Meador Inge
Meador Inge added the comment: Looks like a dup to me. -- nosy: +meador.inge ___ Python tracker ___ ___

[issue28384] hmac cannot be used with shake algorithms

2016-10-07 Thread Min RK
New submission from Min RK: HMAC digest methods call inner.digest() with no arguments, but new-in-3.6 shake algorithms require a length argument. possible solutions: 1. add optional length argument to HMAC.[hex]digest, and pass through to inner hash object 2. set hmac.digest_size, and use

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

2016-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raising a DeprecationWarning in 3.6 doesn't hurt. -- ___ Python tracker ___

[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2016-10-07 Thread Thomas Levine
Thomas Levine added the comment: I just upgraded from 3.5.1 to 3.5.2 and found that I couldn't authenticate to PyPI anymore. And then I remembered that this had been fixed, so removed the extra percent sign, and my uploads worked. Thanks! -- ___

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

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45000/patchedCPython37TestOutput_ver2.txt ___ Python tracker ___

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

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44999/patchedCPython36TestOutput_ver2.txt ___ Python tracker ___

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

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44998/patchedCPython35TestOutput_ver2.txt ___ Python tracker ___

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

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44997/issue28376_CPython37_ver2.diff ___ Python tracker ___

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

2016-10-07 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file44996/issue28376_CPython36_ver2.diff ___ Python tracker ___

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

2016-10-07 Thread Oren Milman
Oren Milman added the comment: The diff files for 3.5 and 3.6 are attached (I only added @test.support.cpython_only, as you suggested). The diff file for 3.7 is also attached. It contains: - removing rangeiter_new - tests to verify one cannot create instances of range_iterator or