diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-03 14:59:59 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-03 14:59:59 +0000 |
commit | 529abfa74a08ae5099db9780bcdf8250aa52ecb6 (patch) | |
tree | 2e2d1a9fd6e89b4872499afea3dc57490271e69c /dev-python/tempita | |
parent | e6ba529df30e3fc9dfdf55ec5797f2f764df6e54 (diff) |
gentoo auto-resync : 03:12:2022 - 14:59:58
Diffstat (limited to 'dev-python/tempita')
-rw-r--r-- | dev-python/tempita/Manifest | 5 | ||||
-rw-r--r-- | dev-python/tempita/files/tempita-0.5.3-2to3.patch | 233 | ||||
-rw-r--r-- | dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch | 31 | ||||
-rw-r--r-- | dev-python/tempita/metadata.xml | 12 | ||||
-rw-r--r-- | dev-python/tempita/tempita-0.5.3-r3.ebuild | 46 |
5 files changed, 0 insertions, 327 deletions
diff --git a/dev-python/tempita/Manifest b/dev-python/tempita/Manifest deleted file mode 100644 index 9b5c32849e03..000000000000 --- a/dev-python/tempita/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -AUX tempita-0.5.3-2to3.patch 7945 BLAKE2B 87af52b30c6c1a0cd6de3fa3a3406be8ba93f04d0a3c10598c24353a16123544300dbc8aff39fe7b145a26797f99b8c41e51145906eb0cfc93887cb301b25a7e SHA512 ad1eaf06dcb303c79b7774554f2fa02ef59d66ddf457b32c876b1a391c1d2c82cdd0cdd8db01601d9899144d0b43ba6517211610f33f6ca181028f052f339214 -AUX tempita-0.5.3-cgi-escape.patch 1109 BLAKE2B bf11e4e5c284709c62d6ddb5413bececd76079a84352c806921585fed33e77c9b4f34a032e60d18f900546ce4ef716532a3901744752cee2dbfcabfb383e981e SHA512 da9e3c8adf984daa3da2d695e56633ea45fb2424f1cf10d8e939cb915fcfda3bee67ed0039838916ddb05d749e4229336eea51b7878e5ece9a4c66750ecf8f4a -DIST tempita-0.5.3-bitbucket.tar.gz 22756 BLAKE2B 59d273b1dc206eea452f7e5265d59b3ef1248b2d920eae559d74f4c569852b2a127e2a906f866cb748a12663dca944d9080413410edd5c69bd93b0d9574e3026 SHA512 cebe443bf0fc7705304fe127c796801acb6cdc54e79315c2afddb79ece1d04427852c1d0924ab9dd54520b584ae09a0644a20ff2dd6ed0408ee103f5b3fb9410 -EBUILD tempita-0.5.3-r3.ebuild 1225 BLAKE2B af627892fc7759d98cda27b0096104f2acb1b16a71fab78658bc7e01f4dbd1be61fec4ab84322b4bb54916a7fad8a294b7faed57f7fdad61790b13ae482a782d SHA512 4f770be1da91c338331732fb322aa22b1baf083311cb7fea6037cf8a2a8f18fa9fa718add31b2dec7c1f1801ec25d5caed0356f50b342a4197a1bf5eac7e5bf1 -MISC metadata.xml 346 BLAKE2B 7329c43e25665d974bd46e52e0a84f52ceef7ec073275a7295327e1df3704280544d4630f85d204ba3bf6a9c66761c207ade114d6928def75bfcb4047b367de0 SHA512 f03e63b064cb84ed74ed187f0d88263d86ad73eddb03c0df00bb2b5ca8811de068e25e55e4602eb959d044f0c8bb82d892eb67925698199ba7740854686449e2 diff --git a/dev-python/tempita/files/tempita-0.5.3-2to3.patch b/dev-python/tempita/files/tempita-0.5.3-2to3.patch deleted file mode 100644 index d2aaae6546c1..000000000000 --- a/dev-python/tempita/files/tempita-0.5.3-2to3.patch +++ /dev/null @@ -1,233 +0,0 @@ -commit d886499651add63bbb944c25fc56a276cc2a7884 -Author: Louis Sautier <sautier.louis@gmail.com> -Date: Thu Sep 9 23:35:03 2021 +0200 - - Stop using deprecated 2to3 option for setuptools - -diff --git a/setup.py b/setup.py -index f575020..678b555 100644 ---- a/setup.py -+++ b/setup.py -@@ -36,5 +36,4 @@ more to learn about it. - test_suite='nose.collector', - include_package_data=True, - zip_safe=True, -- use_2to3=True, - ) -diff --git a/tempita/__init__.py b/tempita/__init__.py -index acc2fd9..a3cb8a1 100755 ---- a/tempita/__init__.py -+++ b/tempita/__init__.py -@@ -35,9 +35,9 @@ import os - import re - import sys - import tokenize --from cStringIO import StringIO -+from io import StringIO - from html import escape --from urllib import quote as url_quote -+from urllib.parse import quote as url_quote - from tempita._looper import looper - from tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text - -@@ -103,7 +103,7 @@ class Template(object): - 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] -@@ -198,7 +198,7 @@ class Template(object): - 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() -@@ -294,7 +294,7 @@ class Template(object): - 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 -@@ -306,12 +306,12 @@ class Template(object): - 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] -@@ -319,7 +319,7 @@ class Template(object): - 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 -@@ -328,7 +328,7 @@ class Template(object): - return '' - if self._unicode: - try: -- value = unicode(value) -+ value = str(value) - except UnicodeDecodeError: - value = bytes(value) - else: -@@ -341,7 +341,7 @@ class Template(object): - 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: -@@ -350,7 +350,7 @@ class Template(object): - '(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, -@@ -387,7 +387,7 @@ def paste_script_template_renderer(content, vars, filename=None): - 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): -@@ -410,7 +410,7 @@ class bunch(dict): - - 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__, -@@ -463,7 +463,7 @@ def url(v): - - - def attr(**kw): -- kw = list(kw.iteritems()) -+ kw = list(kw.items()) - kw.sort() - parts = [] - for name, value in kw: -@@ -545,7 +545,7 @@ class TemplateDef(object): - 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) -@@ -568,7 +568,7 @@ class TemplateDef(object): - 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) -@@ -614,7 +614,7 @@ class _Empty(object): - return 'Empty' - - def __unicode__(self): -- return u'' -+ return '' - - def __iter__(self): - return iter(()) -@@ -1164,7 +1164,7 @@ def fill_command(args=None): - 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:'): -diff --git a/tempita/_looper.py b/tempita/_looper.py -index 6784c7c..70aded7 100644 ---- a/tempita/_looper.py -+++ b/tempita/_looper.py -@@ -7,9 +7,9 @@ These can be awkward to manage in a normal Python loop, but using the - looper you can get a better sense of the context. Use like:: - - >>> for loop, item in looper(['a', 'b', 'c']): -- ... print loop.number, item -+ ... print(loop.number, item) - ... if not loop.last: -- ... print '---' -+ ... print('---') - 1 a - --- - 2 b -@@ -161,3 +161,4 @@ class loop_pos(object): - return getter(item) != getter(other) - else: - return item[getter] != other[getter] -+ -diff --git a/tempita/compat3.py b/tempita/compat3.py -index 5e18fa0..f17f588 100644 ---- a/tempita/compat3.py -+++ b/tempita/compat3.py -@@ -4,7 +4,7 @@ __all__ = ['b', 'basestring_', 'bytes', 'next', 'is_unicode'] - - if sys.version < "3": - b = bytes = str -- basestring_ = basestring -+ basestring_ = str - else: - - def b(s): -@@ -18,14 +18,14 @@ text = str - 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 @@ def coerce_text(v): - else: - attr = '__str__' - if hasattr(v, attr): -- return unicode(v) -+ return str(v) - else: - return bytes(v) - return v diff --git a/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch b/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch deleted file mode 100644 index d411d28ced48..000000000000 --- a/dev-python/tempita/files/tempita-0.5.3-cgi-escape.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/tempita/__init__.py b/tempita/__init__.py -index 137ba2d..acc2fd9 100755 ---- a/tempita/__init__.py -+++ b/tempita/__init__.py -@@ -31,12 +31,12 @@ can use ``__name='tmpl.html'`` to set the name of the template. - If there are syntax errors ``TemplateError`` will be raised. - """ - --import cgi - import os - import re - import sys - import tokenize - from cStringIO import StringIO -+from html import escape - from urllib import quote as url_quote - from tempita._looper import looper - from tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text -@@ -445,10 +445,10 @@ def html_quote(value, force=True): - if not isinstance(value, basestring_): - value = coerce_text(value) - if sys.version >= "3" and isinstance(value, bytes): -- value = cgi.escape(value.decode('latin1'), 1) -+ value = escape(value.decode('latin1'), 1) - value = value.encode('latin1') - else: -- value = cgi.escape(value, 1) -+ value = escape(value, 1) - if sys.version < "3": - if is_unicode(value): - value = value.encode('ascii', 'xmlcharrefreplace') diff --git a/dev-python/tempita/metadata.xml b/dev-python/tempita/metadata.xml deleted file mode 100644 index d1cf4b0c2906..000000000000 --- a/dev-python/tempita/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>python@gentoo.org</email> - <name>Python</name> - </maintainer> - <stabilize-allarches/> - <upstream> - <remote-id type="pypi">Tempita</remote-id> - </upstream> -</pkgmetadata> diff --git a/dev-python/tempita/tempita-0.5.3-r3.ebuild b/dev-python/tempita/tempita-0.5.3-r3.ebuild deleted file mode 100644 index be3b68c6bb55..000000000000 --- a/dev-python/tempita/tempita-0.5.3-r3.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( pypy3 python3_{8..10} ) -# The package uses pkg_resources -DISTUTILS_USE_SETUPTOOLS=manual - -inherit distutils-r1 - -MY_COMMIT="97392d008cc8" - -DESCRIPTION="A very small text templating language" -HOMEPAGE="https://pypi.org/project/Tempita/" -# Tests are not published on PyPI -SRC_URI="https://bitbucket.org/ianb/${PN}/get/${MY_COMMIT}.tar.gz -> ${P}-bitbucket.tar.gz" -S="${WORKDIR}/ianb-${PN}-${MY_COMMIT}" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" - -RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" -BDEPEND="${RDEPEND}" - -PATCHES=( - # cgi.escape has been removed in Python 3.9 - "${FILESDIR}/${P}-cgi-escape.patch" - # The 2to3 option for setuptools is deprecated - "${FILESDIR}/${P}-2to3.patch" -) - -distutils_enable_sphinx docs -distutils_enable_tests pytest - -python_prepare_all() { - # Remove reference to a non-existent CSS file - # in order to make sphinx use its default theme. - sed -i '/^html_style =/d' docs/conf.py || die - distutils-r1_python_prepare_all -} - -python_test() { - epytest tests/test_template.txt docs/index.txt -} |