This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2018年08月23日 23:44 by vstinner, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8881 | merged | vstinner, 2018年08月23日 23:45 | |
| PR 8978 | merged | vstinner, 2018年08月28日 20:10 | |
| PR 8979 | merged | vstinner, 2018年08月28日 22:00 | |
| PR 8981 | merged | vstinner, 2018年08月28日 22:22 | |
| PR 8982 | merged | vstinner, 2018年08月28日 23:02 | |
| PR 8986 | merged | vstinner, 2018年08月29日 07:43 | |
| PR 8987 | merged | vstinner, 2018年08月29日 08:11 | |
| PR 8988 | merged | vstinner, 2018年08月29日 09:09 | |
| PR 9002 | merged | vstinner, 2018年08月29日 20:29 | |
| PR 9041 | merged | vstinner, 2018年09月03日 11:58 | |
| PR 9045 | merged | vstinner, 2018年09月03日 15:10 | |
| Messages (15) | |||
|---|---|---|---|
| msg323980 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月23日 23:44 | |
Currently, the code to select the encoding and error handler of sys.stdin, sys.stdout and sys.stderr is run later in Py_Initialize(). I propose to move most of this code into _PyCoreConfig_Read() and add stdio_encoding and stdio_errors to _PyCoreConfig to easily let Python embedders to select the encoding. Attached PR implements this idea. During Py_Initialize(), the code still reads the LC_CTYPE locale to choose the error handler if stdio_errors is NULL. This check cannot be done earlier, since the LC_CTYPE locale is only set to the user locale in Py_Initialize(): after _PyCoreConfig_Read(). The Py_SetStandardStreamEncoding() function has been added by Nick Coghlan in bpo-16129. This new pre-initialization API allows embedding applications like Blender to force a particular encoding and error handler for the standard IO streams. |
|||
| msg324290 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月28日 21:26 | |
New changeset 9e4994d410970fb4e75168401d159ba47a8f7108 by Victor Stinner in branch 'master': bpo-34485: Enhance init_sys_streams() (GH-8978) https://github.com/python/cpython/commit/9e4994d410970fb4e75168401d159ba47a8f7108 |
|||
| msg324294 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月28日 22:16 | |
New changeset 2c8ddcf4f14f3e4c87a6fe6678ab5ad09130c6ab by Victor Stinner in branch 'master': bpo-34485: Fix _Py_InitializeCore() for C locale coercion (GH-8979) https://github.com/python/cpython/commit/2c8ddcf4f14f3e4c87a6fe6678ab5ad09130c6ab |
|||
| msg324297 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月28日 23:13 | |
New changeset 98c49c6ab239875e35a3c271bc8fabde6c9be804 by Victor Stinner in branch '3.7': bpo-34485: Fix _Py_InitializeCore() for C locale coercion (GH-8979) (GH-8981) https://github.com/python/cpython/commit/98c49c6ab239875e35a3c271bc8fabde6c9be804 |
|||
| msg324298 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月28日 23:29 | |
New changeset 124b9eb4e41ba1676dad954eec9a1fb3480794e4 by Victor Stinner in branch 'master': bpo-34485: Add _Py_ClearStandardStreamEncoding() (GH-8982) https://github.com/python/cpython/commit/124b9eb4e41ba1676dad954eec9a1fb3480794e4 |
|||
| msg324306 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月29日 07:58 | |
New changeset 315877dc361d554bec34b4b62c270479ad36a1be by Victor Stinner in branch 'master': bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986) https://github.com/python/cpython/commit/315877dc361d554bec34b4b62c270479ad36a1be |
|||
| msg324309 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月29日 09:01 | |
New changeset 0b9ea4b211b24464c7d38f63e45e51c275c52dcd by Victor Stinner in branch '3.7': [3.7] bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986) (GH-8987) https://github.com/python/cpython/commit/0b9ea4b211b24464c7d38f63e45e51c275c52dcd |
|||
| msg324311 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月29日 09:25 | |
New changeset 177d921c8c03d30daa32994362023f777624b10d by Victor Stinner in branch 'master': bpo-34485, Windows: LC_CTYPE set to user preference (GH-8988) https://github.com/python/cpython/commit/177d921c8c03d30daa32994362023f777624b10d |
|||
| msg324315 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月29日 09:47 | |
New changeset dfe0dc74536dfb6f331131d9b2b49557675bb6b7 by Victor Stinner in branch 'master': bpo-34485: Add _PyCoreConfig.stdio_encoding (GH-8881) https://github.com/python/cpython/commit/dfe0dc74536dfb6f331131d9b2b49557675bb6b7 |
|||
| msg324316 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月29日 09:50 | |
Oh wow, I didn't expect that it would be so complicated to "just" get the encoding of sys.stdout... I had to fix many bugs to be able to do that! |
|||
| msg324349 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月29日 20:56 | |
New changeset cf21504194927b2f22132f48effea69eb8ade751 by Victor Stinner in branch 'master': bpo-34485: Emit C locale coercion warning later (GH-9002) https://github.com/python/cpython/commit/cf21504194927b2f22132f48effea69eb8ade751 |
|||
| msg324382 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2018年08月30日 13:53 | |
Yeah, there were some good reasons I went with the relatively brute force option of provideding Blender with a new config API call back in bpo-16129 - as we've seen, actually fixing it properly has been a multi-year multi-person effort :) |
|||
| msg324384 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年08月30日 14:46 | |
> Yeah, there were some good reasons I went with the relatively brute force option of provideding Blender with a new config API call back in bpo-16129 - as we've seen, actually fixing it properly has been a multi-year multi-person effort :) Yeah, I see ;-) Thanks for Py_SetStandardStreamEncoding(), it fixed Blender use case! |
|||
| msg324511 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年09月03日 12:38 | |
New changeset f01b2a1b84ee08df73a78cf1017eecf15e3cb995 by Victor Stinner in branch 'master': bpo-34544: Fix setlocale() in pymain_read_conf() (GH-9041) https://github.com/python/cpython/commit/f01b2a1b84ee08df73a78cf1017eecf15e3cb995 |
|||
| msg324526 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年09月03日 15:32 | |
New changeset 73b00becbdd40f6a80cfa00abf1ae650a2b5e454 by Victor Stinner in branch 'master': bpo-34544: pymain_read_conf() don't change LC_ALL (GH-9045) https://github.com/python/cpython/commit/73b00becbdd40f6a80cfa00abf1ae650a2b5e454 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:05 | admin | set | github: 78666 |
| 2018年09月03日 15:32:34 | vstinner | set | messages: + msg324526 |
| 2018年09月03日 15:10:17 | vstinner | set | pull_requests: + pull_request8507 |
| 2018年09月03日 12:38:24 | vstinner | set | messages: + msg324511 |
| 2018年09月03日 11:58:12 | vstinner | set | pull_requests: + pull_request8503 |
| 2018年08月30日 14:46:23 | vstinner | set | messages: + msg324384 |
| 2018年08月30日 13:53:23 | ncoghlan | set | nosy:
+ ncoghlan messages: + msg324382 |
| 2018年08月29日 20:56:09 | vstinner | set | messages: + msg324349 |
| 2018年08月29日 20:29:00 | vstinner | set | pull_requests: + pull_request8473 |
| 2018年08月29日 09:50:04 | vstinner | set | status: open -> closed resolution: fixed messages: + msg324316 stage: patch review -> resolved |
| 2018年08月29日 09:47:33 | vstinner | set | messages: + msg324315 |
| 2018年08月29日 09:25:23 | vstinner | set | messages: + msg324311 |
| 2018年08月29日 09:09:15 | vstinner | set | pull_requests: + pull_request8461 |
| 2018年08月29日 09:01:45 | vstinner | set | messages: + msg324309 |
| 2018年08月29日 08:11:13 | vstinner | set | pull_requests: + pull_request8460 |
| 2018年08月29日 07:58:21 | vstinner | set | messages: + msg324306 |
| 2018年08月29日 07:43:18 | vstinner | set | pull_requests: + pull_request8459 |
| 2018年08月28日 23:29:09 | vstinner | set | messages: + msg324298 |
| 2018年08月28日 23:13:33 | vstinner | set | messages: + msg324297 |
| 2018年08月28日 23:02:01 | vstinner | set | pull_requests: + pull_request8456 |
| 2018年08月28日 22:22:32 | vstinner | set | pull_requests: + pull_request8455 |
| 2018年08月28日 22:16:58 | vstinner | set | messages: + msg324294 |
| 2018年08月28日 22:00:52 | vstinner | set | pull_requests: + pull_request8453 |
| 2018年08月28日 21:26:36 | vstinner | set | messages: + msg324290 |
| 2018年08月28日 20:10:28 | vstinner | set | pull_requests: + pull_request8452 |
| 2018年08月23日 23:45:06 | vstinner | set | keywords:
+ patch stage: patch review pull_requests: + pull_request8358 |
| 2018年08月23日 23:44:09 | vstinner | create | |