From f33356e8f86f5271376467febfad0936e4e8a72d Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 17 Jun 2022 19:07:04 +0100 Subject: [PATCH] Use caret (semver bounds) for matrix.org packages (#13082) --- .ci/scripts/test_old_deps.sh | 6 ++++-- changelog.d/13082.misc | 1 + poetry.lock | 2 +- pyproject.toml | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 changelog.d/13082.misc diff --git a/.ci/scripts/test_old_deps.sh b/.ci/scripts/test_old_deps.sh index 769ca4517e..7d0625fa86 100755 --- a/.ci/scripts/test_old_deps.sh +++ b/.ci/scripts/test_old_deps.sh @@ -27,9 +27,10 @@ export VIRTUALENV_NO_DOWNLOAD=1 # Patch the project definitions in-place: # - Replace all lower and tilde bounds with exact bounds -# - Make the pyopenssl 17.0, which is the oldest version that works with -# a `cryptography` compiled against OpenSSL 1.1. +# - Replace all caret bounds---but not the one that defines the supported Python version! # - Delete all lines referring to psycopg2 --- so no testing of postgres support. +# - Use pyopenssl 17.0, which is the oldest version that works with +# a `cryptography` compiled against OpenSSL 1.1. # - Omit systemd: we're not logging to journal here. # TODO: also replace caret bounds, see https://python-poetry.org/docs/dependency-specification/#version-constraints @@ -40,6 +41,7 @@ export VIRTUALENV_NO_DOWNLOAD=1 sed -i \ -e "s/[~>]=/==/g" \ + -e '/^python = "^/!s/\^/==/g' \ -e "/psycopg2/d" \ -e 's/pyOpenSSL = "==16.0.0"/pyOpenSSL = "==17.0.0"/' \ -e '/systemd/d' \ diff --git a/changelog.d/13082.misc b/changelog.d/13082.misc new file mode 100644 index 0000000000..1aa386dbf7 --- /dev/null +++ b/changelog.d/13082.misc @@ -0,0 +1 @@ +Pin dependencies maintained by matrix.org to [semantic version](https://semver.org/) bounds. diff --git a/poetry.lock b/poetry.lock index 849e8a7a99..49fbaab577 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1563,7 +1563,7 @@ url_preview = ["lxml"] [metadata] lock-version = "1.1" python-versions = "^3.7.1" -content-hash = "73882e279e0379482f2fc7414cb71addfd408ca48ad508ff8a02b0cb544762af" +content-hash = "e96625923122e29b6ea5964379828e321b6cede2b020fc32c6f86c09d86d1ae8" [metadata.files] attrs = [ diff --git a/pyproject.toml b/pyproject.toml index 44aa775c33..3a56c42c0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,9 +110,9 @@ jsonschema = ">=3.0.0" frozendict = ">=1,!=2.1.2" # We require 2.1.0 or higher for type hints. Previous guard was >= 1.1.0 unpaddedbase64 = ">=2.1.0" -canonicaljson = ">=1.4.0" +canonicaljson = "^1.4.0" # we use the type definitions added in signedjson 1.1. -signedjson = ">=1.1.0" +signedjson = "^1.1.0" # validating SSL certs for IP addresses requires service_identity 18.1. service-identity = ">=18.1.0" # Twisted 18.9 introduces some logger improvements that the structured @@ -150,7 +150,7 @@ typing-extensions = ">=3.10.0.1" cryptography = ">=3.4.7" # ijson 3.1.4 fixes a bug with "." in property names ijson = ">=3.1.4" -matrix-common = "~=1.2.1" +matrix-common = "^1.2.1" # We need packaging.requirements.Requirement, added in 16.1. packaging = ">=16.1" # At the time of writing, we only use functions from the version `importlib.metadata`