Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Mar 8, 2022
2 parents bfa7d6b + b1989ce commit 0dc9c56
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 8 deletions.
22 changes: 20 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
Synapse 1.54.0rc1 (2022-03-02)
==============================
Synapse 1.54.0 (2022-03-08)
===========================

Please note that this will be the last release of Synapse that is compatible with Mjolnir 1.3.1 and earlier.
Administrators of servers which have the Mjolnir module installed are advised to upgrade Mjolnir to version 1.3.2 or later.


Bugfixes
--------

- Fix a bug introduced in Synapse 1.54.0rc1 preventing the new module callbacks introduced in this release from being registered by modules. ([\#12141](https://github.com/matrix-org/synapse/issues/12141))
- Fix a bug introduced in Synapse 1.54.0rc1 where runtime dependency version checks would mistakenly check development dependencies if they were present and would not accept pre-release versions of dependencies. ([\#12129](https://github.com/matrix-org/synapse/issues/12129), [\#12177](https://github.com/matrix-org/synapse/issues/12177))


Internal Changes
----------------

- Update release script to insert the previous version when writing "No significant changes" line in the changelog. ([\#12127](https://github.com/matrix-org/synapse/issues/12127))
- Relax the version guard for "packaging" added in [\#12088](https://github.com/matrix-org/synapse/issues/12088). ([\#12166](https://github.com/matrix-org/synapse/issues/12166))


Synapse 1.54.0rc1 (2022-03-02)
==============================


Features
--------

Expand Down
1 change: 0 additions & 1 deletion changelog.d/12127.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/12129.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/12141.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/12166.misc

This file was deleted.

6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.54.0) stable; urgency=medium

* New synapse release 1.54.0.

-- Synapse Packaging team <packages@matrix.org> Tue, 08 Mar 2022 10:54:52 +0000

matrix-synapse-py3 (1.54.0~rc1) stable; urgency=medium

* New synapse release 1.54.0~rc1.
Expand Down
2 changes: 1 addition & 1 deletion synapse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
except ImportError:
pass

__version__ = "1.54.0rc1"
__version__ = "1.54.0"

if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
# We import here so that we don't have to install a bunch of deps when
Expand Down
3 changes: 2 additions & 1 deletion synapse/util/check_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ def check_requirements(extra: Optional[str] = None) -> None:
deps_unfulfilled.append(requirement.name)
errors.append(_not_installed(requirement, extra))
else:
if not requirement.specifier.contains(dist.version):
# We specify prereleases=True to allow prereleases such as RCs.
if not requirement.specifier.contains(dist.version, prereleases=True):
deps_unfulfilled.append(requirement.name)
errors.append(_incorrect_version(requirement, dist.version, extra))

Expand Down
19 changes: 19 additions & 0 deletions tests/util/test_check_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def read_text(self, filename):


old = DummyDistribution("0.1.2")
old_release_candidate = DummyDistribution("0.1.2rc3")
new = DummyDistribution("1.2.3")
new_release_candidate = DummyDistribution("1.2.3rc4")

# could probably use stdlib TestCase --- no need for twisted here

Expand Down Expand Up @@ -110,3 +112,20 @@ def test_check_for_extra_dependencies(self) -> None:
with self.mock_installed_package(new):
# should not raise
check_requirements("cool-extra")

def test_release_candidates_satisfy_dependency(self) -> None:
"""
Tests that release candidates count as far as satisfying a dependency
is concerned.
(Regression test, see #12176.)
"""
with patch(
"synapse.util.check_dependencies.metadata.requires",
return_value=["dummypkg >= 1"],
):
with self.mock_installed_package(old_release_candidate):
self.assertRaises(DependencyException, check_requirements)

with self.mock_installed_package(new_release_candidate):
# should not raise
check_requirements()

0 comments on commit 0dc9c56

Please sign in to comment.