Skip to content
Snippets Groups Projects
Commit febc8ece authored by Scott Talbert's avatar Scott Talbert
Browse files

Cherry-pick upstream fix for Python 3.11 tests (Closes: #1026605)

parent a75cdaf1
No related branches found
No related tags found
No related merge requests found
python-avro (1.11.1+dfsg-2) UNRELEASED; urgency=medium
* Team upload.
* Cherry-pick upstream fix for Python 3.11 tests (Closes: #1026605)
-- Scott Talbert <swt@techie.net> Thu, 29 Dec 2022 16:55:09 -0500
python-avro (1.11.1+dfsg-1) unstable; urgency=medium
* Team upload.
......
From 432f073c3cfb8ac7edb2793b797ab855c5a978dd Mon Sep 17 00:00:00 2001
From: Martin Grigorov <martin-g@users.noreply.github.com>
Date: Mon, 14 Nov 2022 13:41:05 +0200
Subject: [PATCH] AVRO-3672: Add CI testing for Python 3.11 (#1961)
* AVRO-3672: Add CI testing for Python 3.11
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
* AVRO-3672: Fix setuptools warning
/home/runner/work/avro/avro/lang/py/.tox/build/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
* AVRO-3672: Override __str__ to return the Enum's value
It seems Python 3.11 changed its toString() for classes inheriting (str,
Enum).
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
* AVRO-3672: Fix formatting
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
---
.github/workflows/test-lang-py.yml | 2 ++
lang/py/avro/compatibility.py | 3 +++
lang/py/setup.cfg | 3 ++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/test-lang-py.yml b/.github/workflows/test-lang-py.yml
index 4b67a751c1..452251b88d 100644
--- a/.github/workflows/test-lang-py.yml
+++ b/.github/workflows/test-lang-py.yml
@@ -40,6 +40,7 @@ jobs:
fail-fast: false
matrix:
python:
+ - '3.11'
- '3.10'
- '3.9'
- '3.8'
@@ -86,6 +87,7 @@ jobs:
fail-fast: false
matrix:
python:
+ - '3.11'
- '3.10'
- '3.9'
- '3.8'
diff --git a/lang/py/avro/compatibility.py b/lang/py/avro/compatibility.py
index 9aefc00758..6343003bd4 100644
--- a/lang/py/avro/compatibility.py
+++ b/lang/py/avro/compatibility.py
@@ -50,6 +50,9 @@ class SchemaType(str, Enum):
STRING = "string"
UNION = "union"
+ def __str__(self):
+ return self.value
+
class SchemaCompatibilityType(Enum):
compatible = "compatible"
diff --git a/lang/py/setup.cfg b/lang/py/setup.cfg
index adbeb0ff85..ad50a763da 100644
--- a/lang/py/setup.cfg
+++ b/lang/py/setup.cfg
@@ -29,7 +29,7 @@ keywords =
author = Apache Avro
author_email = dev@avro.apache.org
url = https://avro.apache.org/
-license_file = avro/LICENSE
+license_files = avro/LICENSE
license = Apache License 2.0
classifiers =
License :: OSI Approved :: Apache Software License
@@ -38,6 +38,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
+ Programming Language :: Python :: 3.11
Development Status :: 5 - Production/Stable
[bdist_wheel]
skip_online_tests.patch
432f073c3cfb8ac7edb2793b797ab855c5a978dd.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment