Skip to content

Commit 1e574ee

Browse files
rzhao271cclauss
andauthored
chore: Use 3.11 for integration tests (#199)
* chore: Use 3.11 for integration tests * chore: Add lint ignore rule * Python 3.7 is EOL next week so Python 3.8 and current Python --------- Co-authored-by: Christian Clauss <[email protected]>
1 parent a7eb264 commit 1e574ee

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/node-gyp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: [macos-latest, ubuntu-latest, windows-latest]
14-
python: ["3.7", "3.10"]
14+
python: ["3.8", "3.x"]
1515

1616
runs-on: ${{ matrix.os }}
1717
steps:

pylib/gyp/easy_xml.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False,
121121
if win32 and os.linesep != "\r\n":
122122
xml_string = xml_string.replace("\n", "\r\n")
123123

124-
default_encoding = locale.getdefaultlocale()[1]
124+
if sys.version_info >= (3, 11):
125+
default_encoding = locale.getencoding()
126+
else:
127+
default_encoding = locale.getdefaultlocale()[1]
128+
125129
if default_encoding and default_encoding.upper() != encoding.upper():
126130
xml_string = xml_string.encode(encoding)
127131

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ ignore = [
9494
"PLW0603",
9595
"PLW2901",
9696
"RUF005",
97+
"RUF012",
9798
"UP031",
9899
]
99100
line-length = 88

0 commit comments

Comments
 (0)