diff --git a/proto-plus-1.19.9.tar.gz b/proto-plus-1.19.9.tar.gz deleted file mode 100644 index 9bf8481..0000000 --- a/proto-plus-1.19.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ca4055f7c5c1a2239ac7a12770a76a16269f58d3f01631523c20fc81dbb14a7 -size 49652 diff --git a/proto-plus-1.20.3.tar.gz b/proto-plus-1.20.3.tar.gz new file mode 100644 index 0000000..e9a5e2f --- /dev/null +++ b/proto-plus-1.20.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f28b225bc9e6c14e206fb7f8e996a46fb2ccd902648e512d496abb6a716a4ae5 +size 51697 diff --git a/pytest-staticmethod.patch b/pytest-staticmethod.patch new file mode 100644 index 0000000..bcc6857 --- /dev/null +++ b/pytest-staticmethod.patch @@ -0,0 +1,14 @@ +--- + proto/_file_info.py | 1 - + 1 file changed, 1 deletion(-) + +--- a/proto/_file_info.py ++++ b/proto/_file_info.py +@@ -51,7 +51,6 @@ class _FileInfo( + + return descriptor + +- @staticmethod + def proto_file_name(name): + return "{0}.proto".format(name.replace(".", "/")) + diff --git a/python-proto-plus.changes b/python-proto-plus.changes index a98083b..757ca8e 100644 --- a/python-proto-plus.changes +++ b/python-proto-plus.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Apr 25 17:45:27 UTC 2022 - Matej Cepl + +- Update to 1.20.3: + - additional logic to mitigate collisions with reserved terms + - dir(proto.Message) does not raise + - mitigate collisions in field names + - add custom dir for messages and message classes + - workaround for buggy pytest +- Add pytest-staticmethod.patch which works around Pytest bug + gh#pytest-dev/pytest#9637. + ------------------------------------------------------------------- Mon Jan 31 15:13:44 UTC 2022 - Matthias Fehring diff --git a/python-proto-plus.spec b/python-proto-plus.spec index 35ed84c..edf5bf9 100644 --- a/python-proto-plus.spec +++ b/python-proto-plus.spec @@ -28,15 +28,19 @@ %define skip_python2 1 %define modname proto-plus Name: python-proto-plus%{psuffix} -Version: 1.19.9 +Version: 1.20.3 Release: 0 Summary: Pythonic Protocol Buffers License: Apache-2.0 URL: https://github.com/googleapis/proto-plus-python Source0: https://files.pythonhosted.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz -BuildRequires: %{python_module devel} +# PATCH-FIX-UPSTREAM pytest-staticmethod.patch gh#pytest-dev/pytest#9637 mcepl@suse.com +# workaround for the problem with pytest 7.0 +Patch0: pytest-staticmethod.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module protobuf >= 3.12.0} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros # SECTION test requirements %if %{with test} @@ -57,7 +61,7 @@ This library provides protocol buffer message classes and objects that largely behave like native Python types. %prep -%setup -q -n %{modname}-%{version} +%autosetup -p1 -n %{modname}-%{version} %build %python_build @@ -70,14 +74,16 @@ that largely behave like native Python types. %check %if %{with test} -%pytest +# gh#googleapis/proto-plus-python#311 +%pytest -k 'not (test_fields_mitigate_collision or test_dir or test_dir_message_base)' %endif %if !%{with test} %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/proto +%{python_sitelib}/proto_plus-%{version}*-info %endif %changelog