Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-matrix_common for
openSUSE:Factory checked in at 2022-07-14 16:34:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-matrix_common (Old)
and /work/SRC/openSUSE:Factory/.python-matrix_common.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-matrix_common"
Thu Jul 14 16:34:38 2022 rev:3 rq:989120 version:1.2.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-matrix_common/python-matrix_common.changes
2022-02-25 21:25:51.199646677 +0100
+++
/work/SRC/openSUSE:Factory/.python-matrix_common.new.1523/python-matrix_common.changes
2022-07-14 16:35:03.884674320 +0200
@@ -1,0 +2,7 @@
+Tue Jul 5 12:56:05 UTC 2022 - Marcus Rueckert <[email protected]>
+
+- Update to 1.2.1
+ https://github.com/matrix-org/matrix-python-common/releases/tag/v1.2.1
+ https://github.com/matrix-org/matrix-python-common/releases/tag/v1.2.0
+
+-------------------------------------------------------------------
Old:
----
matrix_common-1.1.0.tar.gz
New:
----
matrix_common-1.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-matrix_common.spec ++++++
--- /var/tmp/diff_new_pack.os2ZAS/_old 2022-07-14 16:35:04.320674749 +0200
+++ /var/tmp/diff_new_pack.os2ZAS/_new 2022-07-14 16:35:04.324674752 +0200
@@ -19,16 +19,16 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python39 1
Name: python-matrix_common
-Version: 1.1.0
+Version: 1.2.1
Release: 0
Summary: Common utilities for Synapse, Sydent and Sygnal
License: MIT
Group: Development/Languages/Python
URL: https://github.com/matrix-org/matrix-python-common
Source:
https://files.pythonhosted.org/packages/source/m/matrix_common/matrix_common-%{version}.tar.gz
-BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
+BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
++++++ matrix_common-1.1.0.tar.gz -> matrix_common-1.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/matrix_common-1.1.0/PKG-INFO
new/matrix_common-1.2.1/PKG-INFO
--- old/matrix_common-1.1.0/PKG-INFO 2022-02-11 22:08:37.808282100 +0100
+++ new/matrix_common-1.2.1/PKG-INFO 2022-06-07 12:49:15.074612400 +0200
@@ -1,10 +1,8 @@
Metadata-Version: 2.1
Name: matrix_common
-Version: 1.1.0
+Version: 1.2.1
Summary: Common utilities for Synapse, Sydent and Sygnal
Home-page: https://github.com/matrix-org/matrix-python-common
-License: UNKNOWN
-Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
@@ -93,5 +91,3 @@
python -m build
twine upload dist/matrix_common-$version*
```
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/matrix_common-1.1.0/matrix_common/regex.py
new/matrix_common-1.2.1/matrix_common/regex.py
--- old/matrix_common-1.1.0/matrix_common/regex.py 2022-02-10
19:37:15.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common/regex.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,95 +0,0 @@
-# Copyright 2021 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 re
-from typing import List, Pattern
-
-_WILDCARD_RUN = re.compile(r"([\?\*]+)")
-
-
-def glob_to_regex(
- glob: str,
- *,
- word_boundary: bool = False,
- ignore_case: bool = True,
-) -> Pattern[str]:
- """Converts a glob to a compiled regex object.
-
- Args:
- glob: pattern to match
- word_boundary: If `True`, the pattern will be allowed to match at word
- boundaries anywhere in the string. Otherwise, the pattern is
- anchored at the start and end of the string. When using this
option,
- the pattern may match up to one extra non-word character on either
- side. The matching substring may be obtained from a capture group.
- ignore_case: If `True`, the pattern will be case-insensitive.
- Defaults to `True`.
-
- Returns:
- compiled regex pattern
- """
- # Patterns with wildcards must be simplified to avoid performance cliffs
- # - The glob `?**?**?` is equivalent to the glob `???*`
- # - The glob `???*` is equivalent to the regex `.{3,}`
- chunks: List[str] = []
- for chunk in _WILDCARD_RUN.split(glob):
- # No wildcards? re.escape()
- if not _WILDCARD_RUN.match(chunk):
- chunks.append(re.escape(chunk))
- continue
-
- # Wildcards? Simplify.
- question_marks = chunk.count("?")
- if "*" in chunk:
- chunks.append(".{%d,}" % (question_marks,))
- else:
- chunks.append(".{%d}" % (question_marks,))
-
- pattern = "".join(chunks)
-
- if word_boundary:
- pattern = to_word_pattern(pattern)
- else:
- # `\A` anchors at start of string, `\Z` at end of string
- # `\Z` is not the same as `$`! The latter will match the position
before
- # a `\n` at the end of the string.
- pattern = rf"\A({pattern})\Z"
-
- return re.compile(pattern, re.IGNORECASE if ignore_case else 0)
-
-
-def to_word_pattern(pattern: str) -> str:
- """Converts the given pattern to one that only matches on whole words.
-
- Adds word boundary characters to the start and end of a pattern to require
that the
- match occur as a whole word.
-
- If the start or end of the pattern is a non-word character, then a word
boundary is
- not required to precede or succeed it.
-
- A word boundary is considered to be the boundary between a word and
non-word
- character. As such, the returned pattern is not appropriate for
internationalized
- text search because there are languages which do not use spaces between
words.
-
- Args:
- pattern: The pattern to wrap.
-
- Returns:
- A new pattern that only matches on whole words. The new pattern may
match up to
- one extra non-word character on either side. The exact match is
provided by a
- capture group.
- """
- # `^|\W` and `\W|$` handle the case where `pattern` starts or ends with a
non-word
- # character.
- return rf"(?:^|\W|\b)({pattern})(?:\b|\W|$)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/matrix_common-1.1.0/matrix_common/versionstring.py
new/matrix_common-1.2.1/matrix_common/versionstring.py
--- old/matrix_common-1.1.0/matrix_common/versionstring.py 2022-02-11
22:03:02.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common/versionstring.py 1970-01-01
01:00:00.000000000 +0100
@@ -1,93 +0,0 @@
-# Copyright 2016 OpenMarket Ltd
-# Copyright 2021-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 functools
-import logging
-import subprocess
-
-try:
- from importlib.metadata import distribution
-except ImportError:
- from importlib_metadata import distribution # type: ignore
-
-__all__ = ["get_distribution_version_string"]
-
-logger = logging.getLogger(__name__)
-
-
[email protected]_cache()
-def get_distribution_version_string(distribution_name: str) -> str:
- """Calculate a git-aware version string for a distribution package.
-
- A "distribution package" is a thing that you can e.g. install and manage
with pip.
- It can contain modules, an "import package" of multiple modules, and
arbitrary
- resource data. See the glossary at
-
-
https://packaging.python.org/en/latest/glossary/#term-Distribution-Package
-
- for all your taxonomic needs. Often a distribution package contains
exactly import
- package---possibly with _different_ names. For example, one can install the
- "matrix-sydent" distribution package from PyPI using pip, and doing so
makes the
- "sydent" import package available to import.
-
- Args:
- distribution_name: The name of the distribution package to check the
version of
-
- Raises:
- importlib.metadata.PackageNotFoundError if the given distribution name
doesn't
- exist.
-
- Returns:
- The module version, possibly with git version information included.
- """
-
- dist = distribution(distribution_name)
- version_string = dist.version
- cwd = dist.locate_file(".")
-
- try:
-
- def _run_git_command(prefix: str, *params: str) -> str:
- try:
- result = (
- subprocess.check_output(
- ["git", *params], stderr=subprocess.DEVNULL, cwd=cwd
- )
- .strip()
- .decode("ascii")
- )
- return prefix + result
- except (subprocess.CalledProcessError, FileNotFoundError):
- return ""
-
- git_branch = _run_git_command("b=", "rev-parse", "--abbrev-ref",
"HEAD")
- git_tag = _run_git_command("t=", "describe", "--exact-match")
- git_commit = _run_git_command("", "rev-parse", "--short", "HEAD")
-
- dirty_string = "-this_is_a_dirty_checkout"
- is_dirty = _run_git_command("", "describe", "--dirty=" +
dirty_string).endswith(
- dirty_string
- )
- git_dirty = "dirty" if is_dirty else ""
-
- if git_branch or git_tag or git_commit or git_dirty:
- git_version = ",".join(
- s for s in (git_branch, git_tag, git_commit, git_dirty) if s
- )
-
- version_string = f"{version_string} ({git_version})"
- except Exception as e:
- logger.info("Failed to check for git repository: %s", e)
-
- return version_string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/matrix_common-1.1.0/matrix_common.egg-info/PKG-INFO
new/matrix_common-1.2.1/matrix_common.egg-info/PKG-INFO
--- old/matrix_common-1.1.0/matrix_common.egg-info/PKG-INFO 2022-02-11
22:08:37.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
@@ -1,97 +0,0 @@
-Metadata-Version: 2.1
-Name: matrix-common
-Version: 1.1.0
-Summary: Common utilities for Synapse, Sydent and Sygnal
-Home-page: https://github.com/matrix-org/matrix-python-common
-License: UNKNOWN
-Platform: UNKNOWN
-Classifier: License :: OSI Approved :: Apache Software License
-Requires-Python: >=3.6
-Description-Content-Type: text/markdown
-Provides-Extra: test
-Provides-Extra: dev
-License-File: LICENSE
-
-# matrix-python-common
-
-Common utilities for Synapse, Sydent and Sygnal.
-
-
-## Installation
-
-```shell
-pip install matrix-common
-```
-
-
-## Usage
-```py
-import matrix_common
-```
-
-
-## Development
-
-In a virtual environment with pip ??? 21.1, run
-```shell
-pip install -e .[dev]
-```
-
-To run the unit tests, you can either use:
-```shell
-tox -e py
-```
-or
-```shell
-trial tests
-```
-
-To run the linters and `mypy` type checker, use `./scripts-dev/lint.sh`.
-
-
-## Releasing
-
-The exact steps for releasing will vary; but this is an approach taken by the
-Synapse developers (assuming a Unix-like shell):
-
- 1. Set a shell variable to the version you are releasing (this just makes
- subsequent steps easier):
- ```shell
- version=X.Y.Z
- ```
-
- 2. Update `setup.cfg` so that the `version` is correct.
-
- 3. Stage the changed files and commit.
- ```shell
- git add -u
- git commit -m v$version -n
- ```
-
- 4. Push your changes.
- ```shell
- git push
- ```
-
- 5. When ready, create a signed tag for the release:
- ```shell
- git tag -s v$version
- ```
- Base the tag message on the changelog.
-
- 6. Push the tag.
- ```shell
- git push origin tag v$version
- ```
-
- 7. If applicable:
- Create a *release*, based on the tag you just pushed, on GitHub or GitLab.
-
- 8. If applicable:
- Create a source distribution and upload it to PyPI:
- ```shell
- python -m build
- twine upload dist/matrix_common-$version*
- ```
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/matrix_common.egg-info/SOURCES.txt
new/matrix_common-1.2.1/matrix_common.egg-info/SOURCES.txt
--- old/matrix_common-1.1.0/matrix_common.egg-info/SOURCES.txt 2022-02-11
22:08:37.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common.egg-info/SOURCES.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-LICENSE
-MANIFEST.in
-README.md
-pyproject.toml
-setup.cfg
-matrix_common/__init__.py
-matrix_common/py.typed
-matrix_common/regex.py
-matrix_common/versionstring.py
-matrix_common.egg-info/PKG-INFO
-matrix_common.egg-info/SOURCES.txt
-matrix_common.egg-info/dependency_links.txt
-matrix_common.egg-info/requires.txt
-matrix_common.egg-info/top_level.txt
-tests/__init__.py
-tests/test_regex.py
-tests/test_versionstring.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/matrix_common.egg-info/dependency_links.txt
new/matrix_common-1.2.1/matrix_common.egg-info/dependency_links.txt
--- old/matrix_common-1.1.0/matrix_common.egg-info/dependency_links.txt
2022-02-11 22:08:37.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common.egg-info/dependency_links.txt
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/matrix_common.egg-info/requires.txt
new/matrix_common-1.2.1/matrix_common.egg-info/requires.txt
--- old/matrix_common-1.1.0/matrix_common.egg-info/requires.txt 2022-02-11
22:08:37.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common.egg-info/requires.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-attrs
-
-[:python_version < "3.8"]
-importlib_metadata>=1.4
-
-[dev]
-tox
-twisted
-aiounittest
-mypy==0.910
-black==21.9b0
-flake8==4.0.1
-isort==5.9.3
-
-[test]
-tox
-twisted
-aiounittest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/matrix_common.egg-info/top_level.txt
new/matrix_common-1.2.1/matrix_common.egg-info/top_level.txt
--- old/matrix_common-1.1.0/matrix_common.egg-info/top_level.txt
2022-02-11 22:08:37.000000000 +0100
+++ new/matrix_common-1.2.1/matrix_common.egg-info/top_level.txt
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-matrix_common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/matrix_common-1.1.0/setup.cfg
new/matrix_common-1.2.1/setup.cfg
--- old/matrix_common-1.1.0/setup.cfg 2022-02-11 22:08:37.808282100 +0100
+++ new/matrix_common-1.2.1/setup.cfg 2022-06-07 12:49:15.074612400 +0200
@@ -4,11 +4,12 @@
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/matrix-org/matrix-python-common
-version = 1.1.0
+version = 1.2.1
classifiers =
License :: OSI Approved :: Apache Software License
[options]
+package_dir = =src
packages =
matrix_common
python_requires = >= 3.6
@@ -27,9 +28,11 @@
dev =
%(test)s
mypy == 0.910
- black == 21.9b0
+ black == 22.3.0
flake8 == 4.0.1
isort == 5.9.3
+ build == 0.8.0
+ twine == 4.0.1
[flake8]
ignore = W503,W504,E203,E501
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/matrix_common-1.1.0/src/matrix_common/regex.py
new/matrix_common-1.2.1/src/matrix_common/regex.py
--- old/matrix_common-1.1.0/src/matrix_common/regex.py 1970-01-01
01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common/regex.py 2022-06-06
18:58:36.000000000 +0200
@@ -0,0 +1,95 @@
+# Copyright 2021 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 re
+from typing import List, Pattern
+
+_WILDCARD_RUN = re.compile(r"([\?\*]+)")
+
+
+def glob_to_regex(
+ glob: str,
+ *,
+ word_boundary: bool = False,
+ ignore_case: bool = True,
+) -> Pattern[str]:
+ """Converts a glob to a compiled regex object.
+
+ Args:
+ glob: pattern to match
+ word_boundary: If `True`, the pattern will be allowed to match at word
+ boundaries anywhere in the string. Otherwise, the pattern is
+ anchored at the start and end of the string. When using this
option,
+ the pattern may match up to one extra non-word character on either
+ side. The matching substring may be obtained from a capture group.
+ ignore_case: If `True`, the pattern will be case-insensitive.
+ Defaults to `True`.
+
+ Returns:
+ compiled regex pattern
+ """
+ # Patterns with wildcards must be simplified to avoid performance cliffs
+ # - The glob `?**?**?` is equivalent to the glob `???*`
+ # - The glob `???*` is equivalent to the regex `.{3,}`
+ chunks: List[str] = []
+ for chunk in _WILDCARD_RUN.split(glob):
+ # No wildcards? re.escape()
+ if not _WILDCARD_RUN.match(chunk):
+ chunks.append(re.escape(chunk))
+ continue
+
+ # Wildcards? Simplify.
+ question_marks = chunk.count("?")
+ if "*" in chunk:
+ chunks.append(".{%d,}" % (question_marks,))
+ else:
+ chunks.append(".{%d}" % (question_marks,))
+
+ pattern = "".join(chunks)
+
+ if word_boundary:
+ pattern = to_word_pattern(pattern)
+ else:
+ # `\A` anchors at start of string, `\Z` at end of string
+ # `\Z` is not the same as `$`! The latter will match the position
before
+ # a `\n` at the end of the string.
+ pattern = rf"\A({pattern})\Z"
+
+ return re.compile(pattern, re.IGNORECASE if ignore_case else 0)
+
+
+def to_word_pattern(pattern: str) -> str:
+ """Converts the given pattern to one that only matches on whole words.
+
+ Adds word boundary characters to the start and end of a pattern to require
that the
+ match occur as a whole word.
+
+ If the start or end of the pattern is a non-word character, then a word
boundary is
+ not required to precede or succeed it.
+
+ A word boundary is considered to be the boundary between a word and
non-word
+ character. As such, the returned pattern is not appropriate for
internationalized
+ text search because there are languages which do not use spaces between
words.
+
+ Args:
+ pattern: The pattern to wrap.
+
+ Returns:
+ A new pattern that only matches on whole words. The new pattern may
match up to
+ one extra non-word character on either side. The exact match is
provided by a
+ capture group.
+ """
+ # `^|\W` and `\W|$` handle the case where `pattern` starts or ends with a
non-word
+ # character.
+ return rf"(?:^|\W|\b)({pattern})(?:\b|\W|$)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/src/matrix_common/versionstring.py
new/matrix_common-1.2.1/src/matrix_common/versionstring.py
--- old/matrix_common-1.1.0/src/matrix_common/versionstring.py 1970-01-01
01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common/versionstring.py 2022-06-07
12:46:46.000000000 +0200
@@ -0,0 +1,106 @@
+# Copyright 2016 OpenMarket Ltd
+# Copyright 2021-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 functools
+import logging
+import os.path
+import subprocess
+from typing import Optional
+
+try:
+ from importlib.metadata import distribution
+except ImportError:
+ from importlib_metadata import distribution # type: ignore
+
+__all__ = ["get_distribution_version_string"]
+
+logger = logging.getLogger(__name__)
+
+
[email protected]_cache()
+def get_distribution_version_string(
+ distribution_name: str, cwd: Optional[str] = None
+) -> str:
+ """Calculate a git-aware version string for a distribution package.
+
+ A "distribution package" is a thing that you can e.g. install and manage
with pip.
+ It can contain modules, an "import package" of multiple modules, and
arbitrary
+ resource data. See the glossary at
+
+
https://packaging.python.org/en/latest/glossary/#term-Distribution-Package
+
+ for all your taxonomic needs. Often a distribution package contains
exactly import
+ package---possibly with _different_ names. For example, one can install the
+ "matrix-sydent" distribution package from PyPI using pip, and doing so
makes the
+ "sydent" import package available to import.
+
+ Args:
+ distribution_name: The name of the distribution package to check the
version of
+
+ cwd: if provided, the directory to run all git commands in. `cwd` may
also be
+ the path to a file, in which case `os.path.dirname(cwd)` is used
instead.
+ If omitted, the function will attempt to locate the distribution's
source
+ on disk and use that location instead---but this fallback is not
reliable.
+
+ Raises:
+ importlib.metadata.PackageNotFoundError if the given distribution name
doesn't
+ exist.
+
+ Returns:
+ The module version, possibly with git version information included.
+ """
+
+ dist = distribution(distribution_name)
+ version_string = dist.version
+ if cwd is None:
+ # This used to work for Synapse, but seems to have broken between
versions 1.56
+ # and 1.57. I suspect that the cause is a difference in the metadata
generated
+ # by `setuptools` and `poetry-core` at package-install time.
+ cwd = dist.locate_file(".").__fspath__()
+ cwd = os.path.dirname(cwd)
+ try:
+
+ def _run_git_command(prefix: str, *params: str) -> str:
+ try:
+ result = (
+ subprocess.check_output(
+ ["git", *params], stderr=subprocess.DEVNULL, cwd=cwd
+ )
+ .strip()
+ .decode("ascii")
+ )
+ return prefix + result
+ except (subprocess.CalledProcessError, FileNotFoundError):
+ return ""
+
+ git_branch = _run_git_command("b=", "rev-parse", "--abbrev-ref",
"HEAD")
+ git_tag = _run_git_command("t=", "describe", "--exact-match")
+ git_commit = _run_git_command("", "rev-parse", "--short", "HEAD")
+
+ dirty_string = "-this_is_a_dirty_checkout"
+ is_dirty = _run_git_command("", "describe", "--dirty=" +
dirty_string).endswith(
+ dirty_string
+ )
+ git_dirty = "dirty" if is_dirty else ""
+
+ if git_branch or git_tag or git_commit or git_dirty:
+ git_version = ",".join(
+ s for s in (git_branch, git_tag, git_commit, git_dirty) if s
+ )
+
+ version_string = f"{version_string} ({git_version})"
+ except Exception as e:
+ logger.info("Failed to check for git repository: %s", e)
+
+ return version_string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/src/matrix_common.egg-info/PKG-INFO
new/matrix_common-1.2.1/src/matrix_common.egg-info/PKG-INFO
--- old/matrix_common-1.1.0/src/matrix_common.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common.egg-info/PKG-INFO 2022-06-07
12:49:14.000000000 +0200
@@ -0,0 +1,93 @@
+Metadata-Version: 2.1
+Name: matrix-common
+Version: 1.2.1
+Summary: Common utilities for Synapse, Sydent and Sygnal
+Home-page: https://github.com/matrix-org/matrix-python-common
+Classifier: License :: OSI Approved :: Apache Software License
+Requires-Python: >=3.6
+Description-Content-Type: text/markdown
+Provides-Extra: test
+Provides-Extra: dev
+License-File: LICENSE
+
+# matrix-python-common
+
+Common utilities for Synapse, Sydent and Sygnal.
+
+
+## Installation
+
+```shell
+pip install matrix-common
+```
+
+
+## Usage
+```py
+import matrix_common
+```
+
+
+## Development
+
+In a virtual environment with pip ??? 21.1, run
+```shell
+pip install -e .[dev]
+```
+
+To run the unit tests, you can either use:
+```shell
+tox -e py
+```
+or
+```shell
+trial tests
+```
+
+To run the linters and `mypy` type checker, use `./scripts-dev/lint.sh`.
+
+
+## Releasing
+
+The exact steps for releasing will vary; but this is an approach taken by the
+Synapse developers (assuming a Unix-like shell):
+
+ 1. Set a shell variable to the version you are releasing (this just makes
+ subsequent steps easier):
+ ```shell
+ version=X.Y.Z
+ ```
+
+ 2. Update `setup.cfg` so that the `version` is correct.
+
+ 3. Stage the changed files and commit.
+ ```shell
+ git add -u
+ git commit -m v$version -n
+ ```
+
+ 4. Push your changes.
+ ```shell
+ git push
+ ```
+
+ 5. When ready, create a signed tag for the release:
+ ```shell
+ git tag -s v$version
+ ```
+ Base the tag message on the changelog.
+
+ 6. Push the tag.
+ ```shell
+ git push origin tag v$version
+ ```
+
+ 7. If applicable:
+ Create a *release*, based on the tag you just pushed, on GitHub or GitLab.
+
+ 8. If applicable:
+ Create a source distribution and upload it to PyPI:
+ ```shell
+ python -m build
+ twine upload dist/matrix_common-$version*
+ ```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/src/matrix_common.egg-info/SOURCES.txt
new/matrix_common-1.2.1/src/matrix_common.egg-info/SOURCES.txt
--- old/matrix_common-1.1.0/src/matrix_common.egg-info/SOURCES.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common.egg-info/SOURCES.txt
2022-06-07 12:49:15.000000000 +0200
@@ -0,0 +1,17 @@
+LICENSE
+MANIFEST.in
+README.md
+pyproject.toml
+setup.cfg
+src/matrix_common/__init__.py
+src/matrix_common/py.typed
+src/matrix_common/regex.py
+src/matrix_common/versionstring.py
+src/matrix_common.egg-info/PKG-INFO
+src/matrix_common.egg-info/SOURCES.txt
+src/matrix_common.egg-info/dependency_links.txt
+src/matrix_common.egg-info/requires.txt
+src/matrix_common.egg-info/top_level.txt
+tests/__init__.py
+tests/test_regex.py
+tests/test_versionstring.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/src/matrix_common.egg-info/dependency_links.txt
new/matrix_common-1.2.1/src/matrix_common.egg-info/dependency_links.txt
--- old/matrix_common-1.1.0/src/matrix_common.egg-info/dependency_links.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common.egg-info/dependency_links.txt
2022-06-07 12:49:14.000000000 +0200
@@ -0,0 +1 @@
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/src/matrix_common.egg-info/requires.txt
new/matrix_common-1.2.1/src/matrix_common.egg-info/requires.txt
--- old/matrix_common-1.1.0/src/matrix_common.egg-info/requires.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common.egg-info/requires.txt
2022-06-07 12:49:14.000000000 +0200
@@ -0,0 +1,20 @@
+attrs
+
+[:python_version < "3.8"]
+importlib_metadata>=1.4
+
+[dev]
+tox
+twisted
+aiounittest
+mypy==0.910
+black==22.3.0
+flake8==4.0.1
+isort==5.9.3
+build==0.8.0
+twine==4.0.1
+
+[test]
+tox
+twisted
+aiounittest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/matrix_common-1.1.0/src/matrix_common.egg-info/top_level.txt
new/matrix_common-1.2.1/src/matrix_common.egg-info/top_level.txt
--- old/matrix_common-1.1.0/src/matrix_common.egg-info/top_level.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/matrix_common-1.2.1/src/matrix_common.egg-info/top_level.txt
2022-06-07 12:49:15.000000000 +0200
@@ -0,0 +1 @@
+matrix_common