Skip to content

Commit 16b30f2

Browse files
authored
chore(CI): use Linux arm64 hosted runners (#2429)
* chore(CI): use Linux arm64 hosted runners * chore: reformat with new `ruff`
1 parent ead6535 commit 16b30f2

File tree

14 files changed

+33
-48
lines changed

14 files changed

+33
-48
lines changed

.github/workflows/cibuildwheel.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,9 @@ jobs:
113113
- name: musllinux_x86_64
114114
os: ubuntu-latest
115115
- name: manylinux_aarch64
116-
os: ubuntu-latest
117-
emulation: true
116+
os: ubuntu-24.04-arm
118117
- name: musllinux_aarch64
119-
os: ubuntu-latest
120-
emulation: true
118+
os: ubuntu-24.04-arm
121119
- name: manylinux_s390x
122120
os: ubuntu-latest
123121
emulation: true

.github/workflows/test-wheels.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ jobs:
1717
matrix:
1818
platform:
1919
- build: "cp313-manylinux_aarch64"
20-
os: ubuntu-latest
21-
emulation: true
20+
os: ubuntu-24.04-arm
2221
- build: "cp313-manylinux_s390x"
2322
os: ubuntu-latest
2423
emulation: true

falcon/bench/dj/dj/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@
8989
AUTH_PASSWORD_VALIDATORS = [
9090
{
9191
'NAME': (
92-
'django.contrib.auth.password_validation'
93-
'.UserAttributeSimilarityValidator'
92+
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'
9493
),
9594
},
9695
{

falcon/routing/compiled.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ def _validate_template_segment(self, segment: str, used_names: Set[str]) -> None
405405

406406
if name in used_names:
407407
msg_template = (
408-
'Field names may not be duplicated '
409-
'("{0}" was used more than once)'
408+
'Field names may not be duplicated ("{0}" was used more than once)'
410409
)
411410
msg = msg_template.format(name)
412411
raise UnacceptableRouteError(msg)

falcon/stream.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ def eof(self) -> bool:
170170
@property
171171
# NOTE(caselit): Deprecated long ago. Warns since 4.0.
172172
@deprecated(
173-
'Use `eof` instead. '
174-
'(This compatibility alias will be removed in Falcon 5.0.)',
173+
'Use `eof` instead. (This compatibility alias will be removed in Falcon 5.0.)',
175174
is_property=True,
176175
)
177176
def is_exhausted(self) -> bool:

falcon/util/mediatypes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ class _MediaRange:
146146
_NOT_MATCHING = (-1, -1, -1, -1, 0.0)
147147

148148
_Q_VALUE_ERROR_MESSAGE = (
149-
'If provided, the q parameter must be a real number '
150-
'in the range 0 through 1.'
149+
'If provided, the q parameter must be a real number in the range 0 through 1.'
151150
)
152151

153152
@classmethod

tests/asgi/test_boundedstream_asgi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ async def test_iterate_streaming_request():
179179

180180
async def receive():
181181
event = next(events)
182-
assert (
183-
event['type'] != 'http.disconnect'
184-
), 'would hang until the client times out'
182+
assert event['type'] != 'http.disconnect', (
183+
'would hang until the client times out'
184+
)
185185
return event
186186

187187
s = asgi.BoundedStream(receive)

tests/test_buffered_reader.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,7 @@ def test_exhaust(shorter_stream):
289289

290290
def test_readline():
291291
source = (
292-
b'Hello, world!\n'
293-
b'A line.\n'
294-
b'\n'
295-
b'A longer line... \n' + b'SPAM ' * 7 + b'\n' + b'\n'
292+
b'Hello, world!\nA line.\n\nA longer line... \n' + b'SPAM ' * 7 + b'\n' + b'\n'
296293
)
297294

298295
stream = BufferedReader(io.BytesIO(source).read, len(source))

tests/test_headers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@ def on_post(self, req, resp):
218218
' Max-Age=600; path=/'
219219
)
220220
resp.append_header('Set-Cookie', c1)
221-
c2 = (
222-
'partner_source=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT;'
223-
' Max-Age=0'
224-
)
221+
c2 = 'partner_source=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0'
225222
resp.append_header('seT-cookie', c2)
226223

227224

tests/test_middleware.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ def test_log_get_request(self, independent_middleware, asgi, util):
237237
assert 'start_time' in context
238238
assert 'mid_time' in context
239239
assert 'end_time' in context
240-
assert (
241-
context['mid_time'] >= context['start_time']
242-
), 'process_resource not executed after request'
243-
assert (
244-
context['end_time'] >= context['start_time']
245-
), 'process_response not executed after request'
240+
assert context['mid_time'] >= context['start_time'], (
241+
'process_resource not executed after request'
242+
)
243+
assert context['end_time'] >= context['start_time'], (
244+
'process_response not executed after request'
245+
)
246246

247247
assert context['req_succeeded']
248248

@@ -307,12 +307,12 @@ def test_generate_trans_id_and_time_with_request(
307307
assert 'start_time' in context
308308
assert 'mid_time' in context
309309
assert 'end_time' in context
310-
assert (
311-
context['mid_time'] >= context['start_time']
312-
), 'process_resource not executed after request'
313-
assert (
314-
context['end_time'] >= context['start_time']
315-
), 'process_response not executed after request'
310+
assert context['mid_time'] >= context['start_time'], (
311+
'process_resource not executed after request'
312+
)
313+
assert context['end_time'] >= context['start_time'], (
314+
'process_response not executed after request'
315+
)
316316

317317
def test_legacy_middleware_called_with_correct_args(self, asgi, util):
318318
global context

0 commit comments

Comments
 (0)