Sun Apr 21 13:17:42 UTC 2024 I: starting to build python-demjson/trixie/i386 on jenkins on '2024-04-21 13:17' Sun Apr 21 13:17:42 UTC 2024 I: The jenkins build log is/was available at https://jenkins.debian.net/userContent/reproducible/debian/build_service/i386_5/17463/console.log Sun Apr 21 13:17:42 UTC 2024 I: Downloading source for trixie/python-demjson=2.2.4-7 --2024-04-21 13:17:42-- http://deb.debian.org/debian/pool/main/p/python-demjson/python-demjson_2.2.4-7.dsc Connecting to 46.16.76.132:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 2061 (2.0K) [text/prs.lines.tag] Saving to: ‘python-demjson_2.2.4-7.dsc’ 0K .. 100% 318M=0s 2024-04-21 13:17:42 (318 MB/s) - ‘python-demjson_2.2.4-7.dsc’ saved [2061/2061] Sun Apr 21 13:17:42 UTC 2024 I: python-demjson_2.2.4-7.dsc -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 3.0 (quilt) Source: python-demjson Binary: python3-demjson Architecture: all Version: 2.2.4-7 Maintainer: Debian Python Team Uploaders: TANIGUCHI Takaki Homepage: https://github.com/dmeranda/demjson Standards-Version: 4.6.1 Vcs-Browser: https://salsa.debian.org/python-team/packages/python-demjson Vcs-Git: https://salsa.debian.org/python-team/packages/python-demjson.git Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools, 2to3 Package-List: python3-demjson deb python optional arch=all Checksums-Sha1: 1c5d78b5616b4cc6f4d4ad35fe831bbd11aaadec 131457 python-demjson_2.2.4.orig.tar.gz c472d19c3b3592e595c21d01c341a4f14faf39d6 4612 python-demjson_2.2.4-7.debian.tar.xz Checksums-Sha256: 31de2038a0fdd9c4c11f8bf3b13fe77bc2a128307f965c8d5fb4dc6d6f6beb79 131457 python-demjson_2.2.4.orig.tar.gz 1d54b58de72691053bf26d367c3e64e1707c95a1b6d9bb2f4e923130c3593688 4612 python-demjson_2.2.4-7.debian.tar.xz Files: 8b535b073e0de95e63f83a93b98dbc48 131457 python-demjson_2.2.4.orig.tar.gz d50071b6fa7a0f4fc4ce52e1dff104d4 4612 python-demjson_2.2.4-7.debian.tar.xz -----BEGIN PGP SIGNATURE----- iQJGBAEBCAAwFiEE0kq/0SfNJVahPGx5zBSfbCil4lcFAmLPpzsSHHRha2FraUBk ZWJpYW4ub3JnAAoJEMwUn2wopeJXOPsP/2bxjM9WciSKz4E4j8x803WiARPyE2xy +vqTpdCLUBceVZi41F6e4dY3FdQFsQGtIzWQtUU/lMgqoA5XsV2mqgGI3tE4TjqB HU9wzQR5nAh9JQVR99hSA7TIQjwxlDLvUl+AATVVY0/tZz7vIpZ8ptuU9N7PvbJm oAreEMfrWKYhxerLz/lWarUUmsLa+79ls8wdflC1CIHrPpAXZPEqM+BI8YD2TDU1 xoZBKnGjES/ANtXdaUdXzGWJkGKvEXNBxqrOMGqNZ28KtbBiCa/RcEBcg8c7rAvC y2EfPkldwIobMql/gYfmBBsUSiplDQyMmVoDKQT/mC3S8RAjSml7gGFqBMGtF185 KjdQA1+19tSzPCjgBjIycSkuorkhHYKyzQl7WmZZ+B4CyxyIAqvarr9NaIWUHSAm GcyqByvFRy2sgQt6H6phDBMUUYsuooT7jV9h2E/FwUBbUKtj7bQoc2xdVbG7Qq/Y ECQApfnobgcBwJd3mytQcREhTD8/eKjXUrTG6NIBbqE07gOpAWliGxk5Ke9wV45R K8hV/5h5sH9eLlRNbidqZ/6t3dZXTEritF3ILD+W30Pr1eHZEZmwusNpgtpyb74f Pjzn0l07bNmsVx+d8AbZl/EejQa1uDkVe3QiETo/cYzZpeSnEUxUsRWYMZ4K3xe1 AJF4DgsG+P37 =9gjB -----END PGP SIGNATURE----- Sun Apr 21 13:17:42 UTC 2024 I: Checking whether the package is not for us Sun Apr 21 13:17:42 UTC 2024 I: Starting 1st build on remote node ionos12-i386.debian.net. Sun Apr 21 13:17:42 UTC 2024 I: Preparing to do remote build '1' on ionos12-i386.debian.net. Sun Apr 21 13:18:36 UTC 2024 I: Deleting $TMPDIR on ionos12-i386.debian.net. I: pbuilder: network access will be disabled during build I: Current time: Sun Apr 21 01:17:44 -12 2024 I: pbuilder-time-stamp: 1713705464 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: using eatmydata during job I: Copying source file I: copying [python-demjson_2.2.4-7.dsc] I: copying [./python-demjson_2.2.4.orig.tar.gz] I: copying [./python-demjson_2.2.4-7.debian.tar.xz] I: Extracting source gpgv: Signature made Thu Jul 14 05:18:51 2022 gpgv: using RSA key D24ABFD127CD2556A13C6C79CC149F6C28A5E257 gpgv: issuer "takaki@debian.org" gpgv: Can't check signature: No public key dpkg-source: warning: cannot verify inline signature for ./python-demjson_2.2.4-7.dsc: no acceptable signature found dpkg-source: info: extracting python-demjson in python-demjson-2.2.4 dpkg-source: info: unpacking python-demjson_2.2.4.orig.tar.gz dpkg-source: info: unpacking python-demjson_2.2.4-7.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying dont-use-2to3.patch I: using fakeroot in build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/42272/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='i386' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=11 ' DISTRIBUTION='trixie' HOME='/root' HOST_ARCH='i386' IFS=' ' INVOCATION_ID='0de5cd47dc2945f7b3645c08ea0e5093' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' LD_LIBRARY_PATH='/usr/lib/libeatmydata' LD_PRELOAD='libeatmydata.so' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='42272' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/pbuilderrc_rPhl --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/b1 --logfile b1/build.log python-demjson_2.2.4-7.dsc' SUDO_GID='112' SUDO_UID='107' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' http_proxy='http://46.16.76.132:3128' I: uname -a Linux ionos12-i386 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Apr 21 07:12 /bin -> usr/bin I: user script /srv/workspace/pbuilder/42272/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: i386 Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools, 2to3 dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 19874 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 13); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on dh-python; however: Package dh-python is not installed. pbuilder-satisfydepends-dummy depends on python3-all; however: Package python3-all is not installed. pbuilder-satisfydepends-dummy depends on python3-setuptools; however: Package python3-setuptools is not installed. pbuilder-satisfydepends-dummy depends on 2to3; however: Package 2to3 is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: 2to3{a} autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} debhelper{a} dh-autoreconf{a} dh-python{a} dh-strip-nondeterminism{a} dwz{a} file{a} gettext{a} gettext-base{a} groff-base{a} intltool-debian{a} libarchive-zip-perl{a} libdebhelper-perl{a} libelf1{a} libexpat1{a} libfile-stripnondeterminism-perl{a} libicu72{a} libmagic-mgc{a} libmagic1{a} libpipeline1{a} libpython3-stdlib{a} libpython3.11-minimal{a} libpython3.11-stdlib{a} libpython3.12-minimal{a} libpython3.12-stdlib{a} libreadline8{a} libsub-override-perl{a} libtool{a} libuchardet0{a} libxml2{a} m4{a} man-db{a} media-types{a} netbase{a} po-debconf{a} python3{a} python3-all{a} python3-distutils{a} python3-lib2to3{a} python3-minimal{a} python3-pkg-resources{a} python3-setuptools{a} python3.11{a} python3.11-minimal{a} python3.12{a} python3.12-minimal{a} readline-common{a} sensible-utils{a} tzdata{a} The following packages are RECOMMENDED but will NOT be installed: ca-certificates curl libarchive-cpio-perl libltdl-dev libmail-sendmail-perl lynx wget 0 packages upgraded, 54 newly installed, 0 to remove and 0 not upgraded. Need to get 32.0 MB of archives. After unpacking 125 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian trixie/main i386 libpython3.11-minimal i386 3.11.8-1 [817 kB] Get: 2 http://deb.debian.org/debian trixie/main i386 libexpat1 i386 2.6.2-1 [107 kB] Get: 3 http://deb.debian.org/debian trixie/main i386 python3.11-minimal i386 3.11.8-1 [2087 kB] Get: 4 http://deb.debian.org/debian trixie/main i386 python3-minimal i386 3.11.6-1 [26.2 kB] Get: 5 http://deb.debian.org/debian trixie/main i386 media-types all 10.1.0 [26.9 kB] Get: 6 http://deb.debian.org/debian trixie/main i386 netbase all 6.4 [12.8 kB] Get: 7 http://deb.debian.org/debian trixie/main i386 tzdata all 2024a-1 [255 kB] Get: 8 http://deb.debian.org/debian trixie/main i386 readline-common all 8.2-3 [69.1 kB] Get: 9 http://deb.debian.org/debian trixie/main i386 libreadline8 i386 8.2-3+b1 [171 kB] Get: 10 http://deb.debian.org/debian trixie/main i386 libpython3.11-stdlib i386 3.11.8-1 [1821 kB] Get: 11 http://deb.debian.org/debian trixie/main i386 python3.11 i386 3.11.8-1 [597 kB] Get: 12 http://deb.debian.org/debian trixie/main i386 libpython3-stdlib i386 3.11.6-1 [9224 B] Get: 13 http://deb.debian.org/debian trixie/main i386 python3 i386 3.11.6-1 [26.2 kB] Get: 14 http://deb.debian.org/debian trixie/main i386 libpython3.12-minimal i386 3.12.2-1 [807 kB] Get: 15 http://deb.debian.org/debian trixie/main i386 python3.12-minimal i386 3.12.2-1 [2244 kB] Get: 16 http://deb.debian.org/debian trixie/main i386 sensible-utils all 0.0.22 [22.4 kB] Get: 17 http://deb.debian.org/debian trixie/main i386 libmagic-mgc i386 1:5.45-2+b1 [314 kB] Get: 18 http://deb.debian.org/debian trixie/main i386 libmagic1 i386 1:5.45-2+b1 [114 kB] Get: 19 http://deb.debian.org/debian trixie/main i386 file i386 1:5.45-2+b1 [43.0 kB] Get: 20 http://deb.debian.org/debian trixie/main i386 gettext-base i386 0.21-14+b1 [162 kB] Get: 21 http://deb.debian.org/debian trixie/main i386 libuchardet0 i386 0.0.8-1+b1 [69.1 kB] Get: 22 http://deb.debian.org/debian trixie/main i386 groff-base i386 1.23.0-3 [1195 kB] Get: 23 http://deb.debian.org/debian trixie/main i386 bsdextrautils i386 2.39.3-6 [93.3 kB] Get: 24 http://deb.debian.org/debian trixie/main i386 libpipeline1 i386 1.5.7-2 [39.7 kB] Get: 25 http://deb.debian.org/debian trixie/main i386 man-db i386 2.12.0-3 [1413 kB] Get: 26 http://deb.debian.org/debian trixie/main i386 python3-lib2to3 all 3.11.5-1 [77.5 kB] Get: 27 http://deb.debian.org/debian trixie/main i386 2to3 all 3.11.6-1 [10.2 kB] Get: 28 http://deb.debian.org/debian trixie/main i386 m4 i386 1.4.19-4 [293 kB] Get: 29 http://deb.debian.org/debian trixie/main i386 autoconf all 2.71-3 [332 kB] Get: 30 http://deb.debian.org/debian trixie/main i386 autotools-dev all 20220109.1 [51.6 kB] Get: 31 http://deb.debian.org/debian trixie/main i386 automake all 1:1.16.5-1.3 [823 kB] Get: 32 http://deb.debian.org/debian trixie/main i386 autopoint all 0.21-14 [496 kB] Get: 33 http://deb.debian.org/debian trixie/main i386 libdebhelper-perl all 13.15.3 [88.0 kB] Get: 34 http://deb.debian.org/debian trixie/main i386 libtool all 2.4.7-7 [517 kB] Get: 35 http://deb.debian.org/debian trixie/main i386 dh-autoreconf all 20 [17.1 kB] Get: 36 http://deb.debian.org/debian trixie/main i386 libarchive-zip-perl all 1.68-1 [104 kB] Get: 37 http://deb.debian.org/debian trixie/main i386 libsub-override-perl all 0.10-1 [10.6 kB] Get: 38 http://deb.debian.org/debian trixie/main i386 libfile-stripnondeterminism-perl all 1.13.1-1 [19.4 kB] Get: 39 http://deb.debian.org/debian trixie/main i386 dh-strip-nondeterminism all 1.13.1-1 [8620 B] Get: 40 http://deb.debian.org/debian trixie/main i386 libelf1 i386 0.190-1+b1 [182 kB] Get: 41 http://deb.debian.org/debian trixie/main i386 dwz i386 0.15-1 [118 kB] Get: 42 http://deb.debian.org/debian trixie/main i386 libicu72 i386 72.1-4+b1 [9549 kB] Get: 43 http://deb.debian.org/debian trixie/main i386 libxml2 i386 2.9.14+dfsg-1.3+b2 [727 kB] Get: 44 http://deb.debian.org/debian trixie/main i386 gettext i386 0.21-14+b1 [1311 kB] Get: 45 http://deb.debian.org/debian trixie/main i386 intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 46 http://deb.debian.org/debian trixie/main i386 po-debconf all 1.0.21+nmu1 [248 kB] Get: 47 http://deb.debian.org/debian trixie/main i386 debhelper all 13.15.3 [901 kB] Get: 48 http://deb.debian.org/debian trixie/main i386 python3-pkg-resources all 68.1.2-2 [241 kB] Get: 49 http://deb.debian.org/debian trixie/main i386 python3-distutils all 3.11.5-1 [131 kB] Get: 50 http://deb.debian.org/debian trixie/main i386 python3-setuptools all 68.1.2-2 [468 kB] Get: 51 http://deb.debian.org/debian trixie/main i386 dh-python all 6.20240401 [107 kB] Get: 52 http://deb.debian.org/debian trixie/main i386 libpython3.12-stdlib i386 3.12.2-1 [1927 kB] Get: 53 http://deb.debian.org/debian trixie/main i386 python3.12 i386 3.12.2-1 [653 kB] Get: 54 http://deb.debian.org/debian trixie/main i386 python3-all i386 3.11.6-1 [1060 B] Fetched 32.0 MB in 1s (58.4 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.11-minimal:i386. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19874 files and directories currently installed.) Preparing to unpack .../libpython3.11-minimal_3.11.8-1_i386.deb ... Unpacking libpython3.11-minimal:i386 (3.11.8-1) ... Selecting previously unselected package libexpat1:i386. Preparing to unpack .../libexpat1_2.6.2-1_i386.deb ... Unpacking libexpat1:i386 (2.6.2-1) ... Selecting previously unselected package python3.11-minimal. Preparing to unpack .../python3.11-minimal_3.11.8-1_i386.deb ... Unpacking python3.11-minimal (3.11.8-1) ... Setting up libpython3.11-minimal:i386 (3.11.8-1) ... Setting up libexpat1:i386 (2.6.2-1) ... Setting up python3.11-minimal (3.11.8-1) ... Selecting previously unselected package python3-minimal. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 20190 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.11.6-1_i386.deb ... Unpacking python3-minimal (3.11.6-1) ... Selecting previously unselected package media-types. Preparing to unpack .../1-media-types_10.1.0_all.deb ... Unpacking media-types (10.1.0) ... Selecting previously unselected package netbase. Preparing to unpack .../2-netbase_6.4_all.deb ... Unpacking netbase (6.4) ... Selecting previously unselected package tzdata. Preparing to unpack .../3-tzdata_2024a-1_all.deb ... Unpacking tzdata (2024a-1) ... Selecting previously unselected package readline-common. Preparing to unpack .../4-readline-common_8.2-3_all.deb ... Unpacking readline-common (8.2-3) ... Selecting previously unselected package libreadline8:i386. Preparing to unpack .../5-libreadline8_8.2-3+b1_i386.deb ... Unpacking libreadline8:i386 (8.2-3+b1) ... Selecting previously unselected package libpython3.11-stdlib:i386. Preparing to unpack .../6-libpython3.11-stdlib_3.11.8-1_i386.deb ... Unpacking libpython3.11-stdlib:i386 (3.11.8-1) ... Selecting previously unselected package python3.11. Preparing to unpack .../7-python3.11_3.11.8-1_i386.deb ... Unpacking python3.11 (3.11.8-1) ... Selecting previously unselected package libpython3-stdlib:i386. Preparing to unpack .../8-libpython3-stdlib_3.11.6-1_i386.deb ... Unpacking libpython3-stdlib:i386 (3.11.6-1) ... Setting up python3-minimal (3.11.6-1) ... Selecting previously unselected package python3. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 21178 files and directories currently installed.) Preparing to unpack .../00-python3_3.11.6-1_i386.deb ... Unpacking python3 (3.11.6-1) ... Selecting previously unselected package libpython3.12-minimal:i386. Preparing to unpack .../01-libpython3.12-minimal_3.12.2-1_i386.deb ... Unpacking libpython3.12-minimal:i386 (3.12.2-1) ... Selecting previously unselected package python3.12-minimal. Preparing to unpack .../02-python3.12-minimal_3.12.2-1_i386.deb ... Unpacking python3.12-minimal (3.12.2-1) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../03-sensible-utils_0.0.22_all.deb ... Unpacking sensible-utils (0.0.22) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../04-libmagic-mgc_1%3a5.45-2+b1_i386.deb ... Unpacking libmagic-mgc (1:5.45-2+b1) ... Selecting previously unselected package libmagic1:i386. Preparing to unpack .../05-libmagic1_1%3a5.45-2+b1_i386.deb ... Unpacking libmagic1:i386 (1:5.45-2+b1) ... Selecting previously unselected package file. Preparing to unpack .../06-file_1%3a5.45-2+b1_i386.deb ... Unpacking file (1:5.45-2+b1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../07-gettext-base_0.21-14+b1_i386.deb ... Unpacking gettext-base (0.21-14+b1) ... Selecting previously unselected package libuchardet0:i386. Preparing to unpack .../08-libuchardet0_0.0.8-1+b1_i386.deb ... Unpacking libuchardet0:i386 (0.0.8-1+b1) ... Selecting previously unselected package groff-base. Preparing to unpack .../09-groff-base_1.23.0-3_i386.deb ... Unpacking groff-base (1.23.0-3) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../10-bsdextrautils_2.39.3-6_i386.deb ... Unpacking bsdextrautils (2.39.3-6) ... Selecting previously unselected package libpipeline1:i386. Preparing to unpack .../11-libpipeline1_1.5.7-2_i386.deb ... Unpacking libpipeline1:i386 (1.5.7-2) ... Selecting previously unselected package man-db. Preparing to unpack .../12-man-db_2.12.0-3_i386.deb ... Unpacking man-db (2.12.0-3) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../13-python3-lib2to3_3.11.5-1_all.deb ... Unpacking python3-lib2to3 (3.11.5-1) ... Selecting previously unselected package 2to3. Preparing to unpack .../14-2to3_3.11.6-1_all.deb ... Unpacking 2to3 (3.11.6-1) ... Selecting previously unselected package m4. Preparing to unpack .../15-m4_1.4.19-4_i386.deb ... Unpacking m4 (1.4.19-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../16-autoconf_2.71-3_all.deb ... Unpacking autoconf (2.71-3) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../17-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../18-automake_1%3a1.16.5-1.3_all.deb ... Unpacking automake (1:1.16.5-1.3) ... Selecting previously unselected package autopoint. Preparing to unpack .../19-autopoint_0.21-14_all.deb ... Unpacking autopoint (0.21-14) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../20-libdebhelper-perl_13.15.3_all.deb ... Unpacking libdebhelper-perl (13.15.3) ... Selecting previously unselected package libtool. Preparing to unpack .../21-libtool_2.4.7-7_all.deb ... Unpacking libtool (2.4.7-7) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../22-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../23-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libsub-override-perl. Preparing to unpack .../24-libsub-override-perl_0.10-1_all.deb ... Unpacking libsub-override-perl (0.10-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../25-libfile-stripnondeterminism-perl_1.13.1-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.13.1-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../26-dh-strip-nondeterminism_1.13.1-1_all.deb ... Unpacking dh-strip-nondeterminism (1.13.1-1) ... Selecting previously unselected package libelf1:i386. Preparing to unpack .../27-libelf1_0.190-1+b1_i386.deb ... Unpacking libelf1:i386 (0.190-1+b1) ... Selecting previously unselected package dwz. Preparing to unpack .../28-dwz_0.15-1_i386.deb ... Unpacking dwz (0.15-1) ... Selecting previously unselected package libicu72:i386. Preparing to unpack .../29-libicu72_72.1-4+b1_i386.deb ... Unpacking libicu72:i386 (72.1-4+b1) ... Selecting previously unselected package libxml2:i386. Preparing to unpack .../30-libxml2_2.9.14+dfsg-1.3+b2_i386.deb ... Unpacking libxml2:i386 (2.9.14+dfsg-1.3+b2) ... Selecting previously unselected package gettext. Preparing to unpack .../31-gettext_0.21-14+b1_i386.deb ... Unpacking gettext (0.21-14+b1) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../32-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../33-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../34-debhelper_13.15.3_all.deb ... Unpacking debhelper (13.15.3) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../35-python3-pkg-resources_68.1.2-2_all.deb ... Unpacking python3-pkg-resources (68.1.2-2) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../36-python3-distutils_3.11.5-1_all.deb ... Unpacking python3-distutils (3.11.5-1) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../37-python3-setuptools_68.1.2-2_all.deb ... Unpacking python3-setuptools (68.1.2-2) ... Selecting previously unselected package dh-python. Preparing to unpack .../38-dh-python_6.20240401_all.deb ... Unpacking dh-python (6.20240401) ... Selecting previously unselected package libpython3.12-stdlib:i386. Preparing to unpack .../39-libpython3.12-stdlib_3.12.2-1_i386.deb ... Unpacking libpython3.12-stdlib:i386 (3.12.2-1) ... Selecting previously unselected package python3.12. Preparing to unpack .../40-python3.12_3.12.2-1_i386.deb ... Unpacking python3.12 (3.12.2-1) ... Selecting previously unselected package python3-all. Preparing to unpack .../41-python3-all_3.11.6-1_i386.deb ... Unpacking python3-all (3.11.6-1) ... Setting up media-types (10.1.0) ... Setting up libpipeline1:i386 (1.5.7-2) ... Setting up libicu72:i386 (72.1-4+b1) ... Setting up bsdextrautils (2.39.3-6) ... Setting up libmagic-mgc (1:5.45-2+b1) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libdebhelper-perl (13.15.3) ... Setting up libpython3.12-minimal:i386 (3.12.2-1) ... Setting up libmagic1:i386 (1:5.45-2+b1) ... Setting up gettext-base (0.21-14+b1) ... Setting up m4 (1.4.19-4) ... Setting up file (1:5.45-2+b1) ... Setting up tzdata (2024a-1) ... Current default time zone: 'Etc/UTC' Local time is now: Sun Apr 21 13:18:09 UTC 2024. Universal Time is now: Sun Apr 21 13:18:09 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... Setting up autopoint (0.21-14) ... Setting up autoconf (2.71-3) ... Setting up sensible-utils (0.0.22) ... Setting up libuchardet0:i386 (0.0.8-1+b1) ... Setting up libsub-override-perl (0.10-1) ... Setting up netbase (6.4) ... Setting up libelf1:i386 (0.190-1+b1) ... Setting up readline-common (8.2-3) ... Setting up libxml2:i386 (2.9.14+dfsg-1.3+b2) ... Setting up automake (1:1.16.5-1.3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up libfile-stripnondeterminism-perl (1.13.1-1) ... Setting up python3.12-minimal (3.12.2-1) ... Setting up gettext (0.21-14+b1) ... Setting up libtool (2.4.7-7) ... Setting up libreadline8:i386 (8.2-3+b1) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up dh-autoreconf (20) ... Setting up dh-strip-nondeterminism (1.13.1-1) ... Setting up dwz (0.15-1) ... Setting up groff-base (1.23.0-3) ... Setting up libpython3.12-stdlib:i386 (3.12.2-1) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up libpython3.11-stdlib:i386 (3.11.8-1) ... Setting up python3.12 (3.12.2-1) ... Setting up man-db (2.12.0-3) ... Not building database; man-db/auto-update is not 'true'. Setting up libpython3-stdlib:i386 (3.11.6-1) ... Setting up python3.11 (3.11.8-1) ... Setting up debhelper (13.15.3) ... Setting up python3 (3.11.6-1) ... Setting up python3-lib2to3 (3.11.5-1) ... Setting up python3-pkg-resources (68.1.2-2) ... Setting up python3-distutils (3.11.5-1) ... python3.12: can't get files for byte-compilation Setting up python3-setuptools (68.1.2-2) ... Setting up python3-all (3.11.6-1) ... Setting up 2to3 (3.11.6-1) ... Setting up dh-python (6.20240401) ... Processing triggers for libc-bin (2.37-15) ... Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps Reading package lists... Building dependency tree... Reading state information... fakeroot is already the newest version (1.33-1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package I: Running cd /build/reproducible-path/python-demjson-2.2.4/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../python-demjson_2.2.4-7_source.changes dpkg-buildpackage: info: source package python-demjson dpkg-buildpackage: info: source version 2.2.4-7 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by TANIGUCHI Takaki dpkg-source --before-build . dpkg-buildpackage: info: host architecture i386 fakeroot debian/rules clean dh clean --with python3 --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild I: pybuild base:311: python3.12 setup.py clean running clean removing '/build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.12_demjson/build' (and everything under it) 'build/bdist.linux-i686' does not exist -- can't clean it 'build/scripts-3.12' does not exist -- can't clean it I: pybuild base:311: python3.11 setup.py clean running clean removing '/build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.11_demjson/build' (and everything under it) 'build/bdist.linux-i686' does not exist -- can't clean it 'build/scripts-3.11' does not exist -- can't clean it dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules build dh build --with python3 --buildsystem=pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild I: pybuild base:311: python3.12 setup.py config running config I: pybuild base:311: python3.11 setup.py config running config debian/rules override_dh_auto_build make[1]: Entering directory '/build/reproducible-path/python-demjson-2.2.4' 2to3 -w . /usr/bin/2to3:3: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+ from lib2to3.main import main RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./demjson.py --- ./demjson.py (original) +++ ./demjson.py (refactored) @@ -364,7 +364,7 @@ return self.__module__ + '.undefined' def __str__(self): return 'undefined' - def __nonzero__(self): + def __bool__(self): return False undefined = _undefined_class() syntax_error = _undefined_class() # same as undefined, but has separate identity @@ -642,7 +642,7 @@ # ---------------------------------------------------------------------- # Integers -class json_int( (1L).__class__ ): # Have to specify base this way to satisfy 2to3 +class json_int( (1).__class__ ): # Have to specify base this way to satisfy 2to3 """A subclass of the Python int/long that remembers its format (hex,octal,etc). Initialize it the same as an int, but also accepts an additional keyword @@ -807,9 +807,9 @@ return bytes(f) else: try: - import cStringIO as sio + import io as sio except ImportError: - import StringIO as sio + import io as sio f = sio.StringIO() write = f.write tobytes = f.getvalue @@ -924,7 +924,7 @@ if errors == 'strict': raise UnicodeDecodeError('utf32',obj,i,i+4,'Invalid code point U+%04X' % n) elif errors == 'replace': - chars.append( unichr(0xFFFD) ) + chars.append( chr(0xFFFD) ) elif errors == 'backslashreplace': if n > 0xffff: esc = "\\u%04x" % (n,) @@ -940,7 +940,7 @@ pass else: chars.append( helpers.safe_unichr(n) ) - return (u''.join( chars ), num_bytes) + return (''.join( chars ), num_bytes) @staticmethod def utf32le_decode( obj, errors='strict' ): @@ -960,11 +960,11 @@ def _make_unsafe_string_chars(): import unicodedata unsafe = [] - for c in [unichr(i) for i in range(0x100)]: - if c == u'"' or c == u'\\' \ + for c in [chr(i) for i in range(0x100)]: + if c == '"' or c == '\\' \ or unicodedata.category( c ) in ['Cc','Cf','Zl','Zp']: unsafe.append( c ) - return u''.join( unsafe ) + return ''.join( unsafe ) class helpers(object): """A set of utility functions.""" @@ -1029,19 +1029,19 @@ # Narrow-Unicode python, construct a UTF-16 surrogate pair. w1, w2 = helpers.make_surrogate_pair( codepoint ) if w2 is None: - c = unichr(w1) + c = chr(w1) else: - c = unichr(w1) + unichr(w2) - else: - c = unichr(codepoint) + c = chr(w1) + chr(w2) + else: + c = chr(codepoint) return c @staticmethod def char_is_unicode_ws( c ): """Determines if the given character is a Unicode space character""" - if not isinstance(c,unicode): - c = unicode(c) - if c in u' \t\n\r\f\v': + if not isinstance(c,str): + c = str(c) + if c in ' \t\n\r\f\v': return True import unicodedata return unicodedata.category(c) == 'Zs' @@ -1058,7 +1058,7 @@ Unicode characters in the Zl or Zp categories. """ - return c in u'\r\n\u2028\u2029' + return c in '\r\n\u2028\u2029' @staticmethod def char_is_identifier_leader( c ): @@ -1072,7 +1072,7 @@ """Determines if the character may be part of a JavaScript identifier. """ - return c.isalnum() or c in u'_$\u200c\u200d' + return c.isalnum() or c in '_$\u200c\u200d' @staticmethod def extend_and_flatten_list_with_sep( orig_seq, extension_seq, separator='' ): @@ -1101,13 +1101,13 @@ """ import unicodedata - txt2 = filter( lambda c: unicodedata.category(unicode(c)) != 'Cf', txt ) + txt2 = [c for c in txt if unicodedata.category(str(c)) != 'Cf'] # 2to3 NOTE: The following is needed to work around a broken # Python3 conversion in which filter() will be transformed # into a list rather than a string. - if not isinstance(txt2,basestring): - txt2 = u''.join(txt2) + if not isinstance(txt2,str): + txt2 = ''.join(txt2) return txt2 @staticmethod @@ -1151,7 +1151,7 @@ ords = [] for i in range(0, min(len(s),4)): x = s[i] - if isinstance(x, basestring): + if isinstance(x, str): x = ord(x) ords.append( x ) @@ -1177,7 +1177,7 @@ d = ords[3] z = s[-1] - if isinstance(z, basestring): + if isinstance(z, str): z = ord(z) if bom4 and ( (hasattr(codecs,'BOM_UTF32_LE') and bom4 == codecs.BOM_UTF32_LE) or @@ -1235,7 +1235,7 @@ the returned value. """ - if isinstance(txt, unicode): + if isinstance(txt, str): res = _namedtuple('DecodedString',['string','codec','bom'])( txt, None, None ) else: if encoding is None or encoding == 'auto': @@ -1256,10 +1256,10 @@ unitxt, numbytes = cdk.decode( txt, **cdk_kw ) # DO THE DECODE HERE! # Remove BOM if present - if len(unitxt) > 0 and unitxt[0] == u'\uFEFF': + if len(unitxt) > 0 and unitxt[0] == '\uFEFF': bom = cdk.encode(unitxt[0])[0] unitxt = unitxt[1:] - elif len(unitxt) > 0 and unitxt[0] == u'\uFFFE': # Reversed BOM + elif len(unitxt) > 0 and unitxt[0] == '\uFFFE': # Reversed BOM raise UnicodeDecodeError(cdk.name,txt,0,0,"Wrong byte order, found reversed BOM U+FFFE") else: bom = None @@ -1299,9 +1299,9 @@ n = ord(c) w1, w2 = helpers.make_surrogate_pair(n) if w2 is None: - return (unichr(w1),) - else: - return (unichr(w1), unichr(w2)) + return (chr(w1),) + else: + return (chr(w1), chr(w2)) @staticmethod def make_surrogate_pair( codepoint ): @@ -1318,7 +1318,7 @@ @staticmethod def isnumbertype( obj ): """Is the object of a Python number type (excluding complex)?""" - return isinstance(obj, (int,long,float)) \ + return isinstance(obj, (int,float)) \ and not isinstance(obj, bool) \ or obj is nan or obj is inf or obj is neginf \ or (decimal and isinstance(obj, decimal.Decimal)) @@ -1356,12 +1356,12 @@ @staticmethod def isstringtype( obj ): """Is the object of a Python string type?""" - if isinstance(obj, basestring): + if isinstance(obj, str): return True # Must also check for some other pseudo-string types - import types, UserString - return isinstance(obj, types.StringTypes) \ - or isinstance(obj, UserString.UserString) + import types, collections + return isinstance(obj, (str,)) \ + or isinstance(obj, collections.UserString) ## or isinstance(obj, UserString.MutableString) @staticmethod @@ -1640,7 +1640,7 @@ def restore_position(self): try: old_pos = self.__saved_pos.pop() # Can raise IndexError - except IndexError, err: + except IndexError as err: raise IndexError("Attempt to restore buffer position that was never saved") else: self.__pos = old_pos @@ -1669,13 +1669,13 @@ self.rewind() self.__codec = None self.__bom = None - self.__rawbuf = u'' + self.__rawbuf = '' self.__cmax = 0 # max number of chars in input try: decoded = helpers.unicode_decode( txt, encoding ) except JSONError: raise - except Exception, err: + except Exception as err: # Re-raise as a JSONDecodeError e2 = sys.exc_info() newerr = JSONDecodeError("a Unicode decoding error occurred") @@ -2063,7 +2063,7 @@ self._position = None self.outer_position = None self.context_description = None - for kw,val in kwargs.items(): + for kw,val in list(kwargs.items()): if kw == 'severity': if val not in self.severities: raise TypeError("%s given invalid severity %r" % (self.__class__.__name__, val)) @@ -2339,7 +2339,7 @@ if self.min_codepoint is not None: cp = 'U+%04X' % self.min_codepoint try: - charname = unicodedata.name(unichr(self.min_codepoint)) + charname = unicodedata.name(chr(self.min_codepoint)) except ValueError: charname = '? UNKNOWN CHARACTER' lines.append(" min codepoint: %6s (%s)" % (cp, charname)) @@ -2349,7 +2349,7 @@ if self.max_codepoint is not None: cp = 'U+%04X' % self.max_codepoint try: - charname = unicodedata.name(unichr(self.max_codepoint)) + charname = unicodedata.name(chr(self.max_codepoint)) except ValueError: charname = '? UNKNOWN CHARACTER' lines.append(" max codepoint: %6s (%s)" % (cp, charname)) @@ -2491,7 +2491,7 @@ outer_position = None severity = 'error' context_description = None - for kw, val in kwargs.items(): + for kw, val in list(kwargs.items()): if kw == 'position': position = val elif kw == 'outer_position': outer_position = val elif kw == 'severity': severity = val @@ -2776,9 +2776,9 @@ zero = ord('0') if not key: key = '' - elif isinstance( key, (int,long) ): + elif isinstance( key, int ): key = numfmt % key - elif isinstance( key, basestring ): + elif isinstance( key, str ): keylen = len(key) words = [] i=0 @@ -2810,10 +2810,8 @@ _OrderedDict = None -class json_options(object): +class json_options(object, metaclass=_behaviors_metaclass): """Options to determine how strict the decoder or encoder should be.""" - - __metaclass__ = _behaviors_metaclass _behavior_values = (ALLOW, WARN, FORBID) _behaviors = ( ("all_numeric_signs", @@ -2962,7 +2960,7 @@ # Do this keyword first, so other keywords may override specific behaviors self.strictness = kwargs['strict'] - for kw,val in kwargs.items(): + for kw,val in list(kwargs.items()): if kw == 'compactly': # alias for 'encode_compactly' self.encode_compactly = val elif kw == 'strict': @@ -2973,9 +2971,9 @@ elif kw == 'html_safe' or kw == 'xml_safe': if bool(val): if self.always_escape_chars is None: - self.always_escape_chars = set(u'<>/&') + self.always_escape_chars = set('<>/&') else: - self.always_escape_chars.update( set(u'<>/&') ) + self.always_escape_chars.update( set('<>/&') ) elif kw == 'always_escape': if val: if self.always_escape_chars is None: @@ -3001,14 +2999,14 @@ self.decimal_context = decimal.ExtendedContext elif isinstance(val, decimal.Context): self.decimal_context = val - elif isinstance(val,(int,long)) or val[0].isdigit: + elif isinstance(val,int) or val[0].isdigit: prec = int(val) self.decimal_context = decimal.Context( prec=prec ) else: raise ValueError("Option for %r should be a decimal.Context, a number of significant digits, or one of 'default','basic', or 'extended'." % (kw,)) elif kw in ('allow','warn','forbid','prevent','deny'): action = {'allow':ALLOW, 'warn':WARN, 'forbid':FORBID, 'prevent':FORBID, 'deny':FORBID}[ kw ] - if isinstance(val,basestring): + if isinstance(val,str): val = [b.replace('-','_') for b in val.replace(',',' ').split()] for behavior in val: self.set_behavior( behavior, action ) @@ -3177,19 +3175,19 @@ Returns a number value, which could be an int, float, or decimal. """ - if isinstance(sign, (int,long)): + if isinstance(sign, int): if sign < 0: sign = '-' else: sign = '+' - if isinstance(s,basestring): + if isinstance(s,str): if s.startswith('-') or s.startswith('+'): sign = s[0] s = s[1:] if self.int_as_float: # Making a float/decimal - if isinstance(s, (int,long)): + if isinstance(s, int): if self.float_type == NUMBER_DECIMAL: n = self.decimal_context.create_decimal( s ) if sign=='-': @@ -3213,7 +3211,7 @@ n2 = self.make_float( s[:-1] + ('9' if s[-1]<='5' else '0'), sign ) if (n==inf or n==n2) and self.float_type != NUMBER_FLOAT: n = self.make_decimal( s, sign ) - elif isinstance( s, (int,long) ): + elif isinstance( s, int ): # already an integer n = s if sign=='-': @@ -3233,7 +3231,7 @@ n = self.negzero_float else: n *= -1 - if isinstance(n,(int,long)) and self.keep_format: + if isinstance(n,int) and self.keep_format: n = json_int(n, number_format=number_format) return n @@ -3246,7 +3244,7 @@ if s.startswith('-') or s.startswith('+'): sign = s[0] s = s[1:] - elif isinstance(sign, (int,long)): + elif isinstance(sign, int): if sign < 0: sign = '-' else: @@ -3274,7 +3272,7 @@ if s.startswith('-') or s.startswith('+'): sign = s[0] s = s[1:] - elif isinstance(sign, (int,long)): + elif isinstance(sign, int): if sign < 0: sign = '-' else: @@ -3296,7 +3294,7 @@ return self._leading_zero_radix @leading_zero_radix.setter def leading_zero_radix(self, radix): - if isinstance(radix,basestring): + if isinstance(radix,str): try: radix = int(radix) except ValueError: @@ -3415,7 +3413,7 @@ '\\': '\\\\' } _optional_rev_escapes = { '/': '\\/' } # only escaped if forced to do so - json_syntax_characters = u"{}[]\"\\,:0123456789.-+abcdefghijklmnopqrstuvwxyz \t\n\r" + json_syntax_characters = "{}[]\"\\,:0123456789.-+abcdefghijklmnopqrstuvwxyz \t\n\r" all_hook_names = ('decode_number', 'decode_float', 'decode_object', 'decode_array', 'decode_string', @@ -3458,8 +3456,8 @@ self._asciiencodable = \ [32 <= c < 128 \ - and not self._rev_escapes.has_key(chr(c)) \ - and not unicodedata.category(unichr(c)) in ['Cc','Cf','Zl','Zp'] + and chr(c) not in self._rev_escapes \ + and not unicodedata.category(chr(c)) in ['Cc','Cf','Zl','Zp'] for c in range(0,256)] @property @@ -3588,7 +3586,7 @@ rval = hook( input_object, *args, **kwargs ) except JSONSkipHook: raise # Do nothing - except Exception, err: + except Exception as err: exc_info = sys.exc_info() if hook_name.startswith('encode_'): ex_class = JSONEncodeHookError @@ -3621,9 +3619,9 @@ if not self.options.unicode_whitespace: return c in ' \t\n\r' else: - if not isinstance(c,unicode): - c = unicode(c) - if c in u' \t\n\r\f\v': + if not isinstance(c,str): + c = str(c) + if c in ' \t\n\r\f\v': return True import unicodedata return unicodedata.category(c) == 'Zs' @@ -3636,7 +3634,7 @@ """ if c == '\r' or c == '\n': return True - if c == u'\u2028' or c == u'\u2029': # unicodedata.category(c) in ['Zl', 'Zp'] + if c == '\u2028' or c == '\u2029': # unicodedata.category(c) in ['Zl', 'Zp'] return True return False @@ -3734,7 +3732,7 @@ val = self.call_hook( hook_name, nbr, position=start_position ) except JSONSkipHook: pass - except JSONError, err: + except JSONError as err: state.push_exception(err) val = undefined else: @@ -3795,7 +3793,7 @@ return undefined # Check for radix-prefixed numbers - elif c == '0' and (buf.peek(1) in [u'x',u'X']): + elif c == '0' and (buf.peek(1) in ['x','X']): # ----- HEX NUMBERS 0x123 prefix = buf.popstr(2) digits = buf.popwhile( helpers.is_hex_digit ) @@ -3810,7 +3808,7 @@ state.update_integer_stats( ival, sign=sign, position=start_position ) n = state.options.make_int( ival, sign, number_format=NUMBER_FORMAT_HEX ) return n - elif c == '0' and (buf.peek(1) in [u'o','O']): + elif c == '0' and (buf.peek(1) in ['o','O']): # ----- NEW-STYLE OCTAL NUMBERS 0o123 prefix = buf.popstr(2) digits = buf.popwhile( helpers.is_octal_digit ) @@ -3825,7 +3823,7 @@ state.update_integer_stats( ival, sign=sign, position=start_position ) n = state.options.make_int( ival, sign, number_format=NUMBER_FORMAT_OCTAL ) return n - elif c == '0' and (buf.peek(1) in [u'b','B']): + elif c == '0' and (buf.peek(1) in ['b','B']): # ----- NEW-STYLE BINARY NUMBERS 0b1101 prefix = buf.popstr(2) digits = buf.popwhile( helpers.is_binary_digit ) @@ -3999,7 +3997,7 @@ state.append( n.json_format() ) return - if isinstance(n, (int,long)): + if isinstance(n, int): state.append( str(n) ) return @@ -4101,7 +4099,7 @@ position=highsur_position, outer_position=string_position, context='String') should_stop = state.should_stop - uc = u'\ufffd' # replacement char + uc = '\ufffd' # replacement char _append( uc ) high_surrogate = None highsur_position = None @@ -4111,7 +4109,7 @@ position=highsur_position, outer_position=string_position, context='String') should_stop = state.should_stop - _append( u'\ufffd' ) # replacement char + _append( '\ufffd' ) # replacement char high_surrogate = None highsur_position = None @@ -4153,7 +4151,7 @@ _append( chr(n) ) else: _append( helpers.safe_unichr(n) ) - elif escapes.has_key(c): + elif c in escapes: buf.skip() _append( escapes[c] ) elif c == 'u' or c == 'x': @@ -4214,7 +4212,7 @@ if high_surrogate: # Decode surrogate pair and clear high surrogate - low_surrogate = unichr(codepoint) + low_surrogate = chr(codepoint) try: uc = helpers.surrogate_pair_as_unicode( high_surrogate, low_surrogate ) except ValueError as err: @@ -4222,7 +4220,7 @@ outer_position=string_position, context='String') should_stop = state.should_stop - uc = u'\ufffd' # replacement char + uc = '\ufffd' # replacement char _append( uc ) high_surrogate = None highsur_position = None @@ -4236,14 +4234,14 @@ should_stop = state.should_stop _append( chr(codepoint) ) elif 0xd800 <= codepoint <= 0xdbff: # high surrogate - high_surrogate = unichr(codepoint) # remember until we get to the low surrogate + high_surrogate = chr(codepoint) # remember until we get to the low surrogate highsur_position = escape_position.copy() elif 0xdc00 <= codepoint <= 0xdfff: # low surrogate state.push_error('Low unicode surrogate must be proceeded by a high surrogate', position=escape_position, outer_position=string_position, context='String') should_stop = state.should_stop - _append( u'\ufffd' ) # replacement char + _append( '\ufffd' ) # replacement char else: # Other chars go in as a unicode char _append( helpers.safe_unichr(codepoint) ) @@ -4301,7 +4299,7 @@ state.push_error('High unicode surrogate must be followed by a low surrogate', position=highsur_position, outer_position=string_position, context='String') - _append( u'\ufffd' ) # replacement char + _append( '\ufffd' ) # replacement char high_surrogate = None highsur_position = None @@ -4323,7 +4321,7 @@ s = self.call_hook( 'decode_string', s, position=string_position ) except JSONSkipHook: pass - except JSONError, err: + except JSONError as err: state.push_exception(err) s = undefined return s @@ -4336,16 +4334,16 @@ # able to use ord() on it's simulated "characters". Also # convert Python2 'str' types to unicode strings first. import unicodedata, sys - import UserString + import collections py2strenc = self.options.py2str_encoding - if isinstance(s, UserString.UserString): + if isinstance(s, collections.UserString): def tochar(c): c2 = c.data - if py2strenc and not isinstance(c2,unicode): + if py2strenc and not isinstance(c2,str): return c2.decode( py2strenc ) else: return c2 - elif py2strenc and not isinstance(s,unicode): + elif py2strenc and not isinstance(s,str): s = s.decode( py2strenc ) tochar = None else: @@ -4386,8 +4384,8 @@ i += 1 else: break - chunks.append( unicode(s[j:i]) ) - elif revesc.has_key(c): + chunks.append( str(s[j:i]) ) + elif c in revesc: # Has a shortcut escape sequence, like "\n" chunks.append(revesc[c]) i += 1 @@ -4431,7 +4429,7 @@ doesc = encunicode if doesc: - if optrevesc.has_key(c): + if c in optrevesc: chunks.append(optrevesc[c]) else: chunks.append(r'\u%04x' % cord) @@ -4498,7 +4496,7 @@ val = self.call_hook( 'decode_float', kw, position=start_position ) except JSONSkipHook: pass - except JSONError, err: + except JSONError as err: state.push_exception(err) return undefined else: @@ -4508,7 +4506,7 @@ val = self.call_hook( 'decode_number', kw, position=start_position ) except JSONSkipHook: pass - except JSONError, err: + except JSONError as err: state.push_exception(err) return undefined else: @@ -4793,7 +4791,7 @@ obj = self.call_hook( 'decode_object', obj, position=start_position ) except JSONSkipHook: pass - except JSONError, err: + except JSONError as err: state.push_exception(err) obj = undefined else: @@ -4803,7 +4801,7 @@ obj = self.call_hook( 'decode_array', obj, position=start_position ) except JSONSkipHook: pass - except JSONError, err: + except JSONError as err: state.push_exception(err) obj = undefined return obj @@ -4888,9 +4886,9 @@ if not state.has_errors: try: self._do_decode( state ) # DECODE! - except JSONException, err: + except JSONException as err: state.push_exception( err ) - except Exception, err: # Mainly here to catch maximum recursion depth exceeded + except Exception as err: # Mainly here to catch maximum recursion depth exceeded e2 = sys.exc_info() raise newerr = JSONDecodeError("An unexpected failure occured", severity='fatal', position=state.buf.position) @@ -4955,8 +4953,8 @@ # Only whitespace, line and paragraph separators, # and format control chars are legal here. import unicodedata - catfirst = unicodedata.category(unicode(first)) - catsecond = unicodedata.category(unicode(second)) + catfirst = unicodedata.category(str(first)) + catsecond = unicodedata.category(str(second)) if catfirst not in ('Zs','Zl','Zp','Cf') or \ catsecond not in ('Zs','Zl','Zp','Cf'): state.push_fatal( 'The input is gibberish, is the Unicode encoding correct?' ) @@ -4996,10 +4994,10 @@ c = 'undefined' elif isinstance(obj,bool): c = 'bool' - elif isinstance(obj, (int,long,float,complex)) or\ + elif isinstance(obj, (int,float,complex)) or\ (decimal and isinstance(obj, decimal.Decimal)): c = 'number' - elif isinstance(obj, basestring) or helpers.isstringtype(obj): + elif isinstance(obj, str) or helpers.isstringtype(obj): c = 'string' else: if isinstance(obj,dict): @@ -5104,7 +5102,7 @@ if encoding is not None: try: output, nchars = cdk.encode( JSON.json_syntax_characters ) - except UnicodeError, err: + except UnicodeError as err: raise JSONEncodeError("Output encoding %s is not sufficient to encode JSON" % cdk.name) # Do the JSON encoding! @@ -5119,7 +5117,7 @@ else: try: output, nchars = cdk.encode( unitxt ) - except UnicodeEncodeError, err: + except UnicodeEncodeError as err: # Re-raise as a JSONDecodeError e2 = sys.exc_info() newerr = JSONEncodeError("a Unicode encoding error occurred") @@ -5166,12 +5164,12 @@ elif obj_classification == 'number': try: self.encode_number( obj, state ) - except JSONEncodeError, err1: + except JSONEncodeError as err1: # Bad number, probably a complex with non-zero imaginary part. # Let the default encoders take a shot at encoding. try: self.try_encode_default(obj, state) - except Exception, err2: + except Exception as err2: # Default handlers couldn't deal with it, re-raise original exception. raise err1 elif obj_classification == 'string': @@ -5300,7 +5298,7 @@ it = None if isdict and hasattr(obj,'iterkeys'): try: - it = obj.iterkeys() + it = iter(obj.keys()) except AttributeError: pass else: @@ -5348,7 +5346,7 @@ try: # while not StopIteration part_idx = 0 while True: - obj2 = it.next() + obj2 = next(it) part_idx += 1 # Note, will start counting at 1 if obj2 is obj: raise JSONEncodeError('trying to encode an infinite sequence',obj) @@ -5410,9 +5408,9 @@ elif srt == SORT_SMART: part_keys.sort( key=(lambda t: (smart_sort_transform(t[0]),t[0])) ) elif srt == SORT_ALPHA_CI: - part_keys.sort( key=(lambda t: (unicode(t[0]).upper(),t[0])) ) + part_keys.sort( key=(lambda t: (str(t[0]).upper(),t[0])) ) elif srt or srt == SORT_ALPHA: - part_keys.sort( key=(lambda t: unicode(t[0])) ) + part_keys.sort( key=(lambda t: str(t[0])) ) # Now make parts match the new sort order if srt is not None: parts = [parts[pk[1]] for pk in part_keys] @@ -5672,7 +5670,7 @@ kwargs = kwargs.copy() todel = [] - for kw,val in kwargs.items(): + for kw,val in list(kwargs.items()): if kw == "return_errors": return_errors = bool(val) todel.append(kw) @@ -5736,7 +5734,7 @@ if not encoding: encoding = 'utf-8' - if not isinstance(filename,basestring) or not filename: + if not isinstance(filename,str) or not filename: raise TypeError("Expected a file name") if not overwrite and os.path.exists(filename): @@ -5761,7 +5759,7 @@ See the decode() function for a description of other possible options. """ - if isinstance(filename,basestring): + if isinstance(filename,str): try: fp = open(filename, 'rb') except Exception: @@ -5947,11 +5945,11 @@ write_stats=stats_fp, filename_for_errors=pfx, json_options=jsonopts ) - except JSONError, err: + except JSONError as err: success = self.SUCCESS_FAIL if verbose_fp: verbose_fp.write('%s%s\n' % (pfx, err.pretty_description()) ) - except Exception, err: + except Exception as err: success = self.SUCCESS_FAIL if verbose_fp: verbose_fp.write('%s%s\n' % (pfx, str(err) )) @@ -5998,7 +5996,7 @@ fp = open( filename, 'rb' ) jsondata = fp.read() fp.close() - except IOError, err: + except IOError as err: self.stderr.write('%s: %s\n' % (pfx, str(err)) ) return self.SUCCESS_FAIL if verbose: @@ -6018,7 +6016,7 @@ try: fp = open( output_filename, 'wb' ) fp.write( reformatted ) - except IOError, err: + except IOError as err: RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./test/test_demjson.py self.stderr.write('%s: %s\n' % (pfx, str(err)) ) success = False else: @@ -6090,7 +6088,7 @@ 'allow=', 'warn=', 'forbid=', 'deny=', 'help', 'help-behaviors', 'version','copyright'] ) - except getopt.GetoptError, err: + except getopt.GetoptError as err: self.stderr.write( "Error: %s. Use \"%s --help\" for usage information.\n" \ % (err.msg, self.program_name) ) return 1 @@ -6270,7 +6268,7 @@ # checking multiple files, do not change a # previous error back to ok. success = False - except KeyboardInterrupt, err: + except KeyboardInterrupt as err: sys.stderr.write("\njsonlint interrupted!\n") sys.exit(1) --- ./test/test_demjson.py (original) +++ ./test/test_demjson.py (refactored) @@ -58,17 +58,17 @@ # test method. def skipUnlessPython3(method): def always_pass(self): - print "\nSKIPPING TEST %s: Requires Python 3" % method.__name__ + print("\nSKIPPING TEST %s: Requires Python 3" % method.__name__) return True return always_pass def skipUnlessPython27(method): def always_pass(self): - print "\nSKIPPING TEST %s: Requires Python 2.7 or greater" % method.__name__ + print("\nSKIPPING TEST %s: Requires Python 2.7 or greater" % method.__name__) return True return always_pass def skipUnlessWidePython(method): def always_pass(self): - print "\nSKIPPING TEST %s: Requires Python with wide Unicode support (maxunicode > U+FFFF)" % method.__name__ + print("\nSKIPPING TEST %s: Requires Python with wide Unicode support (maxunicode > U+FFFF)" % method.__name__) return True return always_pass @@ -173,14 +173,14 @@ chars = [] for i, b in enumerate(byte_values): if ord('B') <= b <= ord('Z'): - chars.append( unichr(b-1) ) + chars.append( chr(b-1) ) elif b == ord('A'): - chars.append( u'Z' ) - elif b <= 0x7fL: - chars.append( unichr(b) ) + chars.append( 'Z' ) + elif b <= 0x7f: + chars.append( chr(b) ) else: raise UnicodeDecodeError('rot-1',byte_list,i,i,"Can not decode byte value 0x%02x"%b) - return (u''.join(chars), i+1) + return (''.join(chars), i+1) ## ------------------------------ class no_curly_braces(codecs.CodecInfo): @@ -213,8 +213,8 @@ if b > 0x7f or b == ord('{') or b == ord('}'): raise UnicodeDecodeError('degenerate',byte_list,i,i,"Can not decode byte value 0x%02x"%b) else: - chars.append( unichr(b) ) - return (u''.join(chars), i+1) + chars.append( chr(b) ) + return (''.join(chars), i+1) ## ------------------------------ @@ -411,11 +411,9 @@ try: m = r.match( value ) except TypeError: - raise self.failureException, \ - "can't compare non-string to regex: %r" % value + raise self.failureException("can't compare non-string to regex: %r" % value) if m is None: - raise self.failureException, \ - (msg or '%r !~ /%s/' %(value,pattern)) + raise self.failureException(msg or '%r !~ /%s/' %(value,pattern)) def testEncodeNumber(self): self.assertEqual(demjson.encode(0), '0') @@ -468,7 +466,7 @@ 'Decimal -0 is not encoded as a negative zero') def testJsonInt(self): - self.assertTrue( isinstance( demjson.json_int(0), (int,long) ) ) + self.assertTrue( isinstance( demjson.json_int(0), int ) ) self.assertEqual(demjson.json_int(0), 0) self.assertEqual(demjson.json_int(555999), 555999) self.assertEqual(demjson.json_int(-555999), -555999) @@ -570,10 +568,10 @@ def testDecodeStringUnicodeEscape(self): self.assertEqual(demjson.decode(r'"\u0000"',warnings=False), '\0') self.assertEqual(demjson.decode(r'"\u0061"'), 'a') - self.assertEqual(demjson.decode(r'"\u2012"'), u'\u2012') - self.assertEqual(demjson.decode(r'"\u1eDc"'), u'\u1edc') - self.assertEqual(demjson.decode(r'"\uffff"'), u'\uffff') - self.assertEqual(demjson.decode(r'"\u00a012"'), u'\u00a0' + '12') + self.assertEqual(demjson.decode(r'"\u2012"'), '\u2012') + self.assertEqual(demjson.decode(r'"\u1eDc"'), '\u1edc') + self.assertEqual(demjson.decode(r'"\uffff"'), '\uffff') + self.assertEqual(demjson.decode(r'"\u00a012"'), '\u00a0' + '12') self.assertRaises(demjson.JSONDecodeError, demjson.decode, r'"\u041"', strict=True) self.assertRaises(demjson.JSONDecodeError, demjson.decode, r'"\u041Z"', strict=True) self.assertRaises(demjson.JSONDecodeError, demjson.decode, r'"\u"', strict=True) @@ -581,8 +579,8 @@ def testEncodeStringUnicodeEscape(self): self.assertEqual(demjson.encode('\0', escape_unicode=True), r'"\u0000"') - self.assertEqual(demjson.encode(u'\u00e0', escape_unicode=True), r'"\u00e0"') - self.assertEqual(demjson.encode(u'\u2012', escape_unicode=True), r'"\u2012"') + self.assertEqual(demjson.encode('\u00e0', escape_unicode=True), r'"\u00e0"') + self.assertEqual(demjson.encode('\u2012', escape_unicode=True), r'"\u2012"') def testHtmlSafe(self): self.assertEqual(demjson.encode('<', html_safe=True), r'"\u003c"') @@ -593,14 +591,14 @@ self.assertEqual(demjson.encode('ac&d/e', html_safe=False), r'"ac&d/e"') def testDecodeStringExtendedUnicodeEscape(self): - self.assertEqual(demjson.decode(r'"\u{0041}"',allow_extended_unicode_escapes=True), u'A') - self.assertEqual(demjson.decode(r'"\u{1aFe}"',allow_extended_unicode_escapes=True), u'\u1afe') - self.assertEqual(demjson.decode(r'"\u{41}"',allow_extended_unicode_escapes=True), u'A') - self.assertEqual(demjson.decode(r'"\u{1}"',allow_extended_unicode_escapes=True), u'\u0001') - self.assertEqual(demjson.decode(r'"\u{00000000000041}"',allow_extended_unicode_escapes=True), u'A') - self.assertEqual(demjson.decode(r'"\u{1000a}"',allow_extended_unicode_escapes=True), u'\U0001000a') - self.assertEqual(demjson.decode(r'"\u{10ffff}"',allow_extended_unicode_escapes=True), u'\U0010FFFF') - self.assertEqual(demjson.decode(r'"\u{0000010ffff}"',allow_extended_unicode_escapes=True), u'\U0010FFFF') + self.assertEqual(demjson.decode(r'"\u{0041}"',allow_extended_unicode_escapes=True), 'A') + self.assertEqual(demjson.decode(r'"\u{1aFe}"',allow_extended_unicode_escapes=True), '\u1afe') + self.assertEqual(demjson.decode(r'"\u{41}"',allow_extended_unicode_escapes=True), 'A') + self.assertEqual(demjson.decode(r'"\u{1}"',allow_extended_unicode_escapes=True), '\u0001') + self.assertEqual(demjson.decode(r'"\u{00000000000041}"',allow_extended_unicode_escapes=True), 'A') + self.assertEqual(demjson.decode(r'"\u{1000a}"',allow_extended_unicode_escapes=True), '\U0001000a') + self.assertEqual(demjson.decode(r'"\u{10ffff}"',allow_extended_unicode_escapes=True), '\U0010FFFF') + self.assertEqual(demjson.decode(r'"\u{0000010ffff}"',allow_extended_unicode_escapes=True), '\U0010FFFF') self.assertRaises(demjson.JSONDecodeError, demjson.decode, r'"\u{0041}"', strict=True) self.assertRaises(demjson.JSONDecodeError, demjson.decode, r'"\u{110000}"', allow_extended_unicode_escapes=True) self.assertRaises(demjson.JSONDecodeError, demjson.decode, r'"\u{012g}"', allow_extended_unicode_escapes=True) @@ -678,27 +676,27 @@ def testDecodeStringRawUnicode(self): QT = ord('"') self.assertEqual(demjson.decode(rawbytes([ QT,0xC3,0xA0,QT ]), - encoding='utf-8'), u'\u00e0') + encoding='utf-8'), '\u00e0') self.assertEqual(demjson.decode(rawbytes([ QT,0,0,0, 0xE0,0,0,0, QT,0,0,0 ]), - encoding='ucs4le'), u'\u00e0') + encoding='ucs4le'), '\u00e0') self.assertEqual(demjson.decode(rawbytes([ 0,0,0,QT, 0,0,0,0xE0, 0,0,0,QT ]), - encoding='ucs4be'), u'\u00e0') + encoding='ucs4be'), '\u00e0') self.assertEqual(demjson.decode(rawbytes([ 0,0,0,QT, 0,0,0,0xE0, 0,0,0,QT ]), - encoding='utf-32be'), u'\u00e0') + encoding='utf-32be'), '\u00e0') self.assertEqual(demjson.decode(rawbytes([ 0,0,0xFE,0xFF, 0,0,0,QT, 0,0,0,0xE0, 0,0,0,QT ]), - encoding='ucs4'), u'\u00e0') + encoding='ucs4'), '\u00e0') def testEncodeStringRawUnicode(self): QT = ord('"') - self.assertEqual(demjson.encode(u'\u00e0', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u00e0', escape_unicode=False, encoding='utf-8'), rawbytes([ QT, 0xC3, 0xA0, QT ]) ) - self.assertEqual(demjson.encode(u'\u00e0', escape_unicode=False, encoding='ucs4le'), + self.assertEqual(demjson.encode('\u00e0', escape_unicode=False, encoding='ucs4le'), rawbytes([ QT,0,0,0, 0xE0,0,0,0, QT,0,0,0 ]) ) - self.assertEqual(demjson.encode(u'\u00e0', escape_unicode=False, encoding='ucs4be'), + self.assertEqual(demjson.encode('\u00e0', escape_unicode=False, encoding='ucs4be'), rawbytes([ 0,0,0,QT, 0,0,0,0xE0, 0,0,0,QT ]) ) - self.assertEqual(demjson.encode(u'\u00e0', escape_unicode=False, encoding='utf-32be'), + self.assertEqual(demjson.encode('\u00e0', escape_unicode=False, encoding='utf-32be'), rawbytes([ 0,0,0,QT, 0,0,0,0xE0, 0,0,0,QT ]) ) - self.assertTrue(demjson.encode(u'\u00e0', escape_unicode=False, encoding='ucs4') + self.assertTrue(demjson.encode('\u00e0', escape_unicode=False, encoding='ucs4') in [rawbytes([ 0,0,0xFE,0xFF, 0,0,0,QT, 0,0,0,0xE0, 0,0,0,QT ]), rawbytes([ 0xFF,0xFE,0,0, QT,0,0,0, 0xE0,0,0,0, QT,0,0,0 ]) ]) @@ -707,36 +705,36 @@ # output encoding could have represented them in the raw. # Test U+001B escape - a control character - self.assertEqual(demjson.encode(u'\u001B', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u001B', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\u001b"' ]) ) # Test U+007F delete - a control character - self.assertEqual(demjson.encode(u'\u007F', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u007F', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\u007f"' ]) ) # Test U+00AD soft hyphen - a format control character - self.assertEqual(demjson.encode(u'\u00AD', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u00AD', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\u00ad"' ]) ) # Test U+200F right-to-left mark - self.assertEqual(demjson.encode(u'\u200F', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u200F', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\u200f"' ]) ) # Test U+2028 line separator - self.assertEqual(demjson.encode(u'\u2028', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u2028', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\u2028"' ]) ) # Test U+2029 paragraph separator - self.assertEqual(demjson.encode(u'\u2029', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\u2029', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\u2029"' ]) ) # Test U+E007F cancel tag - self.assertEqual(demjson.encode(u'\U000E007F', escape_unicode=False, encoding='utf-8'), + self.assertEqual(demjson.encode('\U000E007F', escape_unicode=False, encoding='utf-8'), rawbytes([ ord(c) for c in '"\\udb40\\udc7f"' ]) ) def testDecodeSupplementalUnicode(self): import sys if sys.maxunicode > 65535: self.assertEqual(demjson.decode( rawbytes([ ord(c) for c in r'"\udbc8\udf45"' ]) ), - u'\U00102345') + '\U00102345') self.assertEqual(demjson.decode( rawbytes([ ord(c) for c in r'"\ud800\udc00"' ]) ), - u'\U00010000') + '\U00010000') self.assertEqual(demjson.decode( rawbytes([ ord(c) for c in r'"\udbff\udfff"' ]) ), - u'\U0010ffff') + '\U0010ffff') for bad_case in [r'"\ud801"', r'"\udc02"', r'"\ud801\udbff"', r'"\ud801\ue000"', r'"\ud801\u2345"']: @@ -749,11 +747,11 @@ def testEncodeSupplementalUnicode(self): import sys if sys.maxunicode > 65535: - self.assertEqual(demjson.encode(u'\U00010000',encoding='ascii'), + self.assertEqual(demjson.encode('\U00010000',encoding='ascii'), rawbytes([ ord(c) for c in r'"\ud800\udc00"' ]) ) - self.assertEqual(demjson.encode(u'\U00102345',encoding='ascii'), + self.assertEqual(demjson.encode('\U00102345',encoding='ascii'), rawbytes([ ord(c) for c in r'"\udbc8\udf45"' ]) ) - self.assertEqual(demjson.encode(u'\U0010ffff',encoding='ascii'), + self.assertEqual(demjson.encode('\U0010ffff',encoding='ascii'), rawbytes([ ord(c) for c in r'"\udbff\udfff"' ]) ) def have_codec(self, name): @@ -772,7 +770,7 @@ # is different than ISO8859-1. d = rawbytes([ ord('"'), ord('a'), 0xe0, 0x8c, ord('"') ]) self.assertEqual(demjson.decode( d, encoding='cp1252' ), - u"a\u00e0\u0152") + "a\u00e0\u0152") def testDecodeWithEBCDIC(self): have_ebcdic = self.have_codec('ibm037') @@ -780,7 +778,7 @@ # Try EBCDIC d = rawbytes([ 0x7f, 0xc1, 0xc0, 0x7c, 0xe0, 0xa4, 0xf0, 0xf1, 0xf5, 0xf2, 0x7f ]) self.assertEqual(demjson.decode( d, encoding='ibm037' ), - u"A{@\u0152") + "A{@\u0152") def testDecodeWithISO8859_1(self): have_iso8859_1 = self.have_codec('iso8859-1') @@ -788,21 +786,21 @@ # Try ISO-8859-1 d = rawbytes([ ord('"'), ord('a'), 0xe0, ord('\\'), ord('u'), ord('0'), ord('1'), ord('5'), ord('2'), ord('"') ]) self.assertEqual(demjson.decode( d, encoding='iso8859-1' ), - u"a\u00e0\u0152") + "a\u00e0\u0152") def testDecodeWithCustomCodec(self): # Try Rot-1 ci = rot_one.lookup('rot-1') d = rawbytes([ ord('"'), ord('A'), ord('B'), ord('Y'), ord('Z'), ord(' '), ord('5'), ord('"') ]) self.assertEqual(demjson.decode( d, encoding=ci ), - u"ZAXY 5") + "ZAXY 5") def testDecodeWithDegenerateCodec(self): ci = no_curly_braces.lookup('degenerate') d = rawbytes([ord(c) for c in '"abc"' ]) self.assertEqual(demjson.decode( d, encoding=ci ), - u"abc") + "abc") d = rawbytes([ord(c) for c in '{"abc":42}' ]) self.assertRaises(demjson.JSONDecodeError, demjson.decode, d, encoding=ci ) @@ -810,36 +808,36 @@ def testEncodeWithWindows1252(self): have_cp1252 = self.have_codec('cp1252') if have_cp1252: - s = u'a\u00e0\u0152' + s = 'a\u00e0\u0152' self.assertEqual(demjson.encode( s, encoding='cp1252' ), rawbytes([ ord('"'), ord('a'), 0xe0, 0x8c, ord('"') ]) ) def testEncodeWithEBCDIC(self): have_ebcdic = self.have_codec('ibm037') if have_ebcdic: - s = u"A{@\u0152" + s = "A{@\u0152" self.assertEqual(demjson.encode( s, encoding='ibm037' ), rawbytes([ 0x7f, 0xc1, 0xc0, 0x7c, 0xe0, 0xa4, 0xf0, 0xf1, 0xf5, 0xf2, 0x7f ]) ) def testEncodeWithISO8859_1(self): have_iso8859_1 = self.have_codec('iso8859-1') if have_iso8859_1: - s = u'a\u00e0\u0152' + s = 'a\u00e0\u0152' self.assertEqual(demjson.encode( s, encoding='iso8859-1' ), rawbytes([ ord('"'), ord('a'), 0xe0, ord('\\'), ord('u'), ord('0'), ord('1'), ord('5'), ord('2'), ord('"') ]) ) def testEncodeWithCustomCodec(self): # Try Rot-1 ci = rot_one.lookup('rot-1') - d = u"ABYZ 5" + d = "ABYZ 5" self.assertEqual(demjson.encode( d, encoding=ci ), rawbytes([ ord('"'), ord('B'), ord('C'), ord('Z'), ord('A'), ord(' '), ord('5'), ord('"') ]) ) def testEncodeWithDegenerateCodec(self): ci = no_curly_braces.lookup('degenerate') - self.assertRaises(demjson.JSONEncodeError, demjson.encode, u'"abc"', encoding=ci ) - self.assertRaises(demjson.JSONEncodeError, demjson.encode, u'{"abc":42}', encoding=ci ) + self.assertRaises(demjson.JSONEncodeError, demjson.encode, '"abc"', encoding=ci ) + self.assertRaises(demjson.JSONEncodeError, demjson.encode, '{"abc":42}', encoding=ci ) def testDecodeArraySimple(self): @@ -903,7 +901,7 @@ self.assertRaises(demjson.JSONDecodeError, demjson.decode, '{"a":1,"a":1}', prevent_duplicate_keys=True) self.assertRaises(demjson.JSONDecodeError, demjson.decode, '{"a":1,"a":2}', prevent_duplicate_keys=True) self.assertRaises(demjson.JSONDecodeError, demjson.decode, '{"b":9,"a":1,"c":42,"a":2}', prevent_duplicate_keys=True) - self.assertRaises(demjson.JSONDecodeError, demjson.decode, '{"a":1,"\u0061":1}', prevent_duplicate_keys=True) + self.assertRaises(demjson.JSONDecodeError, demjson.decode, '{"a":1,"\\u0061":1}', prevent_duplicate_keys=True) def testDecodeObjectBad(self): self.assertRaises(demjson.JSONDecodeError, demjson.decode, '{"a"}', strict=True) @@ -948,7 +946,7 @@ class i(object): def __init__(self): self.n = 0 - def next(self): + def __next__(self): self.n += 1 if self.n < 10: return 2**self.n @@ -959,12 +957,12 @@ '[2,4,8,16,32,64,128,256,512]' ) def testEncodeStringLike(self): - import UserString - class LikeString(UserString.UserString): + import collections + class LikeString(collections.UserString): pass mystring = LikeString('hello') self.assertEqual(demjson.encode(mystring), '"hello"') - mystring = LikeString(u'hi\u2012there') + mystring = LikeString('hi\u2012there') self.assertEqual(demjson.encode(mystring, escape_unicode=True, encoding='utf-8'), rawbytes([ ord(c) for c in r'"hi\u2012there"' ]) ) @@ -986,7 +984,7 @@ # Form-feed is not a valid JSON whitespace char self.assertRaises(demjson.JSONDecodeError, demjson.decode, '\x0c[]', strict=True) # No-break-space is not a valid JSON whitespace char - self.assertRaises(demjson.JSONDecodeError, demjson.decode, u'\u00a0[]', strict=True) + self.assertRaises(demjson.JSONDecodeError, demjson.decode, '\u00a0[]', strict=True) def testDecodeInvalidStartingType(self): if False: @@ -1084,9 +1082,9 @@ def pairs(dct): return sorted(dct.items()) self.assertEqual(demjson.decode('{"a":42, "b":{"c":99}}'), - {u'a': 42, u'b': {u'c': 99}} ) + {'a': 42, 'b': {'c': 99}} ) self.assertEqual(demjson.decode('{"a":42, "b":{"c":99}}', decode_object=pairs), - [(u'a', 42), (u'b', [(u'c', 99)])] ) + [('a', 42), ('b', [('c', 99)])] ) def testDecodeStringHook(self): import string @@ -1110,13 +1108,13 @@ d2 = {complex(0,42): "imaginary-forty-two", "a":"Alpha"} def make_key( k ): - if isinstance(k,basestring): + if isinstance(k,str): raise demjson.JSONSkipHook else: return repr(k) def make_key2( k ): - if isinstance(k, (int,basestring)): + if isinstance(k, (int,str)): raise demjson.JSONSkipHook else: return repr(k) @@ -1202,7 +1200,7 @@ def enc_val( val ): if isinstance(val, complex): return {'real':val.real, 'imaginary':val.imag} - elif isinstance(val, basestring): + elif isinstance(val, str): return val.upper() elif isinstance(val, datetime.date): return val.strftime("Year %Y Month %m Day %d") @@ -1211,12 +1209,12 @@ v = {'ten':10, 'number': complex(3, 7.25), 'asof': datetime.date(2014,1,17)} self.assertEqual(demjson.encode( v, encode_value=enc_val ), - u'{"ASOF":"YEAR 2014 MONTH 01 DAY 17","NUMBER":{"IMAGINARY":7.25,"REAL":3.0},"TEN":10}' ) + '{"ASOF":"YEAR 2014 MONTH 01 DAY 17","NUMBER":{"IMAGINARY":7.25,"REAL":3.0},"TEN":10}' ) def testEncodeDefault(self): import datetime def dictkeys( d ): - return "/".join( sorted([ str(k) for k in d.keys() ]) ) + return "/".join( sorted([ str(k) for k in list(d.keys()) ]) ) def magic( d ): return complex( 1, len(d)) class Anon(object): @@ -1235,13 +1233,13 @@ vals = [ "abc", 123, Anon("Hello"), sys, {'a':42,'wow':True} ] self.assertEqual(demjson.encode( vals, encode_default=repr ), - u'["abc",123,"%s","%s",{"a":42,"wow":true}]' % ( repr(vals[2]), repr(vals[3])) ) + '["abc",123,"%s","%s",{"a":42,"wow":true}]' % ( repr(vals[2]), repr(vals[3])) ) self.assertEqual(demjson.encode( vals, encode_default=repr, encode_dict=dictkeys ), - u'["abc",123,"%s","%s","a/wow"]' % ( repr(vals[2]), repr(vals[3])) ) + '["abc",123,"%s","%s","a/wow"]' % ( repr(vals[2]), repr(vals[3])) ) self.assertEqual(demjson.encode( vals, encode_default=repr, encode_dict=magic ), - u'["abc",123,"%s","%s","%s"]' % ( repr(vals[2]), repr(vals[3]), repr(magic(vals[4])) ) ) + '["abc",123,"%s","%s","%s"]' % ( repr(vals[2]), repr(vals[3]), repr(magic(vals[4])) ) ) self.assertRaises( demjson.JSONEncodeError, demjson.encode, Anon("Hello") ) @@ -1249,12 +1247,12 @@ self.assertRaises( demjson.JSONEncodeError, demjson.encode, Anon2("Hello"), encode_default=encode_anon ) def testEncodeDate(self): - d = datetime.date(2014,01,04) + d = datetime.date(2014,0o1,0o4) self.assertEqual(demjson.encode( d ), '"2014-01-04"' ) self.assertEqual(demjson.encode( d, date_format='%m/%d/%Y' ), '"01/04/2014"' ) def testEncodeDatetime(self): RefactoringTool: Files that were modified: RefactoringTool: ./demjson.py RefactoringTool: ./setup.py RefactoringTool: ./test/test_demjson.py - d = datetime.datetime(2014,01,04,13,22,15) + d = datetime.datetime(2014,0o1,0o4,13,22,15) self.assertEqual(demjson.encode( d ), '"2014-01-04T13:22:15"' ) self.assertEqual(demjson.encode( d, datetime_format='%m/%d/%Y %H hr %M min' ), '"01/04/2014 13 hr 22 min"' ) @@ -1417,8 +1415,8 @@ self.assertEqual( self.decode_stats( '"abc"' ).max_string_length, 3 ) self.assertEqual( self.decode_stats( '"abc"' ).total_string_length, 3 ) self.assertEqual( self.decode_stats( r'"\u2020"' ).max_string_length, 1 ) - self.assertEqual( self.decode_stats( u'"\u2020"' ).max_string_length, 1 ) - self.assertEqual( self.decode_stats( u'"\U0010ffff"' ).max_string_length, (1 if is_wide_python else 2) ) + self.assertEqual( self.decode_stats( '"\u2020"' ).max_string_length, 1 ) + self.assertEqual( self.decode_stats( '"\U0010ffff"' ).max_string_length, (1 if is_wide_python else 2) ) self.assertEqual( self.decode_stats( r'"\ud804\udc88"' ).max_string_length, (1 if is_wide_python else 2) ) self.assertEqual( self.decode_stats( '["","abc","defghi"]' ).max_string_length, 6 ) self.assertEqual( self.decode_stats( '["","abc","defghi"]' ).total_string_length, 9 ) @@ -1428,8 +1426,8 @@ self.assertEqual( self.decode_stats( r'"\0"' ).max_codepoint, 0 ) self.assertEqual( self.decode_stats( r'"\u0000"' ).min_codepoint, 0 ) self.assertEqual( self.decode_stats( r'"\u0000"' ).max_codepoint, 0 ) - self.assertEqual( self.decode_stats( u'"\u0000"' ).min_codepoint, 0 ) - self.assertEqual( self.decode_stats( u'"\u0000"' ).max_codepoint, 0 ) + self.assertEqual( self.decode_stats( '"\u0000"' ).min_codepoint, 0 ) + self.assertEqual( self.decode_stats( '"\u0000"' ).max_codepoint, 0 ) self.assertEqual( self.decode_stats( r'"\1"' ).min_codepoint, 1 ) self.assertEqual( self.decode_stats( r'"\1"' ).max_codepoint, 1 ) self.assertEqual( self.decode_stats( r'"\u0001"' ).min_codepoint, 1 ) @@ -1442,12 +1440,12 @@ self.assertEqual( self.decode_stats( r'"\377"' ).max_codepoint, 255 ) self.assertEqual( self.decode_stats( r'"\uffff"' ).min_codepoint, 0xffff ) self.assertEqual( self.decode_stats( r'"\uffff"' ).max_codepoint, 0xffff ) - self.assertEqual( self.decode_stats( u'"\uffff"' ).min_codepoint, 0xffff ) - self.assertEqual( self.decode_stats( u'"\uffff"' ).max_codepoint, 0xffff ) + self.assertEqual( self.decode_stats( '"\uffff"' ).min_codepoint, 0xffff ) + self.assertEqual( self.decode_stats( '"\uffff"' ).max_codepoint, 0xffff ) self.assertEqual( self.decode_stats( '["mnoapj","kzcde"]' ).min_codepoint, ord('a') ) self.assertEqual( self.decode_stats( '["mnoapj","kzcde"]' ).max_codepoint, ord('z') ) - self.assertEqual( self.decode_stats( u'"\U0010ffff"' ).min_codepoint, (0x10ffff if is_wide_python else 0xdbff) ) - self.assertEqual( self.decode_stats( u'"\U0010ffff"' ).max_codepoint, (0x10ffff if is_wide_python else 0xdfff) ) + self.assertEqual( self.decode_stats( '"\U0010ffff"' ).min_codepoint, (0x10ffff if is_wide_python else 0xdbff) ) + self.assertEqual( self.decode_stats( '"\U0010ffff"' ).max_codepoint, (0x10ffff if is_wide_python else 0xdfff) ) def testStatsComments(self): self.assertEqual( self.decode_stats( 'true' ).num_comments, 0 ) @@ -1493,9 +1491,9 @@ def run_all_tests(): unicode_width = 'narrow' if sys.maxunicode<=0xFFFF else 'wide' - print 'Running with demjson version %s, Python version %s with %s-Unicode' % (demjson.__version__, sys.version.split(' ',1)[0],unicode_width) + print('Running with demjson version %s, Python version %s with %s-Unicode' % (demjson.__version__, sys.version.split(' ',1)[0],unicode_width)) if int( demjson.__version__.split('.',1)[0] ) < 2: - print 'WARNING: TESTING AGAINST AN OLD VERSION!' + print('WARNING: TESTING AGAINST AN OLD VERSION!') unittest.main() if __name__ == '__main__': dh_auto_build I: pybuild base:311: /usr/bin/python3.12 setup.py build running build running build_py copying demjson.py -> /build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.12_demjson/build running build_scripts creating build creating build/scripts-3.12 copying and adjusting jsonlint -> build/scripts-3.12 changing mode of build/scripts-3.12/jsonlint from 644 to 755 I: pybuild base:311: /usr/bin/python3 setup.py build running build running build_py copying demjson.py -> /build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.11_demjson/build running build_scripts creating build/scripts-3.11 copying and adjusting jsonlint -> build/scripts-3.11 changing mode of build/scripts-3.11/jsonlint from 644 to 755 make[1]: Leaving directory '/build/reproducible-path/python-demjson-2.2.4' dh_auto_test -O--buildsystem=pybuild I: pybuild base:311: cd /build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.12_demjson/build; python3.12 -m unittest discover -v ---------------------------------------------------------------------- Ran 0 tests in 0.000s NO TESTS RAN I: pybuild base:311: cd /build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.11_demjson/build; python3.11 -m unittest discover -v ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK create-stamp debian/debhelper-build-stamp fakeroot debian/rules binary dh binary --with python3 --buildsystem=pybuild dh_testroot -O--buildsystem=pybuild dh_prep -O--buildsystem=pybuild dh_auto_install --destdir=debian/python3-demjson/ -O--buildsystem=pybuild I: pybuild base:311: /usr/bin/python3.12 setup.py install --root /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson running install /usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running build running build_py running build_scripts running install_lib creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.12 creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.12/dist-packages copying /build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.12_demjson/build/demjson.py -> /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.12/dist-packages byte-compiling /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.12/dist-packages/demjson.py to demjson.cpython-312.pyc running install_egg_info running egg_info creating demjson.egg-info writing demjson.egg-info/PKG-INFO writing dependency_links to demjson.egg-info/dependency_links.txt writing top-level names to demjson.egg-info/top_level.txt writing manifest file 'demjson.egg-info/SOURCES.txt' reading manifest file 'demjson.egg-info/SOURCES.txt' adding license file 'LICENSE.txt' writing manifest file 'demjson.egg-info/SOURCES.txt' Copying demjson.egg-info to /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.12/dist-packages/demjson-2.2.4.egg-info Skipping SOURCES.txt running install_scripts creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin copying build/scripts-3.12/jsonlint -> /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin changing mode of /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin/jsonlint to 755 I: pybuild pybuild:334: rm -f /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin/jsonlint I: pybuild base:311: /usr/bin/python3 setup.py install --root /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson running install /usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running build running build_py running build_scripts running install_lib creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.11 creating /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.11/dist-packages copying /build/reproducible-path/python-demjson-2.2.4/.pybuild/cpython3_3.11_demjson/build/demjson.py -> /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.11/dist-packages byte-compiling /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.11/dist-packages/demjson.py to demjson.cpython-311.pyc running install_egg_info running egg_info writing demjson.egg-info/PKG-INFO writing dependency_links to demjson.egg-info/dependency_links.txt writing top-level names to demjson.egg-info/top_level.txt reading manifest file 'demjson.egg-info/SOURCES.txt' adding license file 'LICENSE.txt' writing manifest file 'demjson.egg-info/SOURCES.txt' Copying demjson.egg-info to /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/lib/python3.11/dist-packages/demjson-2.2.4.egg-info Skipping SOURCES.txt running install_scripts copying build/scripts-3.11/jsonlint -> /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin changing mode of /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin/jsonlint to 755 I: pybuild pybuild:334: rm -f /build/reproducible-path/python-demjson-2.2.4/debian/python3-demjson/usr/bin/jsonlint dh_install -O--buildsystem=pybuild dh_installdocs -O--buildsystem=pybuild dh_installchangelogs -O--buildsystem=pybuild dh_installman -O--buildsystem=pybuild debian/rules override_dh_python3 make[1]: Entering directory '/build/reproducible-path/python-demjson-2.2.4' dh_python3 --shebang=/usr/bin/python3 I: dh_python3 tools:113: replacing shebang in debian/python3-demjson/usr/bin/jsonlint make[1]: Leaving directory '/build/reproducible-path/python-demjson-2.2.4' dh_installsystemduser -O--buildsystem=pybuild dh_perl -O--buildsystem=pybuild dh_link -O--buildsystem=pybuild dh_strip_nondeterminism -O--buildsystem=pybuild dh_compress -O--buildsystem=pybuild dh_fixperms -O--buildsystem=pybuild dh_missing -O--buildsystem=pybuild dh_installdeb -O--buildsystem=pybuild dh_gencontrol -O--buildsystem=pybuild dpkg-gencontrol: warning: Provides field of package python3-demjson: substitution variable ${python3:Provides} used, but is not defined dh_md5sums -O--buildsystem=pybuild dh_builddeb -O--buildsystem=pybuild dpkg-deb: building package 'python3-demjson' in '../python3-demjson_2.2.4-7_all.deb'. dpkg-genbuildinfo --build=binary -O../python-demjson_2.2.4-7_i386.buildinfo dpkg-genchanges --build=binary -O../python-demjson_2.2.4-7_i386.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/42272 and its subdirectories I: Current time: Sun Apr 21 01:18:36 -12 2024 I: pbuilder-time-stamp: 1713705516 Sun Apr 21 13:18:37 UTC 2024 I: 1st build successful. Starting 2nd build on remote node ionos6-i386.debian.net. Sun Apr 21 13:18:37 UTC 2024 I: Preparing to do remote build '2' on ionos6-i386.debian.net. Sun Apr 21 13:19:14 UTC 2024 I: Deleting $TMPDIR on ionos6-i386.debian.net. Sun Apr 21 13:19:14 UTC 2024 I: python-demjson_2.2.4-7_i386.changes: Format: 1.8 Date: Thu, 14 Jul 2022 14:17:48 +0900 Source: python-demjson Binary: python3-demjson Architecture: all Version: 2.2.4-7 Distribution: unstable Urgency: medium Maintainer: Debian Python Team Changed-By: TANIGUCHI Takaki Description: python3-demjson - encoder, decoder, and lint/validator for JSON in Python (python3) Closes: 1013187 Changes: python-demjson (2.2.4-7) unstable; urgency=medium . * d/salsa-ci.yml: Add CI config. * d/rules: Run 2to3 before build. (Closes: #1013187) * d/control: Add 2to3 to B-D. * Bump Standards-Version to 4.6.1. Checksums-Sha1: 8c8f288bc5cfa5779c42c358b7b683a4d458a2ad 5929 python-demjson_2.2.4-7_i386.buildinfo 6f22b4349f0254424c0b81ccee0fc3cb7d996d65 70596 python3-demjson_2.2.4-7_all.deb Checksums-Sha256: 5cab22ea4184b5b0dcd629636ac7d8222872db36be823081ae92715f6135870b 5929 python-demjson_2.2.4-7_i386.buildinfo d8ebc6cf9b2743c471b348b49444286baf90b106a5396842d580cf9cce450922 70596 python3-demjson_2.2.4-7_all.deb Files: 28d0600e8a112af8a8eb3a6957967b82 5929 python optional python-demjson_2.2.4-7_i386.buildinfo f704b5b4f3be119e798bd5f677151ad9 70596 python optional python3-demjson_2.2.4-7_all.deb Sun Apr 21 13:19:16 UTC 2024 I: diffoscope 265 will be used to compare the two builds: Running as unit: rb-diffoscope-i386_5-17463.service # Profiling output for: /usr/bin/diffoscope --timeout 7200 --html /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/python-demjson_2.2.4-7.diffoscope.html --text /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/python-demjson_2.2.4-7.diffoscope.txt --json /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/python-demjson_2.2.4-7.diffoscope.json --profile=- /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/b1/python-demjson_2.2.4-7_i386.changes /srv/reproducible-results/rbuild-debian/r-b-build.i8EnTZKZ/b2/python-demjson_2.2.4-7_i386.changes ## command (total time: 0.000s) 0.000s 1 call cmp (internal) ## has_same_content_as (total time: 0.000s) 0.000s 1 call abc.DotChangesFile ## main (total time: 0.343s) 0.343s 2 calls outputs 0.000s 1 call cleanup ## recognizes (total time: 0.015s) 0.015s 12 calls diffoscope.comparators.binary.FilesystemFile ## specialize (total time: 0.000s) 0.000s 1 call specialize Finished with result: success Main processes terminated with: code=exited/status=0 Service runtime: 655ms CPU time consumed: 645ms Sun Apr 21 13:19:17 UTC 2024 I: diffoscope 265 found no differences in the changes files, and a .buildinfo file also exists. Sun Apr 21 13:19:17 UTC 2024 I: python-demjson from trixie built successfully and reproducibly on i386. Sun Apr 21 13:19:18 UTC 2024 I: Submitting .buildinfo files to external archives: Sun Apr 21 13:19:18 UTC 2024 I: Submitting 8.0K b1/python-demjson_2.2.4-7_i386.buildinfo.asc Sun Apr 21 13:19:19 UTC 2024 I: Submitting 8.0K b2/python-demjson_2.2.4-7_i386.buildinfo.asc Sun Apr 21 13:19:20 UTC 2024 I: Done submitting .buildinfo files to http://buildinfo.debian.net/api/submit. Sun Apr 21 13:19:20 UTC 2024 I: Done submitting .buildinfo files. Sun Apr 21 13:19:20 UTC 2024 I: Removing signed python-demjson_2.2.4-7_i386.buildinfo.asc files: removed './b1/python-demjson_2.2.4-7_i386.buildinfo.asc' removed './b2/python-demjson_2.2.4-7_i386.buildinfo.asc'