From 0619c2bbd266a1e643bfe65a675afba8871aeb95 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Mon, 27 Nov 2023 01:29:46 +0000 Subject: Move media retention tests out of rest tests (#16684) * Move media retention tests out of rest tests AFAICS this doesn't make any HTTP requests and so it ought not to belong in `tests.rest`. * Changelog --- changelog.d/16684.misc | 1 + tests/media/test_media_retention.py | 294 +++++++++++++++++++++++++++++++ tests/rest/media/test_media_retention.py | 294 ------------------------------- 3 files changed, 295 insertions(+), 294 deletions(-) create mode 100644 changelog.d/16684.misc create mode 100644 tests/media/test_media_retention.py delete mode 100644 tests/rest/media/test_media_retention.py diff --git a/changelog.d/16684.misc b/changelog.d/16684.misc new file mode 100644 index 0000000000..6fb55c08a5 --- /dev/null +++ b/changelog.d/16684.misc @@ -0,0 +1 @@ +Reoranganise test files. diff --git a/tests/media/test_media_retention.py b/tests/media/test_media_retention.py new file mode 100644 index 0000000000..27a663a23b --- /dev/null +++ b/tests/media/test_media_retention.py @@ -0,0 +1,294 @@ +# Copyright 2022 The Matrix.org Foundation C.I.C. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import io +from typing import Iterable, Optional + +from matrix_common.types.mxc_uri import MXCUri + +from twisted.test.proto_helpers import MemoryReactor + +from synapse.rest import admin +from synapse.rest.client import login, register, room +from synapse.server import HomeServer +from synapse.types import UserID +from synapse.util import Clock + +from tests import unittest +from tests.unittest import override_config +from tests.utils import MockClock + + +class MediaRetentionTestCase(unittest.HomeserverTestCase): + ONE_DAY_IN_MS = 24 * 60 * 60 * 1000 + THIRTY_DAYS_IN_MS = 30 * ONE_DAY_IN_MS + + servlets = [ + room.register_servlets, + login.register_servlets, + register.register_servlets, + admin.register_servlets_for_client_rest_resource, + ] + + def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer: + # We need to be able to test advancing time in the homeserver, so we + # replace the test homeserver's default clock with a MockClock, which + # supports advancing time. + return self.setup_test_homeserver(clock=MockClock()) + + def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None: + self.remote_server_name = "remote.homeserver" + self.store = hs.get_datastores().main + + # Create a user to upload media with + test_user_id = self.register_user("alice", "password") + + # Inject media (recently accessed, old access, never accessed, old access + # quarantined media) into both the local store and the remote cache, plus + # one additional local media that is marked as protected from quarantine. + media_repository = hs.get_media_repository() + test_media_content = b"example string" + + def _create_media_and_set_attributes( + last_accessed_ms: Optional[int], + is_quarantined: Optional[bool] = False, + is_protected: Optional[bool] = False, + ) -> MXCUri: + # "Upload" some media to the local media store + mxc_uri: MXCUri = self.get_success( + media_repository.create_content( + media_type="text/plain", + upload_name=None, + content=io.BytesIO(test_media_content), + content_length=len(test_media_content), + auth_user=UserID.from_string(test_user_id), + ) + ) + + # Set the last recently accessed time for this media + if last_accessed_ms is not None: + self.get_success( + self.store.update_cached_last_access_time( + local_media=(mxc_uri.media_id,), + remote_media=(), + time_ms=last_accessed_ms, + ) + ) + + if is_quarantined: + # Mark this media as quarantined + self.get_success( + self.store.quarantine_media_by_id( + server_name=self.hs.config.server.server_name, + media_id=mxc_uri.media_id, + quarantined_by="@theadmin:test", + ) + ) + + if is_protected: + # Mark this media as protected from quarantine + self.get_success( + self.store.mark_local_media_as_safe( + media_id=mxc_uri.media_id, + safe=True, + ) + ) + + return mxc_uri + + def _cache_remote_media_and_set_attributes( + media_id: str, + last_accessed_ms: Optional[int], + is_quarantined: Optional[bool] = False, + ) -> MXCUri: + # Pretend to cache some remote media + self.get_success( + self.store.store_cached_remote_media( + origin=self.remote_server_name, + media_id=media_id, + media_type="text/plain", + media_length=1, + time_now_ms=clock.time_msec(), + upload_name="testfile.txt", + filesystem_id="abcdefg12345", + ) + ) + + # Set the last recently accessed time for this media + if last_accessed_ms is not None: + self.get_success( + hs.get_datastores().main.update_cached_last_access_time( + local_media=(), + remote_media=((self.remote_server_name, media_id),), + time_ms=last_accessed_ms, + ) + ) + + if is_quarantined: + # Mark this media as quarantined + self.get_success( + self.store.quarantine_media_by_id( + server_name=self.remote_server_name, + media_id=media_id, + quarantined_by="@theadmin:test", + ) + ) + + return MXCUri(self.remote_server_name, media_id) + + # Start with the local media store + self.local_recently_accessed_media = _create_media_and_set_attributes( + last_accessed_ms=self.THIRTY_DAYS_IN_MS, + ) + self.local_not_recently_accessed_media = _create_media_and_set_attributes( + last_accessed_ms=self.ONE_DAY_IN_MS, + ) + self.local_not_recently_accessed_quarantined_media = ( + _create_media_and_set_attributes( + last_accessed_ms=self.ONE_DAY_IN_MS, + is_quarantined=True, + ) + ) + self.local_not_recently_accessed_protected_media = ( + _create_media_and_set_attributes( + last_accessed_ms=self.ONE_DAY_IN_MS, + is_protected=True, + ) + ) + self.local_never_accessed_media = _create_media_and_set_attributes( + last_accessed_ms=None, + ) + + # And now the remote media store + self.remote_recently_accessed_media = _cache_remote_media_and_set_attributes( + media_id="a", + last_accessed_ms=self.THIRTY_DAYS_IN_MS, + ) + self.remote_not_recently_accessed_media = ( + _cache_remote_media_and_set_attributes( + media_id="b", + last_accessed_ms=self.ONE_DAY_IN_MS, + ) + ) + self.remote_not_recently_accessed_quarantined_media = ( + _cache_remote_media_and_set_attributes( + media_id="c", + last_accessed_ms=self.ONE_DAY_IN_MS, + is_quarantined=True, + ) + ) + # Remote media will always have a "last accessed" attribute, as it would not + # be fetched from the remote homeserver unless instigated by a user. + + @override_config( + { + "media_retention": { + # Enable retention for local media + "local_media_lifetime": "30d" + # Cached remote media should not be purged + } + } + ) + def test_local_media_retention(self) -> None: + """ + Tests that local media that have not been accessed recently is purged, while + cached remote media is unaffected. + """ + # Advance 31 days (in seconds) + self.reactor.advance(31 * 24 * 60 * 60) + + # Check that media has been correctly purged. + # Local media accessed <30 days ago should still exist. + # Remote media should be unaffected. + self._assert_if_mxc_uris_purged( + purged=[ + self.local_not_recently_accessed_media, + self.local_never_accessed_media, + ], + not_purged=[ + self.local_recently_accessed_media, + self.local_not_recently_accessed_quarantined_media, + self.local_not_recently_accessed_protected_media, + self.remote_recently_accessed_media, + self.remote_not_recently_accessed_media, + self.remote_not_recently_accessed_quarantined_media, + ], + ) + + @override_config( + { + "media_retention": { + # Enable retention for cached remote media + "remote_media_lifetime": "30d" + # Local media should not be purged + } + } + ) + def test_remote_media_cache_retention(self) -> None: + """ + Tests that entries from the remote media cache that have not been accessed + recently is purged, while local media is unaffected. + """ + # Advance 31 days (in seconds) + self.reactor.advance(31 * 24 * 60 * 60) + + # Check that media has been correctly purged. + # Local media should be unaffected. + # Remote media accessed <30 days ago should still exist. + self._assert_if_mxc_uris_purged( + purged=[ + self.remote_not_recently_accessed_media, + ], + not_purged=[ + self.remote_recently_accessed_media, + self.local_recently_accessed_media, + self.local_not_recently_accessed_media, + self.local_not_recently_accessed_quarantined_media, + self.local_not_recently_accessed_protected_media, + self.remote_not_recently_accessed_quarantined_media, + self.local_never_accessed_media, + ], + ) + + def _assert_if_mxc_uris_purged( + self, purged: Iterable[MXCUri], not_purged: Iterable[MXCUri] + ) -> None: + def _assert_mxc_uri_purge_state(mxc_uri: MXCUri, expect_purged: bool) -> None: + """Given an MXC URI, assert whether it has been purged or not.""" + if mxc_uri.server_name == self.hs.config.server.server_name: + found_media = bool( + self.get_success(self.store.get_local_media(mxc_uri.media_id)) + ) + else: + found_media = bool( + self.get_success( + self.store.get_cached_remote_media( + mxc_uri.server_name, mxc_uri.media_id + ) + ) + ) + + if expect_purged: + self.assertFalse(found_media, msg=f"{mxc_uri} unexpectedly not purged") + else: + self.assertTrue( + found_media, + msg=f"{mxc_uri} unexpectedly purged", + ) + + # Assert that the given MXC URIs have either been correctly purged or not. + for mxc_uri in purged: + _assert_mxc_uri_purge_state(mxc_uri, expect_purged=True) + for mxc_uri in not_purged: + _assert_mxc_uri_purge_state(mxc_uri, expect_purged=False) diff --git a/tests/rest/media/test_media_retention.py b/tests/rest/media/test_media_retention.py deleted file mode 100644 index 27a663a23b..0000000000 --- a/tests/rest/media/test_media_retention.py +++ /dev/null @@ -1,294 +0,0 @@ -# Copyright 2022 The Matrix.org Foundation C.I.C. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import io -from typing import Iterable, Optional - -from matrix_common.types.mxc_uri import MXCUri - -from twisted.test.proto_helpers import MemoryReactor - -from synapse.rest import admin -from synapse.rest.client import login, register, room -from synapse.server import HomeServer -from synapse.types import UserID -from synapse.util import Clock - -from tests import unittest -from tests.unittest import override_config -from tests.utils import MockClock - - -class MediaRetentionTestCase(unittest.HomeserverTestCase): - ONE_DAY_IN_MS = 24 * 60 * 60 * 1000 - THIRTY_DAYS_IN_MS = 30 * ONE_DAY_IN_MS - - servlets = [ - room.register_servlets, - login.register_servlets, - register.register_servlets, - admin.register_servlets_for_client_rest_resource, - ] - - def make_homeserver(self, reactor: MemoryReactor, clock: Clock) -> HomeServer: - # We need to be able to test advancing time in the homeserver, so we - # replace the test homeserver's default clock with a MockClock, which - # supports advancing time. - return self.setup_test_homeserver(clock=MockClock()) - - def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None: - self.remote_server_name = "remote.homeserver" - self.store = hs.get_datastores().main - - # Create a user to upload media with - test_user_id = self.register_user("alice", "password") - - # Inject media (recently accessed, old access, never accessed, old access - # quarantined media) into both the local store and the remote cache, plus - # one additional local media that is marked as protected from quarantine. - media_repository = hs.get_media_repository() - test_media_content = b"example string" - - def _create_media_and_set_attributes( - last_accessed_ms: Optional[int], - is_quarantined: Optional[bool] = False, - is_protected: Optional[bool] = False, - ) -> MXCUri: - # "Upload" some media to the local media store - mxc_uri: MXCUri = self.get_success( - media_repository.create_content( - media_type="text/plain", - upload_name=None, - content=io.BytesIO(test_media_content), - content_length=len(test_media_content), - auth_user=UserID.from_string(test_user_id), - ) - ) - - # Set the last recently accessed time for this media - if last_accessed_ms is not None: - self.get_success( - self.store.update_cached_last_access_time( - local_media=(mxc_uri.media_id,), - remote_media=(), - time_ms=last_accessed_ms, - ) - ) - - if is_quarantined: - # Mark this media as quarantined - self.get_success( - self.store.quarantine_media_by_id( - server_name=self.hs.config.server.server_name, - media_id=mxc_uri.media_id, - quarantined_by="@theadmin:test", - ) - ) - - if is_protected: - # Mark this media as protected from quarantine - self.get_success( - self.store.mark_local_media_as_safe( - media_id=mxc_uri.media_id, - safe=True, - ) - ) - - return mxc_uri - - def _cache_remote_media_and_set_attributes( - media_id: str, - last_accessed_ms: Optional[int], - is_quarantined: Optional[bool] = False, - ) -> MXCUri: - # Pretend to cache some remote media - self.get_success( - self.store.store_cached_remote_media( - origin=self.remote_server_name, - media_id=media_id, - media_type="text/plain", - media_length=1, - time_now_ms=clock.time_msec(), - upload_name="testfile.txt", - filesystem_id="abcdefg12345", - ) - ) - - # Set the last recently accessed time for this media - if last_accessed_ms is not None: - self.get_success( - hs.get_datastores().main.update_cached_last_access_time( - local_media=(), - remote_media=((self.remote_server_name, media_id),), - time_ms=last_accessed_ms, - ) - ) - - if is_quarantined: - # Mark this media as quarantined - self.get_success( - self.store.quarantine_media_by_id( - server_name=self.remote_server_name, - media_id=media_id, - quarantined_by="@theadmin:test", - ) - ) - - return MXCUri(self.remote_server_name, media_id) - - # Start with the local media store - self.local_recently_accessed_media = _create_media_and_set_attributes( - last_accessed_ms=self.THIRTY_DAYS_IN_MS, - ) - self.local_not_recently_accessed_media = _create_media_and_set_attributes( - last_accessed_ms=self.ONE_DAY_IN_MS, - ) - self.local_not_recently_accessed_quarantined_media = ( - _create_media_and_set_attributes( - last_accessed_ms=self.ONE_DAY_IN_MS, - is_quarantined=True, - ) - ) - self.local_not_recently_accessed_protected_media = ( - _create_media_and_set_attributes( - last_accessed_ms=self.ONE_DAY_IN_MS, - is_protected=True, - ) - ) - self.local_never_accessed_media = _create_media_and_set_attributes( - last_accessed_ms=None, - ) - - # And now the remote media store - self.remote_recently_accessed_media = _cache_remote_media_and_set_attributes( - media_id="a", - last_accessed_ms=self.THIRTY_DAYS_IN_MS, - ) - self.remote_not_recently_accessed_media = ( - _cache_remote_media_and_set_attributes( - media_id="b", - last_accessed_ms=self.ONE_DAY_IN_MS, - ) - ) - self.remote_not_recently_accessed_quarantined_media = ( - _cache_remote_media_and_set_attributes( - media_id="c", - last_accessed_ms=self.ONE_DAY_IN_MS, - is_quarantined=True, - ) - ) - # Remote media will always have a "last accessed" attribute, as it would not - # be fetched from the remote homeserver unless instigated by a user. - - @override_config( - { - "media_retention": { - # Enable retention for local media - "local_media_lifetime": "30d" - # Cached remote media should not be purged - } - } - ) - def test_local_media_retention(self) -> None: - """ - Tests that local media that have not been accessed recently is purged, while - cached remote media is unaffected. - """ - # Advance 31 days (in seconds) - self.reactor.advance(31 * 24 * 60 * 60) - - # Check that media has been correctly purged. - # Local media accessed <30 days ago should still exist. - # Remote media should be unaffected. - self._assert_if_mxc_uris_purged( - purged=[ - self.local_not_recently_accessed_media, - self.local_never_accessed_media, - ], - not_purged=[ - self.local_recently_accessed_media, - self.local_not_recently_accessed_quarantined_media, - self.local_not_recently_accessed_protected_media, - self.remote_recently_accessed_media, - self.remote_not_recently_accessed_media, - self.remote_not_recently_accessed_quarantined_media, - ], - ) - - @override_config( - { - "media_retention": { - # Enable retention for cached remote media - "remote_media_lifetime": "30d" - # Local media should not be purged - } - } - ) - def test_remote_media_cache_retention(self) -> None: - """ - Tests that entries from the remote media cache that have not been accessed - recently is purged, while local media is unaffected. - """ - # Advance 31 days (in seconds) - self.reactor.advance(31 * 24 * 60 * 60) - - # Check that media has been correctly purged. - # Local media should be unaffected. - # Remote media accessed <30 days ago should still exist. - self._assert_if_mxc_uris_purged( - purged=[ - self.remote_not_recently_accessed_media, - ], - not_purged=[ - self.remote_recently_accessed_media, - self.local_recently_accessed_media, - self.local_not_recently_accessed_media, - self.local_not_recently_accessed_quarantined_media, - self.local_not_recently_accessed_protected_media, - self.remote_not_recently_accessed_quarantined_media, - self.local_never_accessed_media, - ], - ) - - def _assert_if_mxc_uris_purged( - self, purged: Iterable[MXCUri], not_purged: Iterable[MXCUri] - ) -> None: - def _assert_mxc_uri_purge_state(mxc_uri: MXCUri, expect_purged: bool) -> None: - """Given an MXC URI, assert whether it has been purged or not.""" - if mxc_uri.server_name == self.hs.config.server.server_name: - found_media = bool( - self.get_success(self.store.get_local_media(mxc_uri.media_id)) - ) - else: - found_media = bool( - self.get_success( - self.store.get_cached_remote_media( - mxc_uri.server_name, mxc_uri.media_id - ) - ) - ) - - if expect_purged: - self.assertFalse(found_media, msg=f"{mxc_uri} unexpectedly not purged") - else: - self.assertTrue( - found_media, - msg=f"{mxc_uri} unexpectedly purged", - ) - - # Assert that the given MXC URIs have either been correctly purged or not. - for mxc_uri in purged: - _assert_mxc_uri_purge_state(mxc_uri, expect_purged=True) - for mxc_uri in not_purged: - _assert_mxc_uri_purge_state(mxc_uri, expect_purged=False) -- cgit 1.4.1 From 1c63dfedfdb40938fdd395c3d1420fb1d5588042 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:48:27 +0000 Subject: Bump serde from 1.0.192 to 1.0.193 (#16693) Bumps [serde](https://github.com/serde-rs/serde) from 1.0.192 to 1.0.193. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.192...v1.0.193) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8bd76866d..d5e77297f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,18 +339,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", -- cgit 1.4.1 From 9a6181fb4ed4dc8a9f357d2ab5a5d775485bd789 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:48:41 +0000 Subject: Bump jsonschema from 4.19.1 to 4.20.0 (#16692) Bumps [jsonschema](https://github.com/python-jsonschema/jsonschema) from 4.19.1 to 4.20.0. - [Release notes](https://github.com/python-jsonschema/jsonschema/releases) - [Changelog](https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst) - [Commits](https://github.com/python-jsonschema/jsonschema/compare/v4.19.1...v4.20.0) --- updated-dependencies: - dependency-name: jsonschema dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index f3f97d75db..34e4239194 100644 --- a/poetry.lock +++ b/poetry.lock @@ -981,13 +981,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" -version = "4.19.1" +version = "4.20.0" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" files = [ - {file = "jsonschema-4.19.1-py3-none-any.whl", hash = "sha256:cd5f1f9ed9444e554b38ba003af06c0a8c2868131e56bfbef0550fb450c0330e"}, - {file = "jsonschema-4.19.1.tar.gz", hash = "sha256:ec84cc37cfa703ef7cd4928db24f9cb31428a5d0fa77747b8b51a847458e0bbf"}, + {file = "jsonschema-4.20.0-py3-none-any.whl", hash = "sha256:ed6231f0429ecf966f5bc8dfef245998220549cbbcf140f913b7464c52c3b6b3"}, + {file = "jsonschema-4.20.0.tar.gz", hash = "sha256:4f614fd46d8d61258610998997743ec5492a648b33cf478c1ddc23ed4598a5fa"}, ] [package.dependencies] -- cgit 1.4.1 From 73794dd8c420d9eb54333ad85b04ac008beffb5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:48:53 +0000 Subject: Bump ruff from 0.1.4 to 0.1.6 (#16690) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.4 to 0.1.6. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.4...v0.1.6) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 38 +++++++++++++++++++------------------- pyproject.toml | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/poetry.lock b/poetry.lock index 34e4239194..a645ade159 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2425,28 +2425,28 @@ files = [ [[package]] name = "ruff" -version = "0.1.4" +version = "0.1.6" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.1.4-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:864958706b669cce31d629902175138ad8a069d99ca53514611521f532d91495"}, - {file = "ruff-0.1.4-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:9fdd61883bb34317c788af87f4cd75dfee3a73f5ded714b77ba928e418d6e39e"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4eaca8c9cc39aa7f0f0d7b8fe24ecb51232d1bb620fc4441a61161be4a17539"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a9a1301dc43cbf633fb603242bccd0aaa34834750a14a4c1817e2e5c8d60de17"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78e8db8ab6f100f02e28b3d713270c857d370b8d61871d5c7d1702ae411df683"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:80fea754eaae06335784b8ea053d6eb8e9aac75359ebddd6fee0858e87c8d510"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6bc02a480d4bfffd163a723698da15d1a9aec2fced4c06f2a753f87f4ce6969c"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9862811b403063765b03e716dac0fda8fdbe78b675cd947ed5873506448acea4"}, - {file = "ruff-0.1.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58826efb8b3efbb59bb306f4b19640b7e366967a31c049d49311d9eb3a4c60cb"}, - {file = "ruff-0.1.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:fdfd453fc91d9d86d6aaa33b1bafa69d114cf7421057868f0b79104079d3e66e"}, - {file = "ruff-0.1.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e8791482d508bd0b36c76481ad3117987301b86072158bdb69d796503e1c84a8"}, - {file = "ruff-0.1.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:01206e361021426e3c1b7fba06ddcb20dbc5037d64f6841e5f2b21084dc51800"}, - {file = "ruff-0.1.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:645591a613a42cb7e5c2b667cbefd3877b21e0252b59272ba7212c3d35a5819f"}, - {file = "ruff-0.1.4-py3-none-win32.whl", hash = "sha256:99908ca2b3b85bffe7e1414275d004917d1e0dfc99d497ccd2ecd19ad115fd0d"}, - {file = "ruff-0.1.4-py3-none-win_amd64.whl", hash = "sha256:1dfd6bf8f6ad0a4ac99333f437e0ec168989adc5d837ecd38ddb2cc4a2e3db8a"}, - {file = "ruff-0.1.4-py3-none-win_arm64.whl", hash = "sha256:d98ae9ebf56444e18a3e3652b3383204748f73e247dea6caaf8b52d37e6b32da"}, - {file = "ruff-0.1.4.tar.gz", hash = "sha256:21520ecca4cc555162068d87c747b8f95e1e95f8ecfcbbe59e8dd00710586315"}, + {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:88b8cdf6abf98130991cbc9f6438f35f6e8d41a02622cc5ee130a02a0ed28703"}, + {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c549ed437680b6105a1299d2cd30e4964211606eeb48a0ff7a93ef70b902248"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cf5f701062e294f2167e66d11b092bba7af6a057668ed618a9253e1e90cfd76"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:05991ee20d4ac4bb78385360c684e4b417edd971030ab12a4fbd075ff535050e"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87455a0c1f739b3c069e2f4c43b66479a54dea0276dd5d4d67b091265f6fd1dc"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:683aa5bdda5a48cb8266fcde8eea2a6af4e5700a392c56ea5fb5f0d4bfdc0240"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:137852105586dcbf80c1717facb6781555c4e99f520c9c827bd414fac67ddfb6"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd98138a98d48a1c36c394fd6b84cd943ac92a08278aa8ac8c0fdefcf7138f35"}, + {file = "ruff-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a0cd909d25f227ac5c36d4e7e681577275fb74ba3b11d288aff7ec47e3ae745"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e8fd1c62a47aa88a02707b5dd20c5ff20d035d634aa74826b42a1da77861b5ff"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:fd89b45d374935829134a082617954120d7a1470a9f0ec0e7f3ead983edc48cc"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:491262006e92f825b145cd1e52948073c56560243b55fb3b4ecb142f6f0e9543"}, + {file = "ruff-0.1.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:ea284789861b8b5ca9d5443591a92a397ac183d4351882ab52f6296b4fdd5462"}, + {file = "ruff-0.1.6-py3-none-win32.whl", hash = "sha256:1610e14750826dfc207ccbcdd7331b6bd285607d4181df9c1c6ae26646d6848a"}, + {file = "ruff-0.1.6-py3-none-win_amd64.whl", hash = "sha256:4558b3e178145491e9bc3b2ee3c4b42f19d19384eaa5c59d10acf6e8f8b57e33"}, + {file = "ruff-0.1.6-py3-none-win_arm64.whl", hash = "sha256:03910e81df0d8db0e30050725a5802441c2022ea3ae4fe0609b76081731accbc"}, + {file = "ruff-0.1.6.tar.gz", hash = "sha256:1b09f29b16c6ead5ea6b097ef2764b42372aebe363722f1605ecbcd2b9207184"}, ] [[package]] @@ -3432,4 +3432,4 @@ user-search = ["pyicu"] [metadata] lock-version = "2.0" python-versions = "^3.8.0" -content-hash = "369455d6a67753a6bcfbad3cd86801b1dd02896d0180080e2ba9501e007353ec" +content-hash = "2924e80a14b32b430e70bafbd2b00893a365d9c3836c026296f4af0b9579e604" diff --git a/pyproject.toml b/pyproject.toml index bd4ac09ae6..df683a146f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -321,7 +321,7 @@ all = [ # This helps prevents merge conflicts when running a batch of dependabot updates. isort = ">=5.10.1" black = ">=22.7.0" -ruff = "0.1.4" +ruff = "0.1.6" # Type checking only works with the pydantic.v1 compat module from pydantic v2 pydantic = "^2" -- cgit 1.4.1 From 3238ae3aa06fa485a4411ece195cdf1ce52c0939 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:49:15 +0000 Subject: Bump types-setuptools from 68.2.0.0 to 68.2.0.2 (#16688) Bumps [types-setuptools](https://github.com/python/typeshed) from 68.2.0.0 to 68.2.0.2. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index a645ade159..2b8276e73c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3151,13 +3151,13 @@ urllib3 = ">=2" [[package]] name = "types-setuptools" -version = "68.2.0.0" +version = "68.2.0.2" description = "Typing stubs for setuptools" optional = false -python-versions = "*" +python-versions = ">=3.7" files = [ - {file = "types-setuptools-68.2.0.0.tar.gz", hash = "sha256:a4216f1e2ef29d089877b3af3ab2acf489eb869ccaf905125c69d2dc3932fd85"}, - {file = "types_setuptools-68.2.0.0-py3-none-any.whl", hash = "sha256:77edcc843e53f8fc83bb1a840684841f3dc804ec94562623bfa2ea70d5a2ba1b"}, + {file = "types-setuptools-68.2.0.2.tar.gz", hash = "sha256:09efc380ad5c7f78e30bca1546f706469568cf26084cfab73ecf83dea1d28446"}, + {file = "types_setuptools-68.2.0.2-py3-none-any.whl", hash = "sha256:d5b5ff568ea2474eb573dcb783def7dadfd9b1ff638bb653b3c7051ce5aeb6d1"}, ] [[package]] -- cgit 1.4.1 From 62e96a29290df923588ba727b50b1dd8174892a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 11:15:52 +0000 Subject: Bump pyasn1 from 0.5.0 to 0.5.1 (#16689) Bumps [pyasn1](https://github.com/pyasn1/pyasn1) from 0.5.0 to 0.5.1. - [Release notes](https://github.com/pyasn1/pyasn1/releases) - [Changelog](https://github.com/pyasn1/pyasn1/blob/main/CHANGES.rst) - [Commits](https://github.com/pyasn1/pyasn1/compare/v0.5.0...v0.5.1) --- updated-dependencies: - dependency-name: pyasn1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2b8276e73c..fb787f32e0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1792,13 +1792,13 @@ psycopg2 = "*" [[package]] name = "pyasn1" -version = "0.5.0" +version = "0.5.1" description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ - {file = "pyasn1-0.5.0-py2.py3-none-any.whl", hash = "sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57"}, - {file = "pyasn1-0.5.0.tar.gz", hash = "sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde"}, + {file = "pyasn1-0.5.1-py2.py3-none-any.whl", hash = "sha256:4439847c58d40b1d0a573d07e3856e95333f1976294494c325775aeca506eb58"}, + {file = "pyasn1-0.5.1.tar.gz", hash = "sha256:6d391a96e59b23130a5cfa74d6fd7f388dbbe26cc8f1edf39fdddf08d9d6676c"}, ] [[package]] -- cgit 1.4.1