[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f5e00f490ab5abfcf5e38e58bf969c7b5dcb4818 by Serhiy Storchaka 
(Zackery Spytz) in branch '2.7':
[2.7] bpo-16965: 2to3 now rewrites execfile() to open with rb. (GH-8569) 
(GH-9890)
https://github.com/python/cpython/commit/f5e00f490ab5abfcf5e38e58bf969c7b5dcb4818


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-15 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +9253

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-13 Thread miss-islington


miss-islington  added the comment:


New changeset 950fa40eee483f7507cd825b574a018b957dd253 by Miss Islington (bot) 
in branch '3.6':
bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569)
https://github.com/python/cpython/commit/950fa40eee483f7507cd825b574a018b957dd253


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-13 Thread miss-islington


miss-islington  added the comment:


New changeset 22381394ad1541db0b652eed802601f62510d22f by Miss Islington (bot) 
in branch '3.7':
bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569)
https://github.com/python/cpython/commit/22381394ad1541db0b652eed802601f62510d22f


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d4d60134b29290049e28df54f23493de4f1824b6 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-16965: 2to3 now rewrites execfile() to open with 'rb'. (GH-8569)
https://github.com/python/cpython/commit/d4d60134b29290049e28df54f23493de4f1824b6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9213

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9212

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-10-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

`exec(compile(open("fn", "rb").read(), "fn", 'exec'))` will emit a resource 
warning because the open file is not closed explicitly.

But this is a different issue.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-07-30 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-07-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2018-07-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +8081
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

Can we have a response to this please.

--
nosy: +BreamoreBoy, benjamin.peterson
type:  - behavior
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16965
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2013-01-18 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16965
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

2013-01-14 Thread Barry A. Warsaw

New submission from Barry A. Warsaw:

In this distribute bug I describe a problem when pip installing mimeparse, 
which has a setup.py with a BOM.  distribute uses execfile() which gets fixed 
in Python 3 to use a combination of compile(open()) as the fixer.

https://bitbucket.org/tarek/distribute/issue/349/dont-rely-on-2to3-to-properly-rewrite

I think the problem is that the fixer opens the file in text mode, which leaves 
the BOM as a bogus first character, causing the SyntaxError.  Instead, if the 
fixer opened the file in binary mode, then the BOM would be handled correctly 
by compile().

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 179964
nosy: barry
priority: normal
severity: normal
status: open
title: 2to3 should rewrite execfile() to open in 'rb' mode
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16965
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com