Skip to content

Commit 80f4315

Browse files
Bump the minor-patch group with 2 updates (#3482)
* Bump the minor-patch group with 2 updates Bumps the minor-patch group with 2 updates: [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) and [ruff](https://github.com/astral-sh/ruff). Updates `sqlalchemy` from 2.0.36 to 2.0.37 - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases) - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst) - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits) Updates `ruff` from 0.8.6 to 0.9.1 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.8.6...0.9.1) --- updated-dependencies: - dependency-name: sqlalchemy dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-patch - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-patch ... Signed-off-by: dependabot[bot] <[email protected]> * make format --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mathieu Leplatre <[email protected]>
1 parent 2553099 commit 80f4315

25 files changed

+51
-58
lines changed

constraints.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ rpds-py==0.17.1
163163
# via
164164
# jsonschema
165165
# referencing
166-
ruff==0.8.6
166+
ruff==0.9.1
167167
# via -r constraints.in
168168
sentry-sdk==2.8.0
169169
# via -r constraints.in

docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ webtest==3.0.2
99
cornice==6.1.0
1010
pyramid==2.0.2
1111
python-rapidjson==1.20
12-
SQLAlchemy==2.0.36
12+
SQLAlchemy==2.0.37

kinto/__main__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ def main(args=None):
161161
if not backend:
162162
while True:
163163
prompt = (
164-
"Select the backend you would like to use: "
165-
"(1 - postgresql, default - memory) "
164+
"Select the backend you would like to use: (1 - postgresql, default - memory) "
166165
)
167166
answer = input(prompt).strip()
168167
try:

kinto/core/__init__.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@
110110
"trailing_slash_redirect_ttl_seconds": 3600,
111111
"multiauth.groupfinder": "kinto.core.authorization.groupfinder",
112112
"multiauth.policies": "",
113-
"multiauth.policy.basicauth.use": (
114-
"kinto.core.authentication." "BasicAuthAuthenticationPolicy"
115-
),
116-
"multiauth.authorization_policy": ("kinto.core.authorization." "AuthorizationPolicy"),
113+
"multiauth.policy.basicauth.use": "kinto.core.authentication.BasicAuthAuthenticationPolicy",
114+
"multiauth.authorization_policy": "kinto.core.authorization.AuthorizationPolicy",
117115
}
118116

119117

kinto/core/initialization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def setup_deprecation(config):
213213

214214
def _end_of_life_tween_factory(handler, registry):
215215
"""Pyramid tween to handle service end of life."""
216-
deprecation_msg = "The service you are trying to connect no longer exists" " at this location."
216+
deprecation_msg = "The service you are trying to connect no longer exists at this location."
217217

218218
def eos_tween(request):
219219
eos_date = registry.settings["eos"]

kinto/core/permission/postgresql/__init__.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def get_authorized_principals(self, bound_permissions):
246246

247247
query = f"""
248248
WITH required_perms AS (
249-
VALUES {','.join(perm_values)}
249+
VALUES {",".join(perm_values)}
250250
)
251251
SELECT principal
252252
FROM required_perms JOIN access_control_entries
@@ -292,14 +292,14 @@ def get_accessible_objects(self, principals, bound_permissions=None, with_childr
292292
object_id_condition = "object_id LIKE pattern"
293293
else:
294294
object_id_condition = (
295-
"object_id LIKE pattern " "AND object_id NOT LIKE pattern || '/%'"
295+
"object_id LIKE pattern AND object_id NOT LIKE pattern || '/%'"
296296
)
297297
query = f"""
298298
WITH required_perms AS (
299-
VALUES {','.join(perm_values)}
299+
VALUES {",".join(perm_values)}
300300
),
301301
user_principals AS (
302-
VALUES {','.join(principals_values)}
302+
VALUES {",".join(principals_values)}
303303
),
304304
potential_objects AS (
305305
SELECT object_id, permission, required_perms.column1 AS pattern
@@ -341,15 +341,15 @@ def check_permission(self, principals, bound_permissions):
341341

342342
query = f"""
343343
WITH required_perms AS (
344-
VALUES {','.join(perms_values)}
344+
VALUES {",".join(perms_values)}
345345
),
346346
allowed_principals AS (
347347
SELECT principal
348348
FROM required_perms JOIN access_control_entries
349349
ON (object_id = column1 AND permission = column2)
350350
),
351351
required_principals AS (
352-
VALUES {','.join(principals_values)}
352+
VALUES {",".join(principals_values)}
353353
)
354354
SELECT COUNT(*) AS matched
355355
FROM required_principals JOIN allowed_principals
@@ -412,7 +412,7 @@ def replace_object_permissions(self, object_id, permissions):
412412
if not new_aces:
413413
query = f"""
414414
WITH specified_perms AS (
415-
VALUES {','.join(specified_perms)}
415+
VALUES {",".join(specified_perms)}
416416
)
417417
DELETE FROM access_control_entries
418418
USING specified_perms
@@ -422,7 +422,7 @@ def replace_object_permissions(self, object_id, permissions):
422422
else:
423423
query = f"""
424424
WITH specified_perms AS (
425-
VALUES {','.join(specified_perms)}
425+
VALUES {",".join(specified_perms)}
426426
),
427427
delete_specified AS (
428428
DELETE FROM access_control_entries
@@ -435,7 +435,7 @@ def replace_object_permissions(self, object_id, permissions):
435435
UNION SELECT :object_id
436436
),
437437
new_aces AS (
438-
VALUES {','.join(new_aces)}
438+
VALUES {",".join(new_aces)}
439439
)
440440
INSERT INTO access_control_entries(object_id, permission, principal)
441441
SELECT DISTINCT d.object_id, n.column1, n.column2

kinto/core/resource/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ def is_valid_timestamp(value):
10861086
operator = COMPARISON.GT
10871087
else:
10881088
if param == "_to":
1089-
message = "_to is now deprecated, " "you should use _before instead"
1089+
message = "_to is now deprecated, you should use _before instead"
10901090
url = (
10911091
"https://kinto.readthedocs.io/en/2.4.0/api/"
10921092
"resource.html#list-of-available-url-"

kinto/core/resource/schema.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ class URL(URL):
3737

3838
def __init__(self, *args, **kwargs):
3939
message = (
40-
"`kinto.core.resource.schema.URL` is deprecated, "
41-
"use `kinto.core.schema.URL` instead."
40+
"`kinto.core.resource.schema.URL` is deprecated, use `kinto.core.schema.URL` instead."
4241
)
4342
warnings.warn(message, DeprecationWarning)
4443
super().__init__(*args, **kwargs)

kinto/core/storage/postgresql/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ def create_from_config(config, prefix="", with_transaction=True):
9595
url = filtered_settings[prefix + "url"]
9696
existing_client = _CLIENTS[transaction_per_request].get(url)
9797
if existing_client:
98-
msg = "Reuse existing PostgreSQL connection. " f"Parameters {prefix}* will be ignored."
98+
msg = f"Reuse existing PostgreSQL connection. Parameters {prefix}* will be ignored."
9999
warnings.warn(msg)
100100
return existing_client
101101

102102
# Initialize SQLAlchemy engine from filtered_settings.
103103
poolclass_key = prefix + "poolclass"
104104
filtered_settings.setdefault(
105-
poolclass_key, ("kinto.core.storage.postgresql." "pool.QueuePoolWithMaxBacklog")
105+
poolclass_key, ("kinto.core.storage.postgresql.pool.QueuePoolWithMaxBacklog")
106106
)
107107
filtered_settings[poolclass_key] = config.maybe_dotted(filtered_settings[poolclass_key])
108108
engine = sqlalchemy.engine_from_config(filtered_settings, prefix=prefix, url=url)

kinto/core/views/errors.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def page_not_found(response, request):
5353

5454
if not request.path.startswith(f"/{request.registry.route_prefix}"):
5555
errno = ERRORS.VERSION_NOT_AVAILABLE
56-
error_msg = "The requested API version is not available " "on this server."
56+
error_msg = "The requested API version is not available on this server."
5757
elif trailing_slash_redirection_enabled:
5858
redirect = None
5959

@@ -80,8 +80,7 @@ def page_not_found(response, request):
8080
def service_unavailable(response, request):
8181
if response.content_type != "application/json":
8282
error_msg = (
83-
"Service temporary unavailable "
84-
"due to overloading or maintenance, please retry later."
83+
"Service temporary unavailable due to overloading or maintenance, please retry later."
8584
)
8685
response = http_error(response, errno=ERRORS.BACKEND, message=error_msg)
8786

kinto/plugins/accounts/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def includeme(config):
8383
if "basicauth" in auth_policies and policy in auth_policies:
8484
if auth_policies.index("basicauth") < auth_policies.index(policy):
8585
error_msg = (
86-
"'basicauth' should not be mentioned before '%s' "
87-
"in 'multiauth.policies' setting."
86+
"'basicauth' should not be mentioned before '%s' in 'multiauth.policies' setting."
8887
) % policy
8988
raise ConfigurationError(error_msg)
9089

kinto/plugins/default_bucket/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,5 @@ def includeme(config):
187187
"default_bucket",
188188
description="The default bucket is an alias for a personal"
189189
" bucket where collections are created implicitly.",
190-
url="https://kinto.readthedocs.io/en/latest/api/1.x/"
191-
"buckets.html#personal-bucket-default",
190+
url="https://kinto.readthedocs.io/en/latest/api/1.x/buckets.html#personal-bucket-default",
192191
)

kinto/plugins/flush.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def flush_post(request):
2222
def includeme(config):
2323
config.add_api_capability(
2424
"flush_endpoint",
25-
description="The __flush__ endpoint can be used to remove " "all data from all backends.",
25+
description="The __flush__ endpoint can be used to remove all data from all backends.",
2626
url="https://kinto.readthedocs.io/en/latest/api/1.x/flush.html",
2727
)
2828
config.add_cornice_service(flush)

kinto/plugins/quotas/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
def includeme(config):
88
config.add_api_capability(
99
"quotas",
10-
description="Quotas Management on buckets " "and collections.",
10+
description="Quotas Management on buckets and collections.",
1111
url="https://kinto.readthedocs.io",
1212
)
1313

tests/core/resource/test_events.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_events_have_custom_representation(self):
9797
self.app.post_json(self.plural_url, self.body, headers=self.headers, status=201)
9898
self.assertEqual(
9999
repr(self.events[0]),
100-
"<ResourceChanged action=create " "uri={}>".format(self.plural_url),
100+
"<ResourceChanged action=create uri={}>".format(self.plural_url),
101101
)
102102

103103
def test_post_sends_create_action(self):

tests/core/resource/test_sync.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_filter_with__to_return_an_alert_header(self):
4141
json.loads(alert),
4242
{
4343
"code": "soft-eol",
44-
"message": ("_to is now deprecated, " "you should use _before instead"),
44+
"message": ("_to is now deprecated, you should use _before instead"),
4545
"url": (
4646
"https://kinto.readthedocs.io/en/2.4.0/api/resource"
4747
".html#list-of-available-url-parameters"

tests/core/support.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
# This is the principal a connected user should have (in the tests).
15-
USER_PRINCIPAL = "basicauth:8a931a10fc88ab2f6d1cc02a07d3a81b5d4768f6f13e85c5" "d8d4180419acb1b4"
15+
USER_PRINCIPAL = "basicauth:8a931a10fc88ab2f6d1cc02a07d3a81b5d4768f6f13e85c5d8d4180419acb1b4"
1616

1717

1818
class BaseWebTest(testing.BaseWebTest):

tests/core/test_authentication.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_basic_auth_is_declined_if_disabled_in_settings(self):
2525
{
2626
"multiauth.policies": "dummy",
2727
"multiauth.policy.dummy.use": (
28-
"pyramid.authentication." "RepozeWho1AuthenticationPolicy"
28+
"pyramid.authentication.RepozeWho1AuthenticationPolicy"
2929
),
3030
}
3131
)
@@ -42,7 +42,7 @@ def test_policy_name_is_used(self, basicAuth):
4242
{
4343
"multiauth.policies": "dummy",
4444
"multiauth.policy.dummy.use": (
45-
"kinto.core.authentication." "BasicAuthAuthenticationPolicy"
45+
"kinto.core.authentication.BasicAuthAuthenticationPolicy"
4646
),
4747
}
4848
)
@@ -58,7 +58,7 @@ def test_views_are_forbidden_if_unknown_auth_method(self):
5858
app.get(self.plural_url, headers=self.headers, status=401)
5959

6060
def test_principals_are_fetched_from_permission_backend(self):
61-
patch = mock.patch(("tests.core.support." "AllowAuthorizationPolicy.permits"))
61+
patch = mock.patch(("tests.core.support.AllowAuthorizationPolicy.permits"))
6262
self.addCleanup(patch.stop)
6363
mocked = patch.start()
6464

tests/core/test_scripts.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def test_migrate_in_read_only_display_an_error(self):
2828
self.registry.settings = {"readonly": "true"}
2929
scripts.migrate({"registry": self.registry})
3030
mocked.error.assert_any_call(
31-
"Cannot migrate the storage backend " "while in readonly mode."
31+
"Cannot migrate the storage backend while in readonly mode."
3232
)
3333
mocked.error.assert_any_call(
34-
"Cannot migrate the permission " "backend while in readonly mode."
34+
"Cannot migrate the permission backend while in readonly mode."
3535
)
3636

3737
def test_migrate_in_dry_run_mode(self):

tests/core/test_storage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ def test_pool_object_is_shared_among_backend_instances(self):
219219
def test_warns_if_configured_pool_size_differs_for_same_backend_type(self):
220220
self.backend.load_from_config(self._get_config())
221221
settings = {**self.settings, "storage_pool_size": 1}
222-
msg = "Reuse existing PostgreSQL connection. Parameters storage_* " "will be ignored."
223-
with mock.patch("kinto.core.storage.postgresql.client." "warnings.warn") as mocked:
222+
msg = "Reuse existing PostgreSQL connection. Parameters storage_* will be ignored."
223+
with mock.patch("kinto.core.storage.postgresql.client.warnings.warn") as mocked:
224224
self.backend.load_from_config(self._get_config(settings=settings))
225225
mocked.assert_any_call(msg)
226226

tests/plugins/test_accounts.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get_app_settings(cls, extras=None):
3232
# XXX: this should be a default setting.
3333
extras.setdefault(
3434
"multiauth.policy.account.use",
35-
"kinto.plugins.accounts.authentication." "AccountsAuthenticationPolicy",
35+
"kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy",
3636
)
3737
extras.setdefault("account_cache_ttl_seconds", "30")
3838
return super().get_app_settings(extras)
@@ -865,15 +865,15 @@ def test_create_user_in_read_only_displays_an_error(self):
865865
self.registry.settings["readonly"] = "true"
866866
code = scripts.create_user({"registry": self.registry})
867867
assert code == 51
868-
mocked.error.assert_called_once_with("Cannot create a user with " "a readonly server.")
868+
mocked.error.assert_called_once_with("Cannot create a user with a readonly server.")
869869

870870
def test_create_user_when_not_included_displays_an_error(self):
871871
with mock.patch("kinto.plugins.accounts.scripts.logger") as mocked:
872872
self.registry.settings["includes"] = ""
873873
code = scripts.create_user({"registry": self.registry})
874874
assert code == 52
875875
mocked.error.assert_called_once_with(
876-
"Cannot create a user when the accounts " "plugin is not installed."
876+
"Cannot create a user when the accounts plugin is not installed."
877877
)
878878

879879
def test_create_user_with_an_invalid_username_and_password_confirmation_recovers(self):

tests/plugins/test_history.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ class DefaultBucketTest(HistoryWebTest):
479479
@classmethod
480480
def get_app_settings(cls, extras=None):
481481
settings = super().get_app_settings(extras)
482-
settings["includes"] = "kinto.plugins.default_bucket " "kinto.plugins.history"
482+
settings["includes"] = "kinto.plugins.default_bucket kinto.plugins.history"
483483
return settings
484484

485485
def setUp(self):
@@ -539,13 +539,13 @@ def setUp(self):
539539
self.julia_headers = get_user_headers("julia")
540540

541541
self.alice_principal = (
542-
"basicauth:d5b0026601f1b251974e09548d44155e16" "812e3c64ff7ae053fe3542e2ca1570"
542+
"basicauth:d5b0026601f1b251974e09548d44155e16812e3c64ff7ae053fe3542e2ca1570"
543543
)
544544
self.bob_principal = (
545-
"basicauth:c031ced27503f788b102ca54269a062ec737" "94bb075154c74a0d4311e74ca8b6"
545+
"basicauth:c031ced27503f788b102ca54269a062ec73794bb075154c74a0d4311e74ca8b6"
546546
)
547547
self.julia_principal = (
548-
"basicauth:d8bab8d9fe0510fcaf9b5ad5942c027fc" "2fdf80b6dc59cc3c48d12a2fcb18f1c"
548+
"basicauth:d8bab8d9fe0510fcaf9b5ad5942c027fc2fdf80b6dc59cc3c48d12a2fcb18f1c"
549549
)
550550

551551
bucket = {"permissions": {"read": [self.alice_principal]}}
@@ -638,7 +638,7 @@ class ExcludeResourcesTest(HistoryWebTest):
638638
def get_app_settings(cls, extras=None):
639639
settings = super().get_app_settings(extras)
640640
settings["history.exclude_resources"] = (
641-
"/buckets/a " "/buckets/b/collections/a " "/buckets/b/groups/a"
641+
"/buckets/a /buckets/b/collections/a /buckets/b/groups/a"
642642
)
643643
return settings
644644

tests/plugins/test_quotas.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1106,13 +1106,13 @@ def paginated_mock(*args, **kwargs):
11061106
)
11071107

11081108
mocked_logger.info.assert_any_call(
1109-
"Bucket bucket-1, collection collection-1. " "Final size: 1 records, 78 bytes."
1109+
"Bucket bucket-1, collection collection-1. Final size: 1 records, 78 bytes."
11101110
)
11111111
mocked_logger.info.assert_any_call(
1112-
"Bucket bucket-1, collection collection-2. " "Final size: 1 records, 79 bytes."
1112+
"Bucket bucket-1, collection collection-2. Final size: 1 records, 79 bytes."
11131113
)
11141114
mocked_logger.info.assert_any_call(
1115-
"Bucket bucket-1. Final size: " "2 collections, 2 records, 193 bytes."
1115+
"Bucket bucket-1. Final size: 2 collections, 2 records, 193 bytes."
11161116
)
11171117

11181118
def test_rebuild_quotas_doesnt_update_if_dry_run(self):
@@ -1135,8 +1135,8 @@ def paginated_mock(*args, **kwargs):
11351135
assert not self.storage.update.called
11361136

11371137
mocked.info.assert_any_call(
1138-
"Bucket bucket-1, collection collection-1. " "Final size: 1 records, 78 bytes."
1138+
"Bucket bucket-1, collection collection-1. Final size: 1 records, 78 bytes."
11391139
)
11401140
mocked.info.assert_any_call(
1141-
"Bucket bucket-1. Final size: 1 collections, " "1 records, 114 bytes."
1141+
"Bucket bucket-1. Final size: 1 collections, 1 records, 114 bytes."
11421142
)

tests/support.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
MINIMALIST_COLLECTION = {}
88
MINIMALIST_GROUP = {"data": dict(members=["fxa:user"])}
99
MINIMALIST_RECORD = {"data": dict(name="Hulled Barley", type="Whole Grain")}
10-
USER_PRINCIPAL = "basicauth:8a931a10fc88ab2f6d1cc02a07d3a81b5d4768f6f13e85c5" "d8d4180419acb1b4"
10+
USER_PRINCIPAL = "basicauth:8a931a10fc88ab2f6d1cc02a07d3a81b5d4768f6f13e85c5d8d4180419acb1b4"
1111

1212

1313
class BaseWebTest(testing.BaseWebTest):

0 commit comments

Comments
 (0)