-
-
Notifications
You must be signed in to change notification settings - Fork 236
Description
Python 3.10 introduced the -X warn_default_encoding option as part of PEP597. This option issues an EncodingWarning when a locale-specific default is encoding is used when opening files. This is a useful option to turn on (especially in test suites) if you interact with user-supplied files.
Python 3.11 modified setuptools.run() to make an encoding argument required if subprocess.run() is invoked in text mode. As of 8.0.3, setuptools_scm doesn't provide an encoding argument when invoking run, although there are other environmental hints that UTF-8 encoding should be used.
We encountered this in a test suite because we have -X warn_default_encoding enabled, and we also run pytest in "warnings-as-errors" mode. See [beeware/briefcase#1474] for the way this manifests.