Hello community,
here is the log from the commit of package python-translationstring for
openSUSE:Factory checked in at 2020-07-27 17:37:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-translationstring (Old)
and /work/SRC/openSUSE:Factory/.python-translationstring.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-translationstring"
Mon Jul 27 17:37:37 2020 rev:7 rq:822789 version:1.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-translationstring/python-translationstring.changes
2018-02-15 13:27:38.291329750 +0100
+++
/work/SRC/openSUSE:Factory/.python-translationstring.new.3592/python-translationstring.changes
2020-07-27 17:37:54.182856522 +0200
@@ -1,0 +2,8 @@
+Thu Jul 23 13:22:08 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to 1.4
+ * Drop support for Python 2.6, 3.2 and 3.
+ * Update license classifiers
+- drop use_pylons_theme.patch
+
+-------------------------------------------------------------------
Old:
----
translationstring-1.3.tar.gz
use_pylons_theme.patch
New:
----
translationstring-1.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-translationstring.spec ++++++
--- /var/tmp/diff_new_pack.pOj7of/_old 2020-07-27 17:37:55.174857487 +0200
+++ /var/tmp/diff_new_pack.pOj7of/_new 2020-07-27 17:37:55.178857491 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-translationstring
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -13,30 +13,28 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-translationstring
-Version: 1.3
+Version: 1.4
Release: 0
Summary: Utility library for i18n relied on by various Repoze and
Pyramid packages
License: SUSE-Repoze
Group: Development/Languages/Python
-Url: https://github.com/Pylons/translationstring
+URL: https://github.com/Pylons/translationstring
Source:
https://files.pythonhosted.org/packages/source/t/translationstring/translationstring-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM use_pylons_theme.patch -- Use pylons_sphinx_theme from
external package
-Patch0: use_pylons_theme.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: git
BuildRequires: python-rpm-macros
+BuildArch: noarch
# SECTION documentation requirements
BuildRequires: python3-Sphinx
BuildRequires: python3-pylons-sphinx-themes
# /SECTION
-BuildArch: noarch
%python_subpackages
%description
@@ -52,7 +50,6 @@
%package -n %{name}-doc
Summary: Documentation files for %{name}
Group: Development/Languages/Python
-Requires: %{name} = %{version}
Provides: %{python_module translationstring-doc = %{version}}
%description -n %{name}-doc
@@ -60,7 +57,6 @@
%prep
%setup -q -n translationstring-%{version}
-%patch0 -p1
# drop build date from doc to fix build-compare
sed -i "s/\(html_last_updated_fmt = \).*/\\1None/" docs/conf.py
rm -rf translationstring.egg-info
@@ -80,12 +76,11 @@
%python_exec setup.py test
%files %{python_files}
-%defattr(-,root,root,-)
-%doc CONTRIBUTORS.txt COPYRIGHT.txt LICENSE.txt README.rst
+%license LICENSE.txt
+%doc CONTRIBUTORS.txt COPYRIGHT.txt README.rst
%{python_sitelib}/*
%files -n %{name}-doc
-%defattr(-,root,root,-)
%doc docs/_build/html
%changelog
++++++ translationstring-1.3.tar.gz -> translationstring-1.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/CONTRIBUTORS.txt
new/translationstring-1.4/CONTRIBUTORS.txt
--- old/translationstring-1.3/CONTRIBUTORS.txt 2014-02-11 22:42:58.000000000
+0100
+++ new/translationstring-1.4/CONTRIBUTORS.txt 2020-07-09 13:58:22.000000000
+0200
@@ -104,3 +104,4 @@
- Chris McDonough, 2011/02/16
- Wichert Akkerman, 2012/02/02
+- Steve Piercy, 2015/05/05
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/PKG-INFO
new/translationstring-1.4/PKG-INFO
--- old/translationstring-1.3/PKG-INFO 2014-11-05 21:19:29.000000000 +0100
+++ new/translationstring-1.4/PKG-INFO 2020-07-09 13:58:27.000000000 +0200
@@ -1,32 +1,39 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: translationstring
-Version: 1.3
+Version: 1.4
Summary: Utility library for i18n relied on by various Repoze and Pyramid
packages
-Home-page: http://pylonsproject.org
+Home-page: https://github.com/Pylons/translationstring
Author: Chris McDonough, Agendaless Consulting
Author-email: [email protected]
License: BSD-like (http://repoze.org/license.html)
Description: translationstring
=================
- A library used by various `Pylons Project <http://pylonsproject.org>`_
- packages for internationalization (i18n) duties related to translation.
+ A library used by various `Pylons Project
<https://pylonsproject.org>`_ packages
+ for internationalization (i18n) duties related to translation.
- This package provides a *translation string* class, a *translation
- string factory* class, translation and pluralization primitives, and a
- utility that helps `Chameleon <http://chameleon.repoze.org>`_
- templates use translation facilities of this package. It does not
- depend on `Babel <http://babel.edgewall.org>`_, but its translation
- and pluralization services are meant to work best when provided with
- an instance of the ``babel.support.Translations`` class.
+ This package provides a *translation string* class, a *translation
string
+ factory* class, translation and pluralization primitives, and a
utility that
+ helps `Chameleon <https://chameleon.readthedocs.io/en/latest/>`_
templates use
+ translation facilities of this package. It does not depend on `Babel
+ <http://babel.pocoo.org/en/latest/>`_, but its translation and
pluralization
+ services are meant to work best when provided with an instance of the
+ ``babel.support.Translations`` class.
- Please see
http://docs.pylonsproject.org/projects/translationstring/dev/ or
- the ``docs/index.rst`` file in this package for the documentation.
+ Please see
https://docs.pylonsproject.org/projects/translationstring/en/latest/
+ for the documentation.
translationstring
=================
+ 1.4 (2020-07-09)
+ ----------------
+
+ - Drop support for Python 2.6, 3.2 and 3.
+ - Update license classifiers
+
+
1.3 (2014-11-05)
----------------
@@ -101,14 +108,15 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Localization
+Classifier: License :: Repoze Public License
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/README.rst
new/translationstring-1.4/README.rst
--- old/translationstring-1.3/README.rst 2014-11-05 21:17:14.000000000
+0100
+++ new/translationstring-1.4/README.rst 2020-07-09 13:58:22.000000000
+0200
@@ -1,16 +1,16 @@
translationstring
=================
-A library used by various `Pylons Project <http://pylonsproject.org>`_
-packages for internationalization (i18n) duties related to translation.
+A library used by various `Pylons Project <https://pylonsproject.org>`_
packages
+for internationalization (i18n) duties related to translation.
-This package provides a *translation string* class, a *translation
-string factory* class, translation and pluralization primitives, and a
-utility that helps `Chameleon <http://chameleon.repoze.org>`_
-templates use translation facilities of this package. It does not
-depend on `Babel <http://babel.edgewall.org>`_, but its translation
-and pluralization services are meant to work best when provided with
-an instance of the ``babel.support.Translations`` class.
+This package provides a *translation string* class, a *translation string
+factory* class, translation and pluralization primitives, and a utility that
+helps `Chameleon <https://chameleon.readthedocs.io/en/latest/>`_ templates use
+translation facilities of this package. It does not depend on `Babel
+<http://babel.pocoo.org/en/latest/>`_, but its translation and pluralization
+services are meant to work best when provided with an instance of the
+``babel.support.Translations`` class.
-Please see http://docs.pylonsproject.org/projects/translationstring/dev/ or
-the ``docs/index.rst`` file in this package for the documentation.
+Please see https://docs.pylonsproject.org/projects/translationstring/en/latest/
+for the documentation.
Binary files old/translationstring-1.3/docs/.static/logo_hi.gif and
new/translationstring-1.4/docs/.static/logo_hi.gif differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/docs/.static/repoze.css
new/translationstring-1.4/docs/.static/repoze.css
--- old/translationstring-1.3/docs/.static/repoze.css 2014-02-11
22:42:58.000000000 +0100
+++ new/translationstring-1.4/docs/.static/repoze.css 1970-01-01
01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-@import url('default.css');
-body {
- background-color: #006339;
-}
-
-div.document {
- background-color: #dad3bd;
-}
-
-div.sphinxsidebar h3, h4, h5, a {
- color: #127c56 !important;
-}
-
-div.related {
- color: #dad3bd !important;
- background-color: #00744a;
-}
-
-div.related a {
- color: #dad3bd !important;
-}
-
-/* override the justify text align of the default */
-
-div.body p {
- text-align: left !important;
-}
-
-/* fix google chrome <pre> tag renderings */
-
-pre {
- line-height: normal !important;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/docs/Makefile
new/translationstring-1.4/docs/Makefile
--- old/translationstring-1.3/docs/Makefile 2014-02-11 22:42:58.000000000
+0100
+++ new/translationstring-1.4/docs/Makefile 2020-07-09 13:58:22.000000000
+0200
@@ -25,7 +25,7 @@
clean:
-rm -rf _build/*
-html: _themes
+html:
mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@@ -47,7 +47,7 @@
web: pickle
-htmlhelp: _themes
+htmlhelp:
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@@ -83,6 +83,3 @@
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) _build/epub
@echo
@echo "Build finished. The epub file is in _build/epub."
-
-_themes:
- cd ..; git submodule update --init; cd docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/docs/chameleon.rst
new/translationstring-1.4/docs/chameleon.rst
--- old/translationstring-1.3/docs/chameleon.rst 2014-02-11
22:42:58.000000000 +0100
+++ new/translationstring-1.4/docs/chameleon.rst 2020-07-09
13:58:22.000000000 +0200
@@ -1,5 +1,5 @@
Chameleon Translate Function Support
-=====================================
+====================================
:func:`translationstring.ChameleonTranslate` is a function which
returns a callable suitable for use as the ``translate`` argument to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/docs/conf.py
new/translationstring-1.4/docs/conf.py
--- old/translationstring-1.3/docs/conf.py 2014-02-11 22:42:58.000000000
+0100
+++ new/translationstring-1.4/docs/conf.py 2020-07-09 13:58:22.000000000
+0200
@@ -12,24 +12,9 @@
# All configuration values have a default value; values that are commented
# out serve to show the default value.
-import sys, os
-
-# If your extensions are in another directory, add it here. If the
-# directory is relative to the documentation root, use os.path.abspath to
-# make it absolute, like shown here.
-#sys.path.append(os.path.abspath('some/directory'))
-
-parent = os.path.dirname(os.path.dirname(__file__))
-sys.path.append(os.path.abspath(parent))
-wd = os.getcwd()
-os.chdir(parent)
-os.system('%s setup.py test -q' % sys.executable)
-os.chdir(wd)
-
-for item in os.listdir(parent):
- if item.endswith('.egg'):
- sys.path.append(os.path.join(parent, item))
-
+import sys, os, datetime
+import pkg_resources
+import pylons_sphinx_themes
# General configuration
# ---------------------
@@ -49,13 +34,14 @@
# General substitutions.
project = 'translationstring'
-copyright = '2011, Agendaless Consulting <[email protected]>'
+thisyear = datetime.datetime.now().year
+copyright = '2011-%s, Agendaless Consulting <[email protected]>'
% thisyear
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
-version = '0.4'
+version = pkg_resources.get_distribution('translationstring').version
# The full version, including alpha/beta/rc tags.
release = version
@@ -81,7 +67,7 @@
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
-#add_module_names = True
+add_module_names = False
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
@@ -93,11 +79,12 @@
# Options for HTML output
# -----------------------
-
-sys.path.append(os.path.abspath('_themes'))
-html_theme_path = ['_themes']
+# sys.path.append(os.path.abspath('_themes'))
html_theme = 'pyramid'
-html_theme_options =
dict(github_url='https://github.com/Pylons/translationstring')
+html_theme_path = pylons_sphinx_themes.get_html_themes_path()
+html_theme_options = dict(
+ github_url='https://github.com/Pylons/translationstring',
+ )
# The style sheet to use for HTML and HTML Help pages. A file of that name
@@ -115,7 +102,7 @@
# The name of an image file (within the static path) to place at the top of
# the sidebar.
-html_logo = '.static/logo_hi.gif'
+#html_logo = '.static/logo_hi.gif'
# The name of an image file (within the static path) to use as favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or
@@ -134,7 +121,7 @@
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
-#html_use_smartypants = True
+html_use_smartypants = False
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
@@ -187,7 +174,7 @@
# The name of an image file (relative to this directory) to place at the
# top of the title page.
-latex_logo = '.static/logo_hi.gif'
+#latex_logo = '.static/logo_hi.gif'
# For "manual" documents, if this is true, then toplevel headings are
# parts, not chapters.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/docs/glossary.rst
new/translationstring-1.4/docs/glossary.rst
--- old/translationstring-1.3/docs/glossary.rst 2014-02-11 22:42:58.000000000
+0100
+++ new/translationstring-1.4/docs/glossary.rst 2020-07-09 13:58:22.000000000
+0200
@@ -57,9 +57,9 @@
internationalization.
Babel
- A `collection of tools <http://babel.edgewall.org/>`_ for
+ A `collection of tools <http://babel.pocoo.org/en/latest/>`_ for
internationalizing Python applications.
Chameleon
- `chameleon <http://chameleon.repoze.org>`_ is templating language
- written and maintained by Malthe Borch.
+ `chameleon <https://chameleon.readthedocs.io/en/latest/>`_ is templating
+ language written and maintained by Malthe Borch.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/docs/index.rst
new/translationstring-1.4/docs/index.rst
--- old/translationstring-1.3/docs/index.rst 2014-02-11 22:42:58.000000000
+0100
+++ new/translationstring-1.4/docs/index.rst 2020-07-09 13:58:22.000000000
+0200
@@ -1,7 +1,7 @@
translationstring
=================
-A library used by various `Pylons Project <http://pylonsproject.org>`_
+A library used by various `Pylons Project <https://pylonsproject.org>`_
packages for internationalization (i18n) duties.
This package provides a :term:`translation string` class, a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/rtd.txt
new/translationstring-1.4/rtd.txt
--- old/translationstring-1.3/rtd.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/translationstring-1.4/rtd.txt 2020-07-09 13:58:22.000000000 +0200
@@ -0,0 +1 @@
+-e .[docs]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/setup.cfg
new/translationstring-1.4/setup.cfg
--- old/translationstring-1.3/setup.cfg 2014-11-05 21:19:29.000000000 +0100
+++ new/translationstring-1.4/setup.cfg 2020-07-09 13:58:27.000000000 +0200
@@ -14,5 +14,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/setup.py
new/translationstring-1.4/setup.py
--- old/translationstring-1.3/setup.py 2014-11-05 21:18:44.000000000 +0100
+++ new/translationstring-1.4/setup.py 2020-07-09 13:58:26.000000000 +0200
@@ -12,35 +12,44 @@
README = ''
CHANGES = ''
-setup(name='translationstring',
- version='1.3',
- description=('Utility library for i18n relied on by various Repoze '
- 'and Pyramid packages'),
- long_description=README + '\n\n' + CHANGES,
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "Programming Language :: Python :: 2",
- "Programming Language :: Python :: 2.6",
- "Programming Language :: Python :: 2.7",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.2",
- "Programming Language :: Python :: 3.3",
- "Programming Language :: Python :: 3.4",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
- "Topic :: Software Development :: Libraries :: Python Modules",
- "Topic :: Software Development :: Internationalization",
- "Topic :: Software Development :: Localization",
- ],
- keywords='i18n l10n internationalization localization gettext chameleon',
- author="Chris McDonough, Agendaless Consulting",
- author_email="[email protected]",
- url="http://pylonsproject.org",
- license="BSD-like (http://repoze.org/license.html)",
- packages=find_packages(),
- include_package_data=True,
- zip_safe=False,
- test_suite="translationstring",
- )
+docs_extras = [
+ 'Sphinx >= 1.3.1',
+ 'docutils',
+ 'pylons-sphinx-themes',
+]
+setup(
+ name='translationstring',
+ version='1.4',
+ description=('Utility library for i18n relied on by various Repoze '
+ 'and Pyramid packages'),
+ long_description=README + '\n\n' + CHANGES,
+ classifiers=[
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.3",
+ "Programming Language :: Python :: 3.4",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Topic :: Software Development :: Internationalization",
+ "Topic :: Software Development :: Localization",
+ "License :: Repoze Public License",
+ ],
+ keywords='i18n l10n internationalization localization gettext chameleon',
+ author="Chris McDonough, Agendaless Consulting",
+ author_email="[email protected]",
+ url="https://github.com/Pylons/translationstring",
+ license="BSD-like (http://repoze.org/license.html)",
+ packages=find_packages(),
+ include_package_data=True,
+ zip_safe=False,
+ test_suite="translationstring",
+ extras_require={
+ 'docs': docs_extras,
+ },
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/tox.ini
new/translationstring-1.4/tox.ini
--- old/translationstring-1.3/tox.ini 2014-11-05 21:17:14.000000000 +0100
+++ new/translationstring-1.4/tox.ini 2020-07-09 13:58:22.000000000 +0200
@@ -1,6 +1,6 @@
[tox]
-envlist =
- py26,py27,py32,jython,pypy,cover
+envlist =
+ py27,py33,py34,py35,pypy,cover,docs
[testenv]
commands =
@@ -8,10 +8,6 @@
deps =
Babel
-[testenv:jython]
-commands =
- jython setup.py test -q
-
[testenv:cover]
basepython =
python2.7
@@ -23,6 +19,13 @@
coverage==3.4
nosexcover
+[testenv:docs]
+basepython =
+ python2.7
+commands =
+ pip install translationstring[docs]
+ sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
+
# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/translationstring-1.3/translationstring/__init__.py
new/translationstring-1.4/translationstring/__init__.py
--- old/translationstring-1.3/translationstring/__init__.py 2014-11-05
21:17:14.000000000 +0100
+++ new/translationstring-1.4/translationstring/__init__.py 2020-07-09
13:58:22.000000000 +0200
@@ -74,7 +74,12 @@
domain = domain or msgid.domain and msgid.domain[:]
context = context or msgid.context and msgid.context[:]
default = default or msgid.default and msgid.default[:]
- mapping = mapping or msgid.mapping and msgid.mapping.copy()
+ if msgid.mapping:
+ if mapping:
+ for k, v in msgid.mapping.items():
+ mapping.setdefault(k, v)
+ else:
+ mapping = msgid.mapping.copy()
msgid = text_type(msgid)
self.domain = domain
self.context = context
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translationstring-1.3/translationstring/tests/test__init__.py
new/translationstring-1.4/translationstring/tests/test__init__.py
--- old/translationstring-1.3/translationstring/tests/test__init__.py
2014-11-05 21:17:14.000000000 +0100
+++ new/translationstring-1.4/translationstring/tests/test__init__.py
2020-07-09 13:58:22.000000000 +0200
@@ -3,10 +3,11 @@
from translationstring.compat import u
class TestTranslationString(unittest.TestCase):
+
def _getTargetClass(self):
from translationstring import TranslationString
return TranslationString
-
+
def _makeOne(self, msgid, **kw):
klass = self._getTargetClass()
return klass(msgid, **kw)
@@ -117,7 +118,7 @@
inst = self._makeOne('msgid', default='default', domain='domain',
mapping='mapping')
result = inst.__reduce__()
- self.assertEqual(result, (klass, (u('msgid'), 'domain', u('default'),
+ self.assertEqual(result, (klass, (u('msgid'), 'domain', u('default'),
'mapping', None)))
def test___getstate__(self):
@@ -128,6 +129,7 @@
(u('msgid'), 'domain', u('default'), 'mapping', None))
class TestTranslationStringFactory(unittest.TestCase):
+
def _makeOne(self, domain):
from translationstring import TranslationStringFactory
return TranslationStringFactory(domain)
@@ -144,7 +146,8 @@
user_factory = self._makeOne('user')
factory = self._makeOne('budge')
- wrapped_inst = user_factory('wrapped_msgid', mapping={'a':1},
default='default')
+ wrapped_inst = user_factory(
+ 'wrapped_msgid', mapping={'a':1}, default='default')
wrapper_inst = factory(wrapped_inst)
self.assertEqual(str(wrapper_inst), 'wrapped_msgid')
@@ -154,15 +157,31 @@
user_factory = self._makeOne('user')
factory = self._makeOne('budge')
- wrapped_inst = user_factory('wrapped_msgid', mapping={'a':1},
default='default')
- wrapper_inst = factory(wrapped_inst, mapping={'b':1},
default='other_default')
+ wrapped_inst = user_factory('wrapped_msgid', default='default')
+ wrapper_inst = factory(wrapped_inst, default='other_default')
self.assertEqual(str(wrapper_inst), 'wrapped_msgid')
- self.assertEqual(wrapper_inst.mapping, {'b':1})
self.assertEqual(wrapper_inst.default, 'other_default')
+ def test_msgid_is_translation_string_update_mapping(self):
+ user_factory = self._makeOne('user')
+ factory = self._makeOne('budge')
+
+ # if the inner msgid defines a mapping
+ wrapped_inst = user_factory('wrapped_msgid: ${a} ${b} ${c}',
+ mapping={'a': 1, 'b': 1},
+ default='default')
+ wrapper_inst = factory(wrapped_inst,
+ mapping={'b': 2, 'c': 2},
+ default='other_default')
+
+ self.assertEqual(str(wrapper_inst), 'wrapped_msgid: ${a} ${b} ${c}')
+ # it must be present when wrapped
+ self.assertEqual(wrapper_inst.mapping, {'a': 1, 'b': 2, 'c': 2})
+
class TestChameleonTranslate(unittest.TestCase):
+
def _makeOne(self, translator):
from translationstring import ChameleonTranslate
return ChameleonTranslate(translator)
@@ -216,6 +235,7 @@
class TestTranslator(unittest.TestCase):
+
def _makeOne(self, translations=None, policy=None):
from translationstring import Translator
return Translator(translations, policy)
@@ -225,7 +245,7 @@
tstring = DummyTranslationString('$abc', mapping=True)
result = inst(tstring)
self.assertEqual(result, 'interpolated')
-
+
def test_translations_None_interpolation_not_required(self):
inst = self._makeOne()
tstring = DummyTranslationString('msgid', mapping=False)
@@ -276,7 +296,7 @@
inst = self._makeOne()
result = inst('$abc', '$abc', 1, mapping={'abc':1})
self.assertEqual(result, '1')
-
+
def test_translations_None_interpolation_not_required(self):
inst = self._makeOne()
result = inst('msgid', 'msgid', 1)
@@ -292,6 +312,7 @@
self.assertEqual(result, 'translated')
class Test_ugettext_policy(unittest.TestCase):
+
def _callFUT(self, translations, tstring, domain, context):
from translationstring import ugettext_policy
return ugettext_policy(translations, tstring, domain, context)
@@ -314,6 +335,7 @@
self.assertEqual(result, u('p\xf8f'))
class Test_dugettext_policy(unittest.TestCase):
+
def _callFUT(self, translations, tstring, domain, context=None):
from translationstring import dugettext_policy
return dugettext_policy(translations, tstring, domain, context)
@@ -357,14 +379,16 @@
translations = DummyTranslations('result')
tstring = DummyTranslationString(u('p\xf8f'), context='button')
result = self._callFUT(translations, tstring, None)
- self.assertEqual(translations.params, ('messages',
u('button\x04p\xf8f'),))
+ self.assertEqual(translations.params,
+ ('messages', u('button\x04p\xf8f'),))
self.assertEqual(result, 'result')
def test_msgctxt_override(self):
translations = DummyTranslations('result')
tstring = DummyTranslationString(u('p\xf8f'), context='other')
result = self._callFUT(translations, tstring, None, context='button')
- self.assertEqual(translations.params, ('messages',
u('button\x04p\xf8f'),))
+ self.assertEqual(translations.params,
+ ('messages', u('button\x04p\xf8f'),))
self.assertEqual(result, 'result')
def test_msgctxt_no_translation_found(self):
@@ -374,10 +398,12 @@
self.assertEqual(result, u('p\xf8f'))
class Test_ungettext_policy(unittest.TestCase):
+
def _callFUT(self, translations, singular, plural, n, domain=None,
mapping=None, context=None):
from translationstring import ungettext_policy
- return ungettext_policy(translations, singular, plural, n, domain,
context)
+ return ungettext_policy(
+ translations, singular, plural, n, domain, context)
def test_it(self):
translations = DummyTranslations('result')
@@ -386,21 +412,27 @@
def test_msgctxt(self):
translations = DummyTranslations('result')
- result = self._callFUT(translations, u('p\xf8f'), 'plural', 1,
context='button')
- self.assertEqual(translations.params, (u('button\x04p\xf8f'),
'plural', 1))
+ result = self._callFUT(
+ translations, u('p\xf8f'), 'plural', 1, context='button')
+ self.assertEqual(translations.params,
+ (u('button\x04p\xf8f'), 'plural', 1))
self.assertEqual(result, 'result')
def test_msgctxt_no_translation(self):
translations = DummyTranslations(u('button\x04p\xf8f'))
- result = self._callFUT(translations, u('p\xf8f'), 'plural', 1,
context='button')
- self.assertEqual(translations.params, (u('button\x04p\xf8f'),
'plural', 1))
+ result = self._callFUT(
+ translations, u('p\xf8f'), 'plural', 1, context='button')
+ self.assertEqual(translations.params,
+ (u('button\x04p\xf8f'), 'plural', 1))
self.assertEqual(result, u('p\xf8f'))
class Test_dungettext_policy(unittest.TestCase):
+
def _callFUT(self, translations, singular, plural, n, domain=None,
mapping=None, context=None):
from translationstring import dungettext_policy
- return dungettext_policy(translations, singular, plural, n, domain,
context)
+ return dungettext_policy(
+ translations, singular, plural, n, domain, context)
def test_it_use_default_domain(self):
translations = DummyTranslations('result')
@@ -427,14 +459,15 @@
self.assertEqual(result, 'result')
class DummyTranslations(object):
+
def __init__(self, result, domain=None):
self.result = result
self.domain = domain
-
+
def gettext(self, tstring): # pragma: no cover
self.params = (tstring,)
return self.result
-
+
def ngettext(self, singular, plural, n): # pragma: no cover
self.params = (singular, plural, n)
return self.result
@@ -458,7 +491,9 @@
return self.result
class DummyTranslationString(text_type):
- def __new__(cls, msgid='', domain=None, default=None, mapping=None,
context=None):
+
+ def __new__(cls, msgid='', domain=None, default=None, mapping=None,
+ context=None):
self = text_type.__new__(cls, msgid)
text_type.__init__(self, msgid)
self.domain = domain
@@ -468,7 +503,6 @@
default = msgid
self.default = default
return self
-
+
def interpolate(self, translated=None):
return 'interpolated'
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translationstring-1.3/translationstring.egg-info/PKG-INFO
new/translationstring-1.4/translationstring.egg-info/PKG-INFO
--- old/translationstring-1.3/translationstring.egg-info/PKG-INFO
2014-11-05 21:19:29.000000000 +0100
+++ new/translationstring-1.4/translationstring.egg-info/PKG-INFO
2020-07-09 13:58:27.000000000 +0200
@@ -1,32 +1,39 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: translationstring
-Version: 1.3
+Version: 1.4
Summary: Utility library for i18n relied on by various Repoze and Pyramid
packages
-Home-page: http://pylonsproject.org
+Home-page: https://github.com/Pylons/translationstring
Author: Chris McDonough, Agendaless Consulting
Author-email: [email protected]
License: BSD-like (http://repoze.org/license.html)
Description: translationstring
=================
- A library used by various `Pylons Project <http://pylonsproject.org>`_
- packages for internationalization (i18n) duties related to translation.
+ A library used by various `Pylons Project
<https://pylonsproject.org>`_ packages
+ for internationalization (i18n) duties related to translation.
- This package provides a *translation string* class, a *translation
- string factory* class, translation and pluralization primitives, and a
- utility that helps `Chameleon <http://chameleon.repoze.org>`_
- templates use translation facilities of this package. It does not
- depend on `Babel <http://babel.edgewall.org>`_, but its translation
- and pluralization services are meant to work best when provided with
- an instance of the ``babel.support.Translations`` class.
+ This package provides a *translation string* class, a *translation
string
+ factory* class, translation and pluralization primitives, and a
utility that
+ helps `Chameleon <https://chameleon.readthedocs.io/en/latest/>`_
templates use
+ translation facilities of this package. It does not depend on `Babel
+ <http://babel.pocoo.org/en/latest/>`_, but its translation and
pluralization
+ services are meant to work best when provided with an instance of the
+ ``babel.support.Translations`` class.
- Please see
http://docs.pylonsproject.org/projects/translationstring/dev/ or
- the ``docs/index.rst`` file in this package for the documentation.
+ Please see
https://docs.pylonsproject.org/projects/translationstring/en/latest/
+ for the documentation.
translationstring
=================
+ 1.4 (2020-07-09)
+ ----------------
+
+ - Drop support for Python 2.6, 3.2 and 3.
+ - Update license classifiers
+
+
1.3 (2014-11-05)
----------------
@@ -101,14 +108,15 @@
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Localization
+Classifier: License :: Repoze Public License
+Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translationstring-1.3/translationstring.egg-info/SOURCES.txt
new/translationstring-1.4/translationstring.egg-info/SOURCES.txt
--- old/translationstring-1.3/translationstring.egg-info/SOURCES.txt
2014-11-05 21:19:29.000000000 +0100
+++ new/translationstring-1.4/translationstring.egg-info/SOURCES.txt
2020-07-09 13:58:27.000000000 +0200
@@ -3,6 +3,7 @@
LICENSE.txt
MANIFEST.in
README.rst
+rtd.txt
setup.cfg
setup.py
tox.ini
@@ -16,14 +17,13 @@
docs/pluralization.rst
docs/translation.rst
docs/tstrings.rst
-docs/.static/logo_hi.gif
-docs/.static/repoze.css
translationstring/__init__.py
translationstring/compat.py
translationstring.egg-info/PKG-INFO
translationstring.egg-info/SOURCES.txt
translationstring.egg-info/dependency_links.txt
translationstring.egg-info/not-zip-safe
+translationstring.egg-info/requires.txt
translationstring.egg-info/top_level.txt
translationstring/tests/__init__.py
translationstring/tests/test__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/translationstring-1.3/translationstring.egg-info/requires.txt
new/translationstring-1.4/translationstring.egg-info/requires.txt
--- old/translationstring-1.3/translationstring.egg-info/requires.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/translationstring-1.4/translationstring.egg-info/requires.txt
2020-07-09 13:58:27.000000000 +0200
@@ -0,0 +1,5 @@
+
+[docs]
+Sphinx>=1.3.1
+docutils
+pylons-sphinx-themes