Skip to content

Commit 1666c39

Browse files
SG-34462 Test CI with Python 3.11 (#327)
* Test CI with Python 3.10 * Fix typo * Remove sre_constants deprecation
1 parent e398564 commit 1666c39

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

azure-pipelines-templates/run-tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@ jobs:
5050
python.version: '3.9'
5151
Python310:
5252
python.version: '3.10'
53-
# Note for Python 3.11. This will raise hundres of warnings on a third party module
54-
# pytest_nunit/nunit.py
55-
# DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
56-
# This is the current behavior on the latest 1.0.3 version of this module.
53+
Python311:
54+
python.version: '3.11'
5755

58-
maxParallel: 3
56+
maxParallel: 4
5957

6058
variables:
6159
group: sg-credentials

shotgun_api3/lib/pyparsing.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
import sys
106106
import warnings
107107
import re
108-
import sre_constants
109108
import collections
110109
import pprint
111110
import traceback
@@ -3310,7 +3309,7 @@ def __init__(self, pattern, flags=0, asGroupList=False, asMatch=False):
33103309
try:
33113310
self.re = re.compile(self.pattern, self.flags)
33123311
self.reString = self.pattern
3313-
except sre_constants.error:
3312+
except re.error:
33143313
warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
33153314
SyntaxWarning, stacklevel=2)
33163315
raise
@@ -3501,7 +3500,7 @@ def __init__(self, quoteChar, escChar=None, escQuote=None, multiline=False,
35013500
self.re = re.compile(self.pattern, self.flags)
35023501
self.reString = self.pattern
35033502
self.re_match = self.re.match
3504-
except sre_constants.error:
3503+
except re.error:
35053504
warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
35063505
SyntaxWarning, stacklevel=2)
35073506
raise

software_credits

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ SOFTWARE.
8080

8181
============================== pyparsing ==============================
8282

83+
Copyright (c) 2003-2019 Paul T. McGuire
84+
8385
Permission is hereby granted, free of charge, to any person obtaining
8486
a copy of this software and associated documentation files (the
8587
"Software"), to deal in the Software without restriction, including

tests/ci_requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ flake8
1818
pytest
1919
pytest-azurepipelines
2020
coverage
21-
pytest-coverage
21+
pytest-coverage
22+
# Note for Python 3.11: This will raise a lot of warnings on this third party module
23+
# `DeprecationWarning: Use setlocale(), getencoding() and getlocale()`
24+
# Using this PR until it gets merged
25+
pytest-nunit @ git+https://github.com/pytest-dev/pytest-nunit.git@refs/pull/73/merge

0 commit comments

Comments
 (0)