From 35d7aa7c77cf559b1c15212389374bd3fb949d2e Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Feb 23 2020 21:53:32 +0000 Subject: Add patch for Python39 compatibility. --- diff --git a/demjson_2.2.4_py39.patch b/demjson_2.2.4_py39.patch new file mode 100644 index 0000000..202d374 --- /dev/null +++ b/demjson_2.2.4_py39.patch @@ -0,0 +1,16 @@ +diff --git a/test/test_demjson.py b/test/test_demjson.py +index a52e667..94d9f55 100644 +--- a/test/test_demjson.py ++++ b/test/test_demjson.py +@@ -115,7 +115,10 @@ try: + except ImportError: + # Python 3 has no UserDict. MutableMapping is close, but must + # supply own __iter__() and __len__() methods. +- dict_mixin = collections.MutableMapping ++ try: ++ dict_mixin = collections.abc.MutableMapping ++ except AttributeError: ++ dict_mixin = collections.MutableMapping + + # A class that behaves like a dict, but is not a subclass of dict + class LetterOrdDict(dict_mixin): diff --git a/python-demjson.spec b/python-demjson.spec index 9c8db4e..06b6f48 100644 --- a/python-demjson.spec +++ b/python-demjson.spec @@ -2,11 +2,12 @@ Name: python-%{srcname} Version: 2.2.4 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Python JSON module and lint checker License: LGPLv3+ URL: http://deron.meranda.us/python/%{srcname}/ Source0: http://deron.meranda.us/python/%{srcname}/dist/%{srcname}-%{version}.tar.gz +Patch0: demjson_2.2.4_py39.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -33,7 +34,7 @@ Summary: Python JSON module and lint checker %prep -%autosetup -n %{srcname}-%{version} +%autosetup -n %{srcname}-%{version} -p1 %build @@ -66,6 +67,9 @@ popd %changelog +* Sun Feb 23 2020 Thomas Moschny - 2.2.4-18 +- Add patch for Python39 compatibility. + * Thu Jan 30 2020 Fedora Release Engineering - 2.2.4-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild