Issue16965
Created on 2013-01-14 18:24 by barry, last changed 2018-10-16 05:47 by serhiy.storchaka. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8569 | merged | ZackerySpytz, 2018-07-30 18:23 | |
| PR 9838 | merged | miss-islington, 2018-10-13 09:27 | |
| PR 9839 | merged | miss-islington, 2018-10-13 09:27 | |
| PR 9890 | merged | ZackerySpytz, 2018-10-15 11:25 | |
| Messages (7) | |||
|---|---|---|---|
| msg179964 - (view) | Author: Barry A. Warsaw (barry) * | Date: 2013-01-14 18:24 | |
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(). |
|||
| msg223226 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014-07-16 15:52 | |
Can we have a response to this please. |
|||
| msg327567 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2018-10-12 07:18 | |
`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.
|
|||
| msg327645 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2018-10-13 09:27 | |
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 |
|||
| msg327646 - (view) | Author: miss-islington (miss-islington) | Date: 2018-10-13 09:48 | |
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 |
|||
| msg327647 - (view) | Author: miss-islington (miss-islington) | Date: 2018-10-13 09:51 | |
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 |
|||
| msg327809 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2018-10-16 05:46 | |
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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-10-16 05:47:18 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-10-16 05:46:40 | serhiy.storchaka | set | messages: + msg327809 |
| 2018-10-15 11:25:37 | ZackerySpytz | set | pull_requests: + pull_request9253 |
| 2018-10-13 09:51:39 | miss-islington | set | messages: + msg327647 |
| 2018-10-13 09:48:22 | miss-islington | set | nosy:
+ miss-islington messages: + msg327646 |
| 2018-10-13 09:27:50 | miss-islington | set | pull_requests: + pull_request9213 |
| 2018-10-13 09:27:43 | miss-islington | set | pull_requests: + pull_request9212 |
| 2018-10-13 09:27:35 | serhiy.storchaka | set | messages: + msg327645 |
| 2018-10-12 07:18:26 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg327567 |
| 2018-07-31 05:24:32 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2018-07-30 18:24:15 | ZackerySpytz | set | nosy:
+ ZackerySpytz versions: + Python 3.8, - Python 3.4, Python 3.5 |
| 2018-07-30 18:23:35 | ZackerySpytz | set | keywords:
+ patch stage: patch review pull_requests: + pull_request8081 |
| 2014-07-16 15:52:13 | BreamoreBoy | set | versions:
+ Python 3.5, - Python 3.2, Python 3.3 nosy: + BreamoreBoy, benjamin.peterson messages: + msg223226 type: behavior |
| 2013-01-18 19:27:03 | tshepang | set | nosy:
+ tshepang |
| 2013-01-14 18:24:06 | barry | create | |