[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-19 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 1a05e87ec75436d818f05a5dabcecaea67334cbd by Nick Coghlan in branch '3.6': [3.6] bpo-31232: Backport custom print rshift message (GH-3155) https://github.com/python/cpython/commit/1a05e87ec75436d818f05a5dabcecaea67334cbd --

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-19 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +3192 ___ Python tracker ___ ___

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Nick Coghlan
Nick Coghlan added the comment: And done - thanks folks! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset a7c449b8c08933deabcf329fb74ed1336f6db34f by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-30721: Add missing '?' to new error message (GH-3131) https://github.com/python/cpython/commit/a7c449b8c08933deabcf329fb74ed1336f6db34f --

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Sanyam Khurana
Changes by Sanyam Khurana : -- pull_requests: +3165 ___ Python tracker ___ ___

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Sanyam Khurana
Sanyam Khurana added the comment: Ah, sorry for that. I'll just fix that right away in a few mins :) -- ___ Python tracker ___

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Nick Coghlan
Nick Coghlan added the comment: Note that I filed a separate issue to ask Ned about potentially backporting this to 3.6: https://bugs.python.org/issue31232 -- ___ Python tracker

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Nick Coghlan
Nick Coghlan added the comment: Checking the merged implementation locally, I belatedly noticed that we forgot the trailing question mark on the question: ``` >>> import sys >>> print >> sys.stderr Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s)

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5e2eb35bbed3e84079165e576cdb50ef36e13493 by Serhiy Storchaka (Sanyam Khurana) in branch 'master': bpo-30721: Show correct syntax hint in Py3 when using Py2 redirection syntax (#2345)

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-07-26 Thread Nick Coghlan
Nick Coghlan added the comment: Checking how we do it elsewhere, `NB_SLOT(nb_rshift)` looks like the right replacement. That's a compiler-dependent struct field offset calculation, so a discrepancy there could easily be the cause of a Windows-only failure. --

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-07-25 Thread Steve Dower
Steve Dower added the comment: The "op_slot == 96" looks suspicious - how is this value actually supposed to be calculated? -- ___ Python tracker ___

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-07-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: The test added in the PR passes on linux (Travis) and Mac (op's machine), fails on Windows (Appveyor). The patch itself modifies abstract.c. Could some Windows expert take a look? test_string_with_stream_redirection (test.test_print.TestPy2MigrationHint)

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-06-22 Thread Sanyam Khurana
Changes by Sanyam Khurana : -- pull_requests: +2390 ___ Python tracker ___ ___

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-06-21 Thread Nick Coghlan
Nick Coghlan added the comment: The specific error in question here is the one where Python 3 reads the old Python 2 stream redirection syntax as a combination of the right shift operator and tuple creation: ``` >>> print >> sys.stderr, "message" Traceback (most recent call last): File "",

[issue30721] Show expected input for right shift operator usage in custom "print" error message

2017-06-20 Thread Sanyam Khurana
New submission from Sanyam Khurana: While working on issue: http://bugs.python.org/issue30597 to enhance the custom error message by showing expected output in Python3 syntax when someone uses Python2 syntax, a PR was raised: https://github.com/python/cpython/pull/2009, where we just handled