14
0

Accepting request 973990 from home:mcepl:branches:devel:languages:python

- 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.

OBS-URL: https://build.opensuse.org/request/show/973990
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-proto-plus?expand=0&rev=10
This commit is contained in:
2022-04-29 21:59:52 +00:00
committed by Git OBS Bridge
parent baacbf7ea4
commit eb958ba871
5 changed files with 40 additions and 8 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ca4055f7c5c1a2239ac7a12770a76a16269f58d3f01631523c20fc81dbb14a7
size 49652

3
proto-plus-1.20.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f28b225bc9e6c14e206fb7f8e996a46fb2ccd902648e512d496abb6a716a4ae5
size 51697

14
pytest-staticmethod.patch Normal file
View File

@@ -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(".", "/"))

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Apr 25 17:45:27 UTC 2022 - Matej Cepl <mcepl@suse.com>
- 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 <buschmann23@opensuse.org>

View File

@@ -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