>>> py3-tempita: Building community/py3-tempita 0.5.2-r8 (using abuild 3.9.0_rc2-r1) started Wed, 20 Oct 2021 18:49:38 +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/15) Installing libbz2 (1.0.8-r1) (2/15) Installing libffi (3.4.2-r1) (3/15) Installing gdbm (1.20-r2) (4/15) Installing xz-libs (5.2.5-r0) (5/15) Installing mpdecimal (2.5.1-r1) (6/15) Installing readline (8.1.1-r0) (7/15) Installing sqlite-libs (3.36.0-r0) (8/15) Installing python3 (3.9.7-r3) (9/15) Installing py3-ordered-set (4.0.2-r2) (10/15) Installing py3-appdirs (1.4.4-r2) (11/15) Installing py3-parsing (2.4.7-r2) (12/15) Installing py3-six (1.16.0-r0) (13/15) Installing py3-packaging (20.9-r1) (14/15) Installing py3-setuptools (52.0.0-r4) (15/15) Installing .makedepends-py3-tempita (20211020.184948) Executing busybox-1.34.1-r1.trigger OK: 367 MiB in 104 packages >>> py3-tempita: Cleaning up srcdir >>> py3-tempita: Cleaning up pkgdir >>> py3-tempita: Fetching https://distfiles.alpinelinux.org/distfiles/v3.15/Tempita-0.5.2.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 >>> py3-tempita: Fetching https://files.pythonhosted.org/packages/source/T/Tempita/Tempita-0.5.2.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 12648 100 12648 0 0 148k 0 --:--:-- --:--:-- --:--:-- 148k >>> py3-tempita: Fetching https://distfiles.alpinelinux.org/distfiles/v3.15/Tempita-0.5.2.tar.gz >>> py3-tempita: Checking sha512sums... Tempita-0.5.2.tar.gz: OK >>> py3-tempita: Unpacking /var/cache/distfiles/v3.15/Tempita-0.5.2.tar.gz... 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/__init__.py -> build/lib/tempita copying tempita/__main__.py -> build/lib/tempita copying tempita/_looper.py -> build/lib/tempita copying tempita/compat3.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' /usr/lib/python3.9/site-packages/setuptools/lib2to3_ex.py:36: SetuptoolsDeprecationWarning: 2to3 support is deprecated. If the project still requires Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process. warnings.warn( Fixing build/lib/tempita/__init__.py build/lib/tempita/__main__.py build/lib/tempita/_looper.py build/lib/tempita/compat3.py Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma Fixing build/lib/tempita/__init__.py build/lib/tempita/__main__.py build/lib/tempita/_looper.py build/lib/tempita/compat3.py Skipping optional fixer: buffer Skipping optional fixer: idioms Skipping optional fixer: set_literal Skipping optional fixer: ws_comma >>> py3-tempita: Entering fakeroot... running install 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.9 creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages creating /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita copying build/lib/tempita/__init__.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita copying build/lib/tempita/__main__.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita copying build/lib/tempita/_looper.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita copying build/lib/tempita/compat3.py -> /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita/__init__.py to __init__.cpython-39.pyc byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita/__main__.py to __main__.cpython-39.pyc byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita/_looper.py to _looper.cpython-39.pyc byte-compiling /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/tempita/compat3.py to compat3.cpython-39.pyc running install_egg_info Copying Tempita.egg-info to /home/buildozer/aports/community/py3-tempita/pkg/py3-tempita/usr/lib/python3.9/site-packages/Tempita-0.5.2-py3.9.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-r8.apk >>> py3-tempita: Build complete at Wed, 20 Oct 2021 18:49:53 +0000 elapsed time 0h 0m 15s >>> py3-tempita: Cleaning up srcdir >>> py3-tempita: Cleaning up pkgdir >>> py3-tempita: Uninstalling dependencies... (1/15) Purging .makedepends-py3-tempita (20211020.184948) (2/15) Purging py3-setuptools (52.0.0-r4) (3/15) Purging py3-ordered-set (4.0.2-r2) (4/15) Purging py3-appdirs (1.4.4-r2) (5/15) Purging py3-packaging (20.9-r1) (6/15) Purging py3-parsing (2.4.7-r2) (7/15) Purging py3-six (1.16.0-r0) (8/15) Purging python3 (3.9.7-r3) (9/15) Purging libbz2 (1.0.8-r1) (10/15) Purging libffi (3.4.2-r1) (11/15) Purging gdbm (1.20-r2) (12/15) Purging xz-libs (5.2.5-r0) (13/15) Purging mpdecimal (2.5.1-r1) (14/15) Purging readline (8.1.1-r0) (15/15) Purging sqlite-libs (3.36.0-r0) Executing busybox-1.34.1-r1.trigger OK: 316 MiB in 89 packages >>> py3-tempita: Updating the community/x86 repository index... >>> py3-tempita: Signing the index...