Skip to content

Commit

Permalink
Lookup Sygnal version using the correct name (#355)
Browse files Browse the repository at this point in the history
* Lookup Sygnal version using the correct name

We passed it a module name [1] instead of the "distribution name"(?)

Broken in 0ced8bd, so Sygnal 0.5.0.

[1]: https://docs.python.org/3/reference/import.html#name__

* Changelog

* Upper-bound Twisted
  • Loading branch information
David Robertson authored Nov 21, 2023
1 parent b83661c commit 5f55f42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/355.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Sygnal 0.5.0 where `sygnal.__version__` would not be correctly populated.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ dependencies = [
"pyyaml>=5.1.1",
"sentry-sdk>=0.10.2",
"service_identity>=18.1.0",
"Twisted>=19.7",
# Upper bound: tests fail on latest Twisted, see https://github.com/matrix-org/sygnal/issues/356
"Twisted>=19.7,<23.10",
"zope.interface>=5.0.0",
]

Expand Down
2 changes: 1 addition & 1 deletion sygnal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version(__name__)
__version__ = version("matrix-sygnal")
except PackageNotFoundError:
# package is not installed
pass

0 comments on commit 5f55f42

Please sign in to comment.