Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Sep 8, 2021

The PYTHONUTF8 environment variable is defined in PEP 540, and it is actually used in our CI:

PYTHONUTF8: 1

This PR documents such usage to avoid users' errors.

@maflcko
Copy link
Member

maflcko commented Sep 9, 2021

cr ACK c427a58

@laanwj
Copy link
Member

laanwj commented Sep 9, 2021

I'm kind of surprised that we need it, because we jumped through quite some hoops to force UTF-8 everywhere (e.g. even adding encoding='utf-8' to open calls explicitly). But yes if we use it in CI it should be documented.

@maflcko
Copy link
Member

maflcko commented Sep 9, 2021

From what I understand is that Windows is one of the few that doesn't use Unicode locale by default. According to the PEP, this can be enforced on the python side:

"use the utf-8 encoding, regardless of the locale currently set by the current platform, and"

@laanwj
Copy link
Member

laanwj commented Sep 9, 2021

Right, this is really the sledgehammer option. I was hoping we didn't need it because we overrode all the specific occurrences where there was a doubt about character set. But apparently not, so we need it.

@fanquake fanquake merged commit b653415 into bitcoin:master Sep 10, 2021
@hebasto hebasto deleted the 210908-utf branch September 10, 2021 07:42
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Sep 11, 2021
…ndows

c427a58 doc: Set PYTHONUTF8=1 for functional tests on Windows (Hennadii Stepanov)

Pull request description:

  The `PYTHONUTF8` environment variable is defined in [PEP 540](https://www.python.org/dev/peps/pep-0540/), and it is actually used in our CI: https://github.com/bitcoin/bitcoin/blob/5e3380b9f59481fc18e05b9d651c3c733abe4053/.cirrus.yml#L89

  This PR documents such usage to avoid users' [errors](bitcoin#22922 (comment)).

ACKs for top commit:
  MarcoFalke:
    cr ACK c427a58

Tree-SHA512: 441b8cecfe47d548cfe403b0e1cd0aef25c1a70ff556434ead1f1e26372919931ac6f208a4ed6fd8dcca46e8709245e4fb06f95259a43c8e1221473ce1ee497b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Mar 13, 2022
…ndows

c427a58 doc: Set PYTHONUTF8=1 for functional tests on Windows (Hennadii Stepanov)

Pull request description:

  The `PYTHONUTF8` environment variable is defined in [PEP 540](https://www.python.org/dev/peps/pep-0540/), and it is actually used in our CI: https://github.com/bitcoin/bitcoin/blob/5e3380b9f59481fc18e05b9d651c3c733abe4053/.cirrus.yml#L89

  This PR documents such usage to avoid users' [errors](bitcoin#22922 (comment)).

ACKs for top commit:
  MarcoFalke:
    cr ACK c427a58

Tree-SHA512: 441b8cecfe47d548cfe403b0e1cd0aef25c1a70ff556434ead1f1e26372919931ac6f208a4ed6fd8dcca46e8709245e4fb06f95259a43c8e1221473ce1ee497b
@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants