[issue18960] First line can be executed twice

2014-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset dd1e21f17b1c by Serhiy Storchaka in branch '2.7': Issue #1: Backported fixes from Python 3 (issue #18960). http://hg.python.org/cpython/rev/dd1e21f17b1c -- ___ Python tracker

[issue18960] First line can be executed twice

2014-01-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18960] First line can be executed twice

2014-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 875a514671dd by Serhiy Storchaka in branch '3.3': Do not reset the line number because we already set file position to correct http://hg.python.org/cpython/rev/875a514671dd New changeset 2af308f79727 by Serhiy Storchaka in branch 'default': Do not r

[issue18960] First line can be executed twice

2014-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now traceback test is failed. http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.3/builds/1358/steps/test/logs/stdio == FAIL: test_encoded_file (test.test_traceback.SyntaxTraceba

[issue18960] First line can be executed twice

2014-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1bdcaf6c0eb5 by Serhiy Storchaka in branch '3.3': Issue #18960: Fix bugs with Python source code encoding in the second line. http://hg.python.org/cpython/rev/1bdcaf6c0eb5 New changeset 04c05e408cbd by Serhiy Storchaka in branch 'default': Issue #18

[issue18960] First line can be executed twice

2014-01-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yeah, I'm okay now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue18960] First line can be executed twice

2014-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Benjamin, current version (without switch) looks more clean to me. Are you insist? -- ___ Python tracker ___

[issue18960] First line can be executed twice

2014-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I had not compiled the code after last change, so first patch is wrong. Here is fixed patch. -- Added file: http://bugs.python.org/file33307/source_encoding_second_line_2.patch ___ Python tracker

[issue18960] First line can be executed twice

2014-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which fixes this issue (and related issues). * Encoding declaration now detected in second line only if first line is spaces-only (this is needed for support -x option) or comment-only (needed for she-bang). * Fixed support for -x option. *

[issue18960] First line can be executed twice

2013-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It also makes non-working a common idiom for running Python files on Windows. When add first line "@python -x", it will be interpreted by Python and will cause SyntaxError. -- ___ Python tracker

[issue18960] First line can be executed twice

2013-09-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18960] First line can be executed twice

2013-09-13 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 13.09.2013 19:24, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > I thought that that was the specification*: the encoding comment should be > the first line unless it has to be the second line to allow for an executable > comment. Exec

[issue18960] First line can be executed twice

2013-09-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I thought that that was the specification*: the encoding comment should be the first line unless it has to be the second line to allow for an executable comment. Executing a non-comment first line twice is definitely contrary to the intent of the PEP. * I hav

[issue18960] First line can be executed twice

2013-09-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue18960] First line can be executed twice

2013-09-07 Thread Ezio Melotti
Ezio Melotti added the comment: > I think PEP-0263 should specify that if a magic comment is > second line in the file then first line should be a comment too. +1 -- nosy: +ezio.melotti ___ Python tracker

[issue18960] First line can be executed twice

2013-09-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: When run in Python 3 followed script: print('first') #coding=iso8859-1 print('second') it prints the 'first' string twice. Besides this weird behavior I think PEP-0263 should specify that if a magic comment is second line in the file then first line shoul