Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/python-six.git#831abd902393897c48e07dff35bf69fc224ca50e
This commit is contained in:
DistroBaker 2020-12-16 21:40:21 +00:00
parent 05057ebf8d
commit 7d4cdeea0b
2 changed files with 35 additions and 2 deletions

27
py310.patch Normal file
View File

@ -0,0 +1,27 @@
From a6ac88fa03735e94938693c354f28937e1e51ab7 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Mon, 14 Dec 2020 14:02:29 +0100
Subject: [PATCH] Port _SixMetaPathImporter to Python 3.10
Fixes #341.
---
six.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/six.py b/six.py
index 83f69783..d162d09c 100644
--- a/six.py
+++ b/six.py
@@ -223,6 +223,12 @@ def get_code(self, fullname):
return None
get_source = get_code # same as get_code
+ def create_module(self, spec):
+ return self.load_module(spec.name)
+
+ def exec_module(self, module):
+ pass
+
_importer = _SixMetaPathImporter(__name__)

View File

@ -16,13 +16,16 @@
Name: python-%{modname} Name: python-%{modname}
Version: 1.15.0 Version: 1.15.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: Python 2 and 3 compatibility utilities Summary: Python 2 and 3 compatibility utilities
License: MIT License: MIT
URL: https://pypi.python.org/pypi/six URL: https://pypi.python.org/pypi/six
Source0: %{pypi_source %{modname}} Source0: %{pypi_source %{modname}}
# Backported from upstream PR: https://github.com/benjaminp/six/pull/343
Patch0: py310.patch
BuildArch: noarch BuildArch: noarch
%global _description \ %global _description \
@ -67,7 +70,7 @@ Python 3 version.
%prep %prep
%autosetup -n %{modname}-%{version} %autosetup -p1 -n %{modname}-%{version}
%build %build
@ -111,6 +114,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-3 -rfsxX test_six.py
%changelog %changelog
* Mon Dec 14 2020 Lumír Balhar <lbalhar@redhat.com> - 1.15.0-3
- Fix compatibility with Python 3.10
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2 * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild