Skip to content

Commit

Permalink
chore: Use 3.11 for integration tests (#199)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
rzhao271 and cclauss authored Jul 17, 2023
1 parent a7eb264 commit 1e574ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node-gyp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: ["3.7", "3.10"]
python: ["3.8", "3.x"]

runs-on: ${{ matrix.os }}
steps:
Expand Down
6 changes: 5 additions & 1 deletion pylib/gyp/easy_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False,
if win32 and os.linesep != "\r\n":
xml_string = xml_string.replace("\n", "\r\n")

default_encoding = locale.getdefaultlocale()[1]
if sys.version_info >= (3, 11):
default_encoding = locale.getencoding()
else:
default_encoding = locale.getdefaultlocale()[1]

if default_encoding and default_encoding.upper() != encoding.upper():
xml_string = xml_string.encode(encoding)

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ ignore = [
"PLW0603",
"PLW2901",
"RUF005",
"RUF012",
"UP031",
]
line-length = 88
Expand Down

0 comments on commit 1e574ee

Please sign in to comment.