Skip to content

Specifies UTF-8 encoding when opening os-release/distro release files#324

Merged
HorlogeSkynet merged 1 commit intomasterfrom
fix/open_encoding_issue
Feb 6, 2022
Merged

Specifies UTF-8 encoding when opening os-release/distro release files#324
HorlogeSkynet merged 1 commit intomasterfrom
fix/open_encoding_issue

Conversation

@HorlogeSkynet
Copy link
Member

@HorlogeSkynet HorlogeSkynet commented Feb 6, 2022

This patch fixes execution when system default locale does not support Unicode.
distro actually didn't honor OS-RELEASE(5), telling us to expect UTF-8 encoded strings : https://www.freedesktop.org/software/systemd/man/os-release.html#Description

Against Python 3.10 with warn_default_encoding enabled flag, this silences EncodingWarning.

Closes #243.


EDIT : it looks like Frank does not have write access nor is member of @python-distro/maintainers

This patch fixes execution when system default locale does not support Unicode.
distro actually didn't honor OS-RELEASE(5), telling us to expect UTF-8 encoded strings : <https://www.freedesktop.org/software/systemd/man/os-release.html#Description>

Against Python 3.10 with `warn_default_encoding` enabled flag, this silences EncodingWarning.

Closes #243.
Copy link
Contributor

@funkyfuture funkyfuture left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@HorlogeSkynet HorlogeSkynet requested review from a team and removed request for a team February 6, 2022 14:19
@HorlogeSkynet HorlogeSkynet added this to the 1.7.0 milestone Feb 6, 2022
@HorlogeSkynet HorlogeSkynet merged commit b8590ec into master Feb 6, 2022
@HorlogeSkynet HorlogeSkynet deleted the fix/open_encoding_issue branch February 6, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test suite assumes UTF-8 encoding while the implementation does not

3 participants