Skip to content
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

[FR] Use UTF-8 for MANIFEST.in #3264

Open
1 task done
Jayman2000 opened this issue Apr 13, 2022 · 1 comment
Open
1 task done

[FR] Use UTF-8 for MANIFEST.in #3264

Jayman2000 opened this issue Apr 13, 2022 · 1 comment
Labels
enhancement Needs Triage Issues that need to be evaluated for severity and status.

Comments

@Jayman2000
Copy link

What's the problem this feature will solve?

I’m trying to make my package work consistently across Linux and Windows. My MANIFEST.in file contains Unicode characters. What encoding MANIFEST.in is decoded with depends on the user’s locale settings. Most Linux distros default to UTF-8. Windows defaults to a non-Unicode encoding (in fact, UTF-8 locales are a rather recent feature in Windows. My Windows 10 system still labels them as being in beta). What this means is that my package successfully builds on most Linux systems and fails to build with a UnicodeDecodeError on most Windows systems.

Describe the solution you'd like

Make it so that MANIFEST.in files are always decoded as UTF-8. This idea is similar to #1702.

Alternative Solutions

At the moment, I tell users who want to build the package to either make their locale use UTF-8 or enable UTF-8 mode. This isn’t ideal because it requires extra effort on the users part. Plus, I’m the one who created the file; I would know best what encoding it uses, not the OS.

Another solution would be to allow package authors’ to configure the encoding used by MANIFEST.in. A similar option for configuring setup.cfg’s encoding was added but was removed in favor of always using UTF-8. Based on that, I’m assuming that this project would prefer to just require UTF-8 instead of allowing the encoding to be configured.

Finally, the easiest solution would be for me to only use ASCII characters in my MANIFEST.in file. Theoretically, this would still fail on systems with a locale encoding that isn’t compatible with ASCII, but I’m not sure if any of those systems would be able to run modern Python.

Additional context

No response

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@Jayman2000 Jayman2000 added enhancement Needs Triage Issues that need to be evaluated for severity and status. labels Apr 13, 2022
@MuellerSeb
Copy link

MuellerSeb commented Jun 8, 2022

I am more in favor of #3341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

2 participants