Skip to content

Commit ce50e93

Browse files
authored
Drop Python 3.8 in CI (#484)
1 parent e4017fb commit ce50e93

File tree

6 files changed

+32
-29
lines changed

6 files changed

+32
-29
lines changed

azdev/help.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
text: azdev linter --repo azure-cli --tgt upstream/master --src upstream/dev
161161
"""
162162

163-
helps['scan'] = """
163+
helps['scan'] = r"""
164164
short-summary: Scan secrets for files or string
165165
long-summary: Check built-in scanning rules at https://github.com/microsoft/security-utilities/blob/main/GeneratedRegexPatterns/PreciselyClassifiedSecurityKeys.json
166166
examples:

azdev/operations/cmdcov/cmdcov.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ def _run_command_test_coverage(self):
239239
self.command_test_coverage['Total'][0] += count
240240
self.command_test_coverage['Total'][1] += len(self.all_untested_commands[module])
241241
self.command_test_coverage['Total'][2] = f'''{self.command_test_coverage["Total"][0] /
242-
(self.command_test_coverage["Total"][0] +
243-
self.command_test_coverage["Total"][1]):.3%}'''
242+
(self.command_test_coverage["Total"][0] +
243+
self.command_test_coverage["Total"][1]):.3%}'''
244244
logger.warning(self.command_test_coverage)
245245
return self.command_test_coverage
246246

azdev/operations/linter/rules/help_rules.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121

2222
# 'az' space then repeating runs of quoted tokens or non quoted characters
23-
_az_pattern = 'az\s*' + '(([^\"\'])*|' + '((\"[^\"]*\"\s*)|(\'[^\']*\'\s*))' + ')' # noqa: W605
23+
_az_pattern = r'az\s*' + '(([^\"\'])*|' + r'((\"[^\"]*\"\s*)|(\'[^\']*\'\s*))' + ')'
2424
# match the two types of command substitutions
25-
_CMD_SUB_1 = re.compile("\$\(\s*" + "(" + _az_pattern + ")" + "\)") # noqa: W605
26-
_CMD_SUB_2 = re.compile("`\s*" + "(" + _az_pattern + ")" + "`") # noqa: W605
25+
_CMD_SUB_1 = re.compile(r"\$\(\s*" + "(" + _az_pattern + ")" + r"\)")
26+
_CMD_SUB_2 = re.compile(r"`\s*" + "(" + _az_pattern + ")" + "`")
2727

2828
logger = get_logger(__name__)
2929

azdev/operations/tests/test_scan_and_mask.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_scan_file(self):
8686
self.assertEqual(len(result['scan_results'][simple_string_file]), 1)
8787
self.assertEqual(result['scan_results'][simple_string_file][0]['secret_name'], 'AdditionalPattern')
8888

89-
regex_pattern1 = RegexPattern('(?<refine>[\w.%#+-]+)(%40|@)([a-z0-9.-]*.[a-z]{2,})', '000', 'EmailAddress')
89+
regex_pattern1 = RegexPattern(r'(?<refine>[\w.%#+-]+)(%40|@)([a-z0-9.-]*.[a-z]{2,})', '000', 'EmailAddress')
9090
regex_pattern2 = RegexPattern('(?i)(?:^|[?;&])(?:dsas_secret|sig)=(?<refine>[0-9a-z\\/+%]{43,129}(?:=|%3d))', '001', 'LooseSasSecret')
9191
with mock.patch("azdev.operations.secret._load_built_in_regex_patterns", return_value=(regex_pattern1, regex_pattern2)):
9292
result = scan_secrets(file_path=info_json_file)
@@ -153,7 +153,7 @@ def test_mask(self):
153153
custom_pattern = {
154154
"Include": [
155155
{
156-
"Pattern": "(?<refine>[\w.%#+-]+)(%40|@)([a-z0-9.-]*.[a-z]{2,})",
156+
"Pattern": r"(?<refine>[\w.%#+-]+)(%40|@)([a-z0-9.-]*.[a-z]{2,})",
157157
"Name": "EmailAddress"
158158
}
159159
]

azure-pipelines-cli.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
name: 'pool-ubuntu-2004'
3434
steps:
3535
- task: UsePythonVersion@0
36-
displayName: 'Use Python 3.8'
36+
displayName: 'Use Python 3.12'
3737
inputs:
38-
versionSpec: 3.8
38+
versionSpec: 3.12
3939

4040
- task: Bash@3
4141
displayName: 'Run Wheel Build Script'
@@ -57,9 +57,9 @@ jobs:
5757
name: 'pool-ubuntu-2004'
5858
steps:
5959
- task: UsePythonVersion@0
60-
displayName: 'Use Python 3.8'
60+
displayName: 'Use Python 3.12'
6161
inputs:
62-
versionSpec: 3.8
62+
versionSpec: 3.12
6363

6464
- task: Bash@3
6565
displayName: 'Run Wheel Build Script'
@@ -80,10 +80,10 @@ jobs:
8080
name: 'pool-ubuntu-2004'
8181
strategy:
8282
matrix:
83-
Python38:
84-
python.version: '3.8'
8583
Python39:
8684
python.version: '3.9'
85+
Python312:
86+
python.version: '3.12'
8787
steps:
8888
- task: UsePythonVersion@0
8989
displayName: 'Use Python $(python.version)'
@@ -137,10 +137,10 @@ jobs:
137137
name: 'pool-ubuntu-2004'
138138
strategy:
139139
matrix:
140-
Python38:
141-
python.version: '3.8'
142140
Python39:
143141
python.version: '3.9'
142+
Python312:
143+
python.version: '3.12'
144144
steps:
145145
- task: DownloadPipelineArtifact@1
146146
displayName: 'Download Build'
@@ -169,10 +169,10 @@ jobs:
169169
name: 'pool-ubuntu-2004'
170170
strategy:
171171
matrix:
172-
Python38:
173-
python.version: '3.8'
174172
Python39:
175173
python.version: '3.9'
174+
Python312:
175+
python.version: '3.12'
176176
steps:
177177
- task: DownloadPipelineArtifact@1
178178
displayName: 'Download Build'
@@ -201,10 +201,10 @@ jobs:
201201
name: 'pool-ubuntu-2004'
202202
strategy:
203203
matrix:
204-
Python38:
205-
python.version: '3.8'
206204
Python39:
207205
python.version: '3.9'
206+
Python312:
207+
python.version: '3.12'
208208
steps:
209209
- task: DownloadPipelineArtifact@1
210210
displayName: 'Download Build'
@@ -233,10 +233,10 @@ jobs:
233233
name: 'pool-ubuntu-2004'
234234
strategy:
235235
matrix:
236-
Python38:
237-
python.version: '3.8'
238236
Python39:
239237
python.version: '3.9'
238+
Python312:
239+
python.version: '3.12'
240240
steps:
241241
- task: DownloadPipelineArtifact@1
242242
displayName: 'Download Build'
@@ -264,10 +264,10 @@ jobs:
264264
name: 'pool-ubuntu-2004'
265265
strategy:
266266
matrix:
267-
Python38:
268-
python.version: '3.8'
269267
Python39:
270268
python.version: '3.9'
269+
Python312:
270+
python.version: '3.12'
271271
steps:
272272
- task: DownloadPipelineArtifact@1
273273
displayName: 'Download Build'

azure-pipelines.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ jobs:
1212
name: 'pool-ubuntu-2004'
1313
strategy:
1414
matrix:
15-
Python38:
16-
python.version: '3.8'
17-
tox_env: 'py38'
1815
Python39:
1916
python.version: '3.9'
2017
tox_env: 'py39'
2118
Python310:
2219
python.version: '3.10'
2320
tox_env: 'py310'
21+
Python311:
22+
python.version: '3.11'
23+
tox_env: 'py311'
24+
Python312:
25+
python.version: '3.12'
26+
tox_env: 'py312'
2427
steps:
2528
- task: UsePythonVersion@0
2629
displayName: 'Use Python $(python.version)'
@@ -85,9 +88,9 @@ jobs:
8588
name: 'pool-ubuntu-2004'
8689
steps:
8790
- task: UsePythonVersion@0
88-
displayName: 'Use Python 3.8'
91+
displayName: 'Use Python 3.12'
8992
inputs:
90-
versionSpec: 3.8
93+
versionSpec: 3.12
9194

9295
- task: Bash@3
9396
displayName: 'Run Wheel Build Script'

0 commit comments

Comments
 (0)