#1 Backport of upstream commit to add compatibility with Python 3.10
Merged 2 years ago by jujens. Opened 2 years ago by thrnciar.
rpms/ thrnciar/python-leather py310-fix  into  rawhide

file added
+40
@@ -0,0 +1,40 @@ 

+ From 5dd1d3cc82d426388c66db8e3761ca2bf99a3991 Mon Sep 17 00:00:00 2001

+ From: Brian <brian@quantrocket.com>

+ Date: Fri, 27 Mar 2020 17:08:50 -0400

+ Subject: [PATCH] import from collections.abc to suppress python 3.7 warning

+ 

+ ---

+  leather/series/base.py     | 5 ++++-

+  leather/series/category.py | 5 ++++-

+  2 files changed, 8 insertions(+), 2 deletions(-)

+ 

+ diff --git a/leather/series/base.py b/leather/series/base.py

+ index c5790e5..959e827 100644

+ --- a/leather/series/base.py

+ +++ b/leather/series/base.py

+ @@ -1,6 +1,9 @@

+  #!/usr/bin/env python

+  

+ -from collections import Iterable, Sequence, Mapping

+ +try:

+ +    from collections.abc import Iterable, Sequence, Mapping

+ +except ImportError:

+ +    from collections import Iterable, Sequence, Mapping

+  from functools import partial

+  

+  import six

+ diff --git a/leather/series/category.py b/leather/series/category.py

+ index c575308..3678377 100644

+ --- a/leather/series/category.py

+ +++ b/leather/series/category.py

+ @@ -1,6 +1,9 @@

+  #!/usr/bin/env python

+  

+ -from collections import Iterable, Sequence, Mapping

+ +try:

+ +    from collections.abc import Iterable, Sequence, Mapping

+ +except ImportError:

+ +    from collections import Iterable, Sequence, Mapping

+  from functools import partial

+  

+  import six

file modified
+3
@@ -24,6 +24,8 @@ 

  License:        MIT

  URL:            https://pypi.python.org/pypi/leather

  Source0:        https://github.com/%{project_owner}/%{github_name}/archive/%{commit}/%{github_name}-%{commit}.tar.gz

+ # Backport of upstream commit to add compatibility with Python 3.10

+ Patch98:        https://github.com/wireservice/leather/pull/98.patch

  BuildArch:      noarch

  

  %description
@@ -59,6 +61,7 @@ 

  

  %prep

  %setup -qn %{github_name}-%{commit}

+ %patch98 -p1

  # Remove shebang on non executable scripts

  sed -i '1{\@^#!/usr/bin/env python@d}' leather/*.py leather/**/*.py

  

no initial comment

Pull-Request has been merged by jujens

2 years ago
Metadata