>>> py3-tempita: Building community/py3-tempita 0.5.2-r9 (using abuild 3.10.0_rc1-r2) started Sat, 29 Oct 2022 10:40:31 +0000 >>> py3-tempita: Checking sanity of /home/buildozer/aports/community/py3-tempita/APKBUILD... >>> py3-tempita: Analyzing dependencies... >>> py3-tempita: Installing for build: build-base python3 py3-setuptools (1/12) Installing libbz2 (1.0.8-r3) (2/12) Installing libffi (3.4.4-r0) (3/12) Installing gdbm (1.23-r0) (4/12) Installing xz-libs (5.2.7-r0) (5/12) Installing mpdecimal (2.5.1-r1) (6/12) Installing readline (8.2.0-r0) (7/12) Installing sqlite-libs (3.39.4-r0) (8/12) Installing python3 (3.10.8-r3) (9/12) Installing py3-parsing (3.0.9-r0) (10/12) Installing py3-packaging (21.3-r2) (11/12) Installing py3-setuptools (65.5.0-r0) (12/12) Installing .makedepends-py3-tempita (20221029.104040) Executing busybox-1.35.0-r27.trigger OK: 247 MiB in 104 packages >>> py3-tempita: Cleaning up srcdir >>> py3-tempita: Cleaning up pkgdir >>> py3-tempita: Fetching https://distfiles.alpinelinux.org/distfiles/v3.17/Tempita-0.5.2.tar.gz >>> py3-tempita: Fetching https://distfiles.alpinelinux.org/distfiles/v3.17/Tempita-0.5.2.tar.gz >>> py3-tempita: Checking sha512sums... Tempita-0.5.2.tar.gz: OK setuptools59.patch: OK >>> py3-tempita: Unpacking /var/cache/distfiles/v3.17/Tempita-0.5.2.tar.gz... >>> py3-tempita: setuptools59.patch patching file setup.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to ./setup.py RefactoringTool: Refactored ./tempita/__init__.py RefactoringTool: No changes to ./tempita/_looper.py RefactoringTool: Refactored ./tempita/compat3.py RefactoringTool: Files that were modified: RefactoringTool: ./setup.py RefactoringTool: ./tempita/__init__.py RefactoringTool: ./tempita/_looper.py RefactoringTool: ./tempita/compat3.py RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file ./tempita/__init__.py ### RefactoringTool: Line 40: Calls to builtin next() possibly shadowed by global binding RefactoringTool: ### In file ./tempita/compat3.py ### RefactoringTool: Line 23: Calls to builtin next() possibly shadowed by global binding --- ./tempita/__init__.py (original) +++ ./tempita/__init__.py (refactored) @@ -32,10 +32,10 @@ import re import sys import cgi -from urllib import quote as url_quote +from urllib.parse import quote as url_quote import os import tokenize -from cStringIO import StringIO +from io import StringIO from tempita._looper import looper from tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text @@ -101,7 +101,7 @@ delimiters = (self.default_namespace['start_braces'], self.default_namespace['end_braces']) else: - assert len(delimiters) == 2 and all([isinstance(delimeter, basestring) + assert len(delimiters) == 2 and all([isinstance(delimeter, str) for delimeter in delimiters]) self.default_namespace = self.__class__.default_namespace.copy() self.default_namespace['start_braces'] = delimiters[0] @@ -196,7 +196,7 @@ position=None, name=self.name) templ = self.get_template(inherit_template, self) self_ = TemplateObject(self.name) - for name, value in defs.iteritems(): + for name, value in defs.items(): setattr(self_, name, value) self_.body = body ns = ns.copy() @@ -292,7 +292,7 @@ try: try: value = eval(code, self.default_namespace, ns) - except SyntaxError, e: + except SyntaxError as e: raise SyntaxError( 'invalid syntax in expression: %s' % code) return value @@ -304,12 +304,12 @@ else: arg0 = coerce_text(e) e.args = (self._add_line_info(arg0, pos),) - raise exc_info[0], e, exc_info[2] + raise exc_info[0](e).with_traceback(exc_info[2]) def _exec(self, code, ns, pos): __traceback_hide__ = True try: - exec code in self.default_namespace, ns + exec(code, self.default_namespace, ns) except: exc_info = sys.exc_info() e = exc_info[1] @@ -317,7 +317,7 @@ e.args = (self._add_line_info(e.args[0], pos),) else: e.args = (self._add_line_info(None, pos),) - raise exc_info[0], e, exc_info[2] + raise exc_info[0](e).with_traceback(exc_info[2]) def _repr(self, value, pos): __traceback_hide__ = True @@ -326,7 +326,7 @@ return '' if self._unicode: try: - value = unicode(value) + value = str(value) except UnicodeDecodeError: value = bytes(value) else: @@ -339,7 +339,7 @@ exc_info = sys.exc_info() e = exc_info[1] e.args = (self._add_line_info(e.args[0], pos),) - raise exc_info[0], e, exc_info[2] + raise exc_info[0](e).with_traceback(exc_info[2]) else: if self._unicode and isinstance(value, bytes): if not self.default_encoding: @@ -348,7 +348,7 @@ '(no default_encoding provided)' % value) try: value = value.decode(self.default_encoding) - except UnicodeDecodeError, e: + except UnicodeDecodeError as e: raise UnicodeDecodeError( e.encoding, e.object, @@ -385,7 +385,7 @@ class bunch(dict): def __init__(self, **kw): - for name, value in kw.iteritems(): + for name, value in kw.items(): setattr(self, name, value) def __setattr__(self, name, value): @@ -408,7 +408,7 @@ def __repr__(self): items = [ - (k, v) for k, v in self.iteritems()] + (k, v) for k, v in self.items()] items.sort() return '<%s %s>' % ( self.__class__.__name__, @@ -461,7 +461,7 @@ def attr(**kw): - kw = list(kw.iteritems()) + kw = list(kw.items()) kw.sort() parts = [] for name, value in kw: @@ -543,7 +543,7 @@ values = {} sig_args, var_args, var_kw, defaults = self._func_signature extra_kw = {} - for name, value in kw.iteritems(): + for name, value in kw.items(): if not var_kw and name not in sig_args: raise TypeError( 'Unexpected argument %s' % name) @@ -566,7 +566,7 @@ raise TypeError( 'Extra position arguments: %s' % ', '.join(repr(v) for v in args)) - for name, value_expr in defaults.iteritems(): + for name, value_expr in defaults.items(): if name not in values: values[name] = self._template._eval( value_expr, self._ns, self._pos) @@ -612,7 +612,7 @@ return 'Empty' def __unicode__(self): - return u'' + return '' def __iter__(self): return iter(()) @@ -1156,7 +1156,7 @@ vars.update(os.environ) for value in args: if '=' not in value: - print('Bad argument: %r' % value) + print(('Bad argument: %r' % value)) sys.exit(2) name, value = value.split('=', 1) if name.startswith('py:'): --- ./tempita/compat3.py (original) +++ ./tempita/compat3.py (refactored) @@ -4,7 +4,7 @@ if sys.version < "3": b = bytes = str - basestring_ = basestring + basestring_ = str else: def b(s): @@ -18,14 +18,14 @@ if sys.version < "3": def next(obj): - return obj.next() + return obj.__next__() else: next = next if sys.version < "3": def is_unicode(obj): - return isinstance(obj, unicode) + return isinstance(obj, str) else: def is_unicode(obj): @@ -39,7 +39,7 @@ else: attr = '__str__' if hasattr(v, attr): - return unicode(v) + return str(v) else: return bytes(v) return v running build running build_py creating build creating build/lib creating build/lib/tempita copying tempita/_looper.py -> build/lib/tempita copying tempita/__main__.py -> build/lib/tempita copying tempita/compat3.py -> build/lib/tempita copying tempita/__init__.py -> build/lib/tempita running egg_info writing Tempita.egg-info/PKG-INFO writing dependency_links to Tempita.egg-info/dependency_links.txt writing top-level names to Tempita.egg-info/top_level.txt reading manifest file 'Tempita.egg-info/SOURCES.txt' writing manifest file 'Tempita.egg-info/SOURCES.txt' >>> py3-tempita: Entering fakeroot... running install /usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running egg_info writing Tempita.egg-info/PKG-INFO writing dependency_links to Tempita.egg-info/dependency_links.txt writing top-level names to Tempita.egg-info/top_level.txt reading manifest file 'Tempita.egg-info/SOURCES.txt' writing manifest file 'Tempita.egg-info/SOURCES.txt' running install_lib creating /home/buildozer/aports/community/py3-tempita/pkg creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10 creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita copying build/lib/tempita/_looper.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita copying build/lib/tempita/__main__.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita copying build/lib/tempita/compat3.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita copying build/lib/tempita/__init__.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita/_looper.py to _looper.cpython-310.pyc byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita/__main__.py to __main__.cpython-310.pyc byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita/compat3.py to compat3.cpython-310.pyc byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/tempita/__init__.py to __init__.cpython-310.pyc running install_egg_info Copying Tempita.egg-info to /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.10/site-packages/Tempita-0.5.2-py3.10.egg-info running install_scripts >>> py3-tempita*: Running postcheck for py3-tempita >>> py3-tempita*: Preparing package py3-tempita... >>> py3-tempita*: Tracing dependencies... >>> py3-tempita*: Package size: 156.0 KB >>> py3-tempita*: Compressing data... >>> py3-tempita*: Create checksum... >>> py3-tempita*: Create py3-tempita-0.5.2-r9.apk >>> py3-tempita: Build complete at Sat, 29 Oct 2022 10:40:42 +0000 elapsed time 0h 0m 11s >>> py3-tempita: Cleaning up srcdir >>> py3-tempita: Cleaning up pkgdir >>> py3-tempita: Uninstalling dependencies... (1/12) Purging .makedepends-py3-tempita (20221029.104040) (2/12) Purging py3-setuptools (65.5.0-r0) (3/12) Purging py3-packaging (21.3-r2) (4/12) Purging py3-parsing (3.0.9-r0) (5/12) Purging python3 (3.10.8-r3) (6/12) Purging libbz2 (1.0.8-r3) (7/12) Purging libffi (3.4.4-r0) (8/12) Purging gdbm (1.23-r0) (9/12) Purging xz-libs (5.2.7-r0) (10/12) Purging mpdecimal (2.5.1-r1) (11/12) Purging readline (8.2.0-r0) (12/12) Purging sqlite-libs (3.39.4-r0) Executing busybox-1.35.0-r27.trigger OK: 189 MiB in 92 packages >>> py3-tempita: Updating the community/armv7 repository index... >>> py3-tempita: Signing the index...