update to version 0.4.0

This commit is contained in:
wang--ge 2023-04-10 11:06:47 +08:00
parent 255a987e90
commit 749a54855b
5 changed files with 22 additions and 57 deletions

BIN
0.4.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,25 +0,0 @@
From 4571581397f0a8ff0a579c105901292cfef656e2 Mon Sep 17 00:00:00 2001
From: wu-leilei <wu18740459704@163.com>
Date: Tue, 8 Feb 2022 17:00:49 +0800
Subject: [PATCH] do not use 2to3
---
setup.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/setup.py b/setup.py
index 9fe4902..f2098e1 100644
--- a/setup.py
+++ b/setup.py
@@ -2,8 +2,6 @@ import os
import sys
extra = {}
-if sys.version_info >= (3, 0):
- extra.update(use_2to3=True)
try:
from setuptools import setup, find_packages
--
2.23.0

View File

@ -1,29 +1,17 @@
From 1a1c2a69045b7fd7a60a59e6cbc3ece0e3f8bd75 Mon Sep 17 00:00:00 2001
From: wu-leilei <wu18740459704@163.com>
Date: Tue, 8 Feb 2022 18:41:00 +0800
Subject: [PATCH] py3k
From 871ef3aa8060e8cde1d226e452fa3cd20d2dcc41 Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Mon, 10 Apr 2023 10:13:54 +0800
Subject: [PATCH] fix py3k
---
anyjson/__init__.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
anyjson/__init__.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/anyjson/__init__.py b/anyjson/__init__.py
index 1f671be..0fc9ece 100644
index 1630839..d8af338 100644
--- a/anyjson/__init__.py
+++ b/anyjson/__init__.py
@@ -23,9 +23,9 @@ if sys.version_info[0] == 3:
from io import StringIO
else:
try:
- from cStringIO import StringIO # noqa
+ from io import StringIO # noqa
except ImportError:
- from StringIO import StringIO # noqa
+ from io import StringIO # noqa
#: List of known json modules, and the names of their loads/dumps
#: methods, as well as the exceptions they throw. Exception can be either
@@ -47,7 +47,7 @@ class _JsonImplementation(object):
@@ -38,7 +38,7 @@ class _JsonImplementation(object):
"""Incapsulates a JSON implementation"""
def __init__(self, modspec):
@ -32,7 +20,7 @@ index 1f671be..0fc9ece 100644
if modinfo["modname"] == "cjson":
import warnings
@@ -64,9 +64,9 @@ class _JsonImplementation(object):
@@ -55,9 +55,9 @@ class _JsonImplementation(object):
self._encode_error = modinfo["encerror"]
self._decode_error = modinfo["decerror"]
@ -44,7 +32,7 @@ index 1f671be..0fc9ece 100644
self._decode_error = getattr(module, modinfo["decerror"])
self.name = modinfo["modname"]
@@ -85,8 +85,8 @@ class _JsonImplementation(object):
@@ -76,8 +76,8 @@ class _JsonImplementation(object):
TypeError if the object could not be serialized."""
try:
return self._encode(data)
@ -55,7 +43,7 @@ index 1f671be..0fc9ece 100644
serialize = dumps
def loads(self, s):
@@ -97,8 +97,8 @@ class _JsonImplementation(object):
@@ -88,8 +88,8 @@ class _JsonImplementation(object):
if self._filedecode and not isinstance(s, basestring):
return self._filedecode(StringIO(s))
return self._decode(s)
@ -66,7 +54,7 @@ index 1f671be..0fc9ece 100644
deserialize = loads
@@ -117,7 +117,7 @@ if __name__ == "__main__":
@@ -108,7 +108,7 @@ if __name__ == "__main__":
# We do NOT try to load a compatible module because that may throw an
# exception, which renders the package uninstallable with easy_install
# (It trys to execfile the script when installing, to make sure it works)
@ -76,5 +64,5 @@ index 1f671be..0fc9ece 100644
else:
for modspec in _modules:
--
2.23.0
2.33.0

View File

@ -1,13 +1,12 @@
%global _empty_manifest_terminate_build 0
Name: python-anyjson
Version: 0.3.3
Release: 3
Version: 0.4.0
Release: 1
Summary: Wraps the best available JSON implementation available in a common interface
License: BSD-3-Clause
URL: http://bitbucket.org/runeh/anyjson/
Source0: https://files.pythonhosted.org/packages/c3/4d/d4089e1a3dd25b46bebdb55a992b0797cff657b4477bc32ce28038fdecbc/anyjson-0.3.3.tar.gz
Patch01: fix-do-not-use-2to3.patch
Patch02: fix-py3k.patch
URL: https://github.com/catalyst/anyjson
Source0: https://github.com/catalyst/anyjson/archive/refs/tags/0.4.0.tar.gz
Patch01: fix-py3k.patch
BuildArch: noarch
@ -32,7 +31,7 @@ Anyjson loads whichever is the fastest JSON module installed and provides
a uniform API regardless of which JSON implementation is used.
%prep
%autosetup -n anyjson-0.3.3 -p1
%autosetup -n anyjson-%{version} -p1
%build
%py3_build
@ -72,6 +71,9 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
* Mon Apr 10 2023 Ge Wang <wang__ge@126.com> - 0.4.0-1
- Update to version 0.4.0
* Tue May 10 2022 wulei <wulei80@h-partners.com> - 0.3.3-3
- License compliance rectification