Skip to content

LANG C.UTF-8 issue status? #887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nfantone opened this issue Nov 28, 2023 · 2 comments · Fixed by #895
Closed

LANG C.UTF-8 issue status? #887

nfantone opened this issue Nov 28, 2023 · 2 comments · Fixed by #895

Comments

@nfantone
Copy link

nfantone commented Nov 28, 2023

I've noticed that almost every image on here has these lines defined:

# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8

It looks like the linked issue was closed back in 2017 and it might not be relevant anymore. I'm curious: are there any particular reasons to keep this around?

EDIT: Just saw that there was a failed attempt to remove LANG before — however, the cause of those errors seems unclear and we're still linking to an issue that has been closed/resolved for several years.

@LaurentGoderre
Copy link
Member

@tianon @yosifkit I wonder if we can try removing it to 3.13 since it's in a RC state. If it works we can just keep it for versions prior to 3.13

@tianon
Copy link
Member

tianon commented Nov 29, 2023

Yeah, we should probably update to link to the latest failed attempt to remove it (#570, I think). The failures there make me very hesitant to try again without concrete evidence that we won't create similar problems again.

edmorley added a commit to heroku/buildpacks-python that referenced this issue Dec 16, 2024
Previously the buildpack would set the `LANG` env var at build
and run time to the value `C.UTF-8`, to match the official Docker
Python images.

However, the env var should not be needed for modern Python,
and so the official Docker Python images no longer set it:
docker-library/python#887
docker-library/python#895

In addition, the older issues typically only affected other distros
such as alpine, or environments where someone had overridden
the system locale, which doesn't apply to the Heroku base images.
edmorley added a commit to heroku/buildpacks-python that referenced this issue Dec 16, 2024
Previously the buildpack would set the `LANG` env var at build
and run time to the value `C.UTF-8`, to match the official Docker
Python images.

However, the env var should not be needed for modern Python,
and so the official Docker Python images no longer set it:
docker-library/python#887
docker-library/python#895

In addition, the older issues typically only affected other distros
such as alpine, or environments where someone had overridden
the system locale, which doesn't apply to the Heroku base images.

GUS-W-17443565.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants