mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 12:42:40 -05:00
Use version string helper from matrix-common (#11979)
* Require latest matrix-common * Use the common function
This commit is contained in:
parent
55113dd5e8
commit
4ae956c8bb
13 changed files with 42 additions and 112 deletions
|
|
@ -20,7 +20,8 @@ import platform
|
|||
from http import HTTPStatus
|
||||
from typing import TYPE_CHECKING, Optional, Tuple
|
||||
|
||||
import synapse
|
||||
from matrix_common.versionstring import get_distribution_version_string
|
||||
|
||||
from synapse.api.errors import Codes, NotFoundError, SynapseError
|
||||
from synapse.http.server import HttpServer, JsonResource
|
||||
from synapse.http.servlet import RestServlet, parse_json_object_from_request
|
||||
|
|
@ -88,7 +89,6 @@ from synapse.rest.admin.users import (
|
|||
WhoisRestServlet,
|
||||
)
|
||||
from synapse.types import JsonDict, RoomStreamToken
|
||||
from synapse.util.versionstring import get_version_string
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from synapse.server import HomeServer
|
||||
|
|
@ -101,7 +101,7 @@ class VersionServlet(RestServlet):
|
|||
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
self.res = {
|
||||
"server_version": get_version_string(synapse),
|
||||
"server_version": get_distribution_version_string("matrix-synapse"),
|
||||
"python_version": platform.python_version(),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue