15
0
forked from pool/python-avro

- Add py311.patch to make tests compatible with python 3.11 gh#apache/avro#1961

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-avro?expand=0&rev=28
This commit is contained in:
2023-01-25 12:58:47 +00:00
committed by Git OBS Bridge
parent cdd2864024
commit 55d8da65e4
3 changed files with 23 additions and 3 deletions

14
py311.patch Normal file
View File

@@ -0,0 +1,14 @@
Index: avro-1.11.1/avro/compatibility.py
===================================================================
--- avro-1.11.1.orig/avro/compatibility.py
+++ avro-1.11.1/avro/compatibility.py
@@ -49,6 +49,9 @@ class SchemaType(str, Enum):
STRING = "string"
UNION = "union"
+ def __str__(self):
+ return self.value
+
class SchemaCompatibilityType(Enum):
compatible = "compatible"

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jan 25 12:58:14 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Add py311.patch to make tests compatible with python 3.11 gh#apache/avro#1961
-------------------------------------------------------------------
Thu Aug 4 09:32:11 UTC 2022 - Otto Hollmann <otto.hollmann@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-avro
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-avro
Version: 1.11.1
@@ -26,6 +25,8 @@ License: Apache-2.0
Group: Development/Languages/Python
URL: https://avro.apache.org/
Source: https://files.pythonhosted.org/packages/source/a/avro/avro-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: py311.patch gh#apache/avro#1961
Patch: py311.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -43,7 +44,7 @@ Apache Avro is a serialization and RPC framework.
This package contains the python implementation of Avro.
%prep
%setup -q -n avro-%{version}
%autosetup -p1 -n avro-%{version}
sed -i '1{\@^#!/usr/bin/env python@d}' avro/*.py avro/tether/*.py avro/test/*.py
%build