Date: Thursday, April 6, 2023 @ 21:52:56 Author: dvzrv Revision: 1440322
upgpkg: python-anyjson 0.3.3-18: Rebuild to turn script into python3. Adapt patch to turn script into python3 instead of relying on deprecated 2to3. Modified: python-anyjson/trunk/PKGBUILD python-anyjson/trunk/anyjson-0.3.3-python3.11.patch --------------------------------+ PKGBUILD | 6 ++-- anyjson-0.3.3-python3.11.patch | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-04-06 21:43:12 UTC (rev 1440321) +++ PKGBUILD 2023-04-06 21:52:56 UTC (rev 1440322) @@ -5,7 +5,7 @@ _pypiname=anyjson pkgname=python-$_pypiname pkgver=0.3.3 -pkgrel=17 +pkgrel=18 pkgdesc="Wraps the best available JSON implementation available in a common interface" arch=(any) url="https://pypi.python.org/pypi/$_pypiname" @@ -17,9 +17,9 @@ $_pypiname-$pkgver-python3.11.patch ) sha256sums=('37812d863c9ad3e35c0734c42e0bf0320ce8c3bed82cd20ad54cb34d158157ba' - '7123bebae5ea24f7e7032f0bfaf7d05a055dd21ad3047ee913eb3351ebbc6440') + '5b7867c0b633ffdc0e73361d6bec7ef0707229dc899bd9e40036637067d4f2f7') b2sums=('196596b832bddf7969fa9f77f7b78e37bf7fbc93dacb2790615555072b1b504b70d43e50bd968969abe92b6503b79d392f344b72b663fc3be700a0e4053c278f' - 'a8c58c6f24bedf9f5b1707cf6cf212ebba3b1eff5884e86b96b899e63c73a4c45c7bb7d0c943d64d1cb3c6de8915adc26e9a61a77a7cc866a942c89437031f17') + '0a18b3ba23ee3cbbd0a109b4ef3607c5034eee3472630abd7fcb1068e3cd73bf24be5251bc0297a49820b3377e4662a0ec293385f085b9a000ea797d022e9b94') prepare() { patch -Np1 -d $_pypiname-$pkgver -i ../$_pypiname-$pkgver-python3.11.patch Modified: anyjson-0.3.3-python3.11.patch =================================================================== --- anyjson-0.3.3-python3.11.patch 2023-04-06 21:43:12 UTC (rev 1440321) +++ anyjson-0.3.3-python3.11.patch 2023-04-06 21:52:56 UTC (rev 1440322) @@ -1,3 +1,53 @@ +diff -ruN a/anyjson/__init__.py b/anyjson/__init__.py +--- a/anyjson/__init__.py 2012-06-22 01:08:51.000000000 +0200 ++++ b/anyjson/__init__.py 2023-04-06 23:50:40.210072875 +0200 +@@ -64,9 +64,9 @@ + self._encode_error = modinfo["encerror"] + self._decode_error = modinfo["decerror"] + +- if isinstance(modinfo["encerror"], basestring): ++ if isinstance(modinfo["encerror"], str): + self._encode_error = getattr(module, modinfo["encerror"]) +- if isinstance(modinfo["decerror"], basestring): ++ if isinstance(modinfo["decerror"], str): + self._decode_error = getattr(module, modinfo["decerror"]) + + self.name = modinfo["modname"] +@@ -85,8 +85,8 @@ + TypeError if the object could not be serialized.""" + try: + return self._encode(data) +- except self._encode_error, exc: +- raise TypeError, TypeError(*exc.args), sys.exc_info()[2] ++ except self._encode_error as exc: ++ raise TypeError(TypeError(*exc.args)).with_traceback(sys.exc_info()[2]) + serialize = dumps + + def loads(self, s): +@@ -94,11 +94,11 @@ + ValueError if the string could not be parsed.""" + # uses StringIO to support buffer objects. + try: +- if self._filedecode and not isinstance(s, basestring): ++ if self._filedecode and not isinstance(s, str): + return self._filedecode(StringIO(s)) + return self._decode(s) +- except self._decode_error, exc: +- raise ValueError, ValueError(*exc.args), sys.exc_info()[2] ++ except self._decode_error as exc: ++ raise ValueError(ValueError(*exc.args)).with_traceback(sys.exc_info()[2]) + deserialize = loads + + +@@ -117,7 +117,7 @@ + # 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) +- print "Running anyjson as a stand alone script is not supported" ++ print("Running anyjson as a stand alone script is not supported") + sys.exit(1) + else: + for modspec in _modules: diff -ruN a/setup.py b/setup.py --- a/setup.py 2012-06-22 00:59:59.000000000 +0200 +++ b/setup.py 2023-04-06 23:40:43.050931363 +0200
