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.

Title: Settign LANG=C modifies the --version behavior
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.8, Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hroncok, jwilk, miss-islington, ned.deily, vstinner
Priority: normal Keywords: patch

Created on 2018-06-10 19:35 by hroncok, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7712 merged vstinner, 2018-06-15 17:41
PR 7730 merged miss-islington, 2018-06-15 22:07
Messages (7)
msg319238 - (view) Author: Miro Hrončok (hroncok) * Date: 2018-06-10 19:35
On 3.6, setting LANG to C did not affect the --version behavior:

$ python3.6 --version
Python 3.6.5

$ LANG=C python3.6 --version
Python 3.6.5

On 3.7.0b5 it does.

$ python3.7 --version
Python 3.7.0b5

$ LANG=C python3.7 --version
Python 3.7.0b5 (default, Jun  1 2018, 03:54:41) 
[GCC 8.1.1 20180502 (Red Hat 8.1.1-1)]

My locale:


BTW I'm running Fedora builds of Python, where we have PEP 538 on 3.6 as well
msg319239 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-06-10 19:38
Odd. I see the same behavior with the macOS builds so it's not just Fedora.
msg319627 - (view) Author: Jakub Wilk (jwilk) Date: 2018-06-15 17:16
First bad commit is:
(bpo-29240, bpo-32030: Py_Main() re-reads config if encoding changes)
msg319629 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-15 17:42
The bug is a regression caused by the PEP 540 (UTF-8 Mode) and my work to rewrite Py_Main(). My PR 7712 fixes the bug.
msg319681 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-15 22:06
New changeset 6c5a4b315664f21bffc36ff6987fb4c4d1590897 by Victor Stinner in branch 'master':
bpo-33824, bpo-32030: Fix pymain_read_conf() (GH-7712)
msg319684 - (view) Author: miss-islington (miss-islington) Date: 2018-06-15 22:26
New changeset 046da1669598d6112d0a6fb056081f3eb5a4d4e7 by Miss Islington (bot) in branch '3.7':
bpo-33824, bpo-32030: Fix pymain_read_conf() (GH-7712)
msg319686 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-15 22:37
Ned: I let you decide if this bug should be backported to 3.7.0 final or not.

I would prefer to see this fix in 3.7.0, since Py_Main() refactoring was complex and maybe this bug hides another bug. The memset() is safe and make the code more reliable.
Date User Action Args
2022-04-11 14:59:01adminsetgithub: 78005
2018-06-15 22:37:51vstinnersetstatus: open -> closed
versions: + Python 3.8
messages: + msg319686

components: + Interpreter Core
resolution: fixed
stage: patch review -> resolved
2018-06-15 22:26:31miss-islingtonsetnosy: + miss-islington
messages: + msg319684
2018-06-15 22:07:48miss-islingtonsetpull_requests: + pull_request7342
2018-06-15 22:06:30vstinnersetmessages: + msg319681
2018-06-15 17:42:20vstinnersetmessages: + msg319629
2018-06-15 17:41:15vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request7326
2018-06-15 17:16:13jwilksetnosy: + vstinner, jwilk
messages: + msg319627
2018-06-10 19:38:39ned.deilysetnosy: + ned.deily
messages: + msg319239
2018-06-10 19:35:37hroncokcreate