Hello community,
here is the log from the commit of package python-oslo.i18n for
openSUSE:Factory checked in at 2020-06-05 20:14:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.i18n (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.i18n.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.i18n"
Fri Jun 5 20:14:21 2020 rev:16 rq:803591 version:4.0.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.i18n/python-oslo.i18n.changes
2020-03-24 22:32:24.553091310 +0100
+++
/work/SRC/openSUSE:Factory/.python-oslo.i18n.new.3606/python-oslo.i18n.changes
2020-06-05 20:16:17.230996527 +0200
@@ -1,0 +2,16 @@
+Tue May 12 09:43:53 UTC 2020 - [email protected]
+
+- update to version 4.0.1
+ - Use unittest.mock instead of third party mock
+ - tox: Trivial cleanup
+ - Update hacking for Python3
+ - Deprecate Message.translate in favor of Message.translation
+ - remove outdated header
+ - Integrate sphinxcontrib-apidoc
+ - Imported Translations from Zanata
+ - Allow Message.translate to handle unhashable inputs
+ - tox: Keeping going with docs
+ - Update master for stable/train
+ - [ussuri][goal] Drop python 2.7 support and testing
+
+-------------------------------------------------------------------
Old:
----
oslo.i18n-3.24.0.tar.gz
New:
----
oslo.i18n-4.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.i18n.spec ++++++
--- /var/tmp/diff_new_pack.e13jFE/_old 2020-06-05 20:16:18.779002223 +0200
+++ /var/tmp/diff_new_pack.e13jFE/_new 2020-06-05 20:16:18.783002237 +0200
@@ -17,13 +17,13 @@
Name: python-oslo.i18n
-Version: 3.24.0
+Version: 4.0.1
Release: 0
Summary: OpenStack i18n library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/oslo.i18n
-Source0:
https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-3.24.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/o/oslo.i18n/oslo.i18n-4.0.1.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-Babel >= 2.3.4
BuildRequires: python3-mock
@@ -56,12 +56,13 @@
Group: Development/Languages/Python
BuildRequires: python3-Sphinx
BuildRequires: python3-openstackdocstheme
+BuildRequires: python3-sphinxcontrib-apidoc
%description -n python-oslo.i18n-doc
Documentation for the oslo.i18n library.
%prep
-%autosetup -p1 -n oslo.i18n-3.24.0
+%autosetup -p1 -n oslo.i18n-4.0.1
%py_req_cleanup
%build
++++++ _service ++++++
--- /var/tmp/diff_new_pack.e13jFE/_old 2020-06-05 20:16:18.819002370 +0200
+++ /var/tmp/diff_new_pack.e13jFE/_new 2020-06-05 20:16:18.819002370 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/oslo.i18n/oslo.i18n.spec.j2</param>
+ <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/oslo.i18n/oslo.i18n.spec.j2</param>
<param name="output-name">python-oslo.i18n.spec</param>
- <param
name="requirements">https://raw.githubusercontent.com/openstack/oslo.i18n/stable/train/requirements.txt</param>
+ <param
name="requirements">https://opendev.org/openstack/oslo.i18n/raw/branch/stable/ussuri/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,oslo.i18n</param>
</service>
++++++ oslo.i18n-3.24.0.tar.gz -> oslo.i18n-4.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/.zuul.yaml
new/oslo.i18n-4.0.1/.zuul.yaml
--- old/oslo.i18n-3.24.0/.zuul.yaml 2019-09-04 16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/.zuul.yaml 2020-04-07 12:06:30.000000000 +0200
@@ -1,12 +1,10 @@
- project:
templates:
- check-requirements
- - lib-forward-testing
- lib-forward-testing-python3
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- - openstack-python-jobs
- - openstack-python3-train-jobs
+ - openstack-python3-ussuri-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/AUTHORS new/oslo.i18n-4.0.1/AUTHORS
--- old/oslo.i18n-3.24.0/AUTHORS 2019-09-04 16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/AUTHORS 2020-04-07 12:07:30.000000000 +0200
@@ -55,8 +55,10 @@
Ronald Bradford <[email protected]>
Rosario Di Somma <[email protected]>
Russell Bryant <[email protected]>
+Sean McGinnis <[email protected]>
Sean McGinnis <[email protected]>
Sergey Kraynev <[email protected]>
+Stephen Finucane <[email protected]>
Steve Martinelli <[email protected]>
Thomas Herve <[email protected]>
Tony Breeds <[email protected]>
@@ -69,6 +71,7 @@
Zhiteng Huang <[email protected]>
ZhongShengping <[email protected]>
Zhongyue Luo <[email protected]>
+caoyuan <[email protected]>
howardlee <[email protected]>
jacky06 <[email protected]>
kavithahr <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/ChangeLog
new/oslo.i18n-4.0.1/ChangeLog
--- old/oslo.i18n-3.24.0/ChangeLog 2019-09-04 16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/ChangeLog 2020-04-07 12:07:30.000000000 +0200
@@ -1,6 +1,33 @@
CHANGES
=======
+4.0.1
+-----
+
+* Use unittest.mock instead of third party mock
+* Update hacking for Python3
+
+4.0.0
+-----
+
+* remove outdated header
+* [ussuri][goal] Drop python 2.7 support and testing
+* tox: Trivial cleanup
+
+3.25.1
+------
+
+* Imported Translations from Zanata
+* Integrate sphinxcontrib-apidoc
+
+3.25.0
+------
+
+* tox: Keeping going with docs
+* Update master for stable/train
+* Deprecate Message.translate in favor of Message.translation
+* Allow Message.translate to handle unhashable inputs
+
3.24.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/PKG-INFO
new/oslo.i18n-4.0.1/PKG-INFO
--- old/oslo.i18n-3.24.0/PKG-INFO 2019-09-04 16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/PKG-INFO 2020-04-07 12:07:30.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: oslo.i18n
-Version: 3.24.0
+Version: 4.0.1
Summary: Oslo i18n library
Home-page: https://docs.openstack.org/oslo.i18n/latest
Author: OpenStack
@@ -45,8 +45,9 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/doc/requirements.txt
new/oslo.i18n-4.0.1/doc/requirements.txt
--- old/oslo.i18n-3.24.0/doc/requirements.txt 2019-09-04 16:24:15.000000000
+0200
+++ new/oslo.i18n-4.0.1/doc/requirements.txt 2020-04-07 12:06:30.000000000
+0200
@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD
+sphinx>=1.8.0,!=2.1.0 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
+sphinxcontrib-apidoc>=0.2.0 # BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/doc/source/conf.py
new/oslo.i18n-4.0.1/doc/source/conf.py
--- old/oslo.i18n-3.24.0/doc/source/conf.py 2019-09-04 16:24:15.000000000
+0200
+++ new/oslo.i18n-4.0.1/doc/source/conf.py 2020-04-07 12:06:30.000000000
+0200
@@ -12,17 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os
-import sys
-
-sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
- #'sphinx.ext.intersphinx',
+ 'sphinxcontrib.apidoc',
'openstackdocstheme'
]
@@ -32,13 +28,6 @@
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
-# autodoc generation is a bit aggressive and a nuisance when doing heavy
-# text edit cycles.
-# execute "export SPHINX_DEBUG=1" in your terminal to disable
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
# The master toctree document.
master_doc = 'index'
@@ -56,29 +45,18 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
-# html_theme_path = ["."]
-# html_theme = '_theme'
-# html_static_path = ['static']
html_theme = 'openstackdocs'
-html_use_modindex = True
-# Output file base name for HTML help builder.
-htmlhelp_basename = '%sdoc' % project
+# -- sphinxcontrib.apidoc configuration --------------------------------------
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass
-# [howto/manual]).
-latex_documents = [
- ('index',
- '%s.tex' % project,
- u'%s Documentation' % project,
- u'OpenStack Foundation', 'manual'),
+apidoc_module_dir = '../../oslo_i18n'
+apidoc_output_dir = 'reference/api'
+apidoc_excluded_paths = [
+ 'tests',
]
-
-# Example configuration for intersphinx: refer to the Python standard library.
-#intersphinx_mapping = {'http://docs.python.org/': None}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/doc/source/reference/index.rst
new/oslo.i18n-4.0.1/doc/source/reference/index.rst
--- old/oslo.i18n-3.24.0/doc/source/reference/index.rst 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/doc/source/reference/index.rst 2020-04-07
12:06:30.000000000 +0200
@@ -1,41 +1,9 @@
.. _api:
-===============
- oslo.i18n API
-===============
+=========================
+ oslo.i18n API Reference
+=========================
-oslo_i18n
-=========
+.. toctree::
-.. automodule:: oslo_i18n
-
-.. autoclass:: oslo_i18n.TranslatorFactory
- :members:
-
-.. seealso::
-
- An example of using a :class:`TranslatorFactory` is provided in
- :ref:`integration-module`.
-
-.. autofunction:: oslo_i18n.enable_lazy
-
-.. seealso::
-
- :ref:`lazy-translation`
-
-.. autofunction:: oslo_i18n.translate
-
-.. autofunction:: oslo_i18n.get_available_languages
-
-oslo_i18n.log
-=============
-
-.. automodule:: oslo_i18n.log
- :members:
-
-oslo_i18n.fixture
-=================
-
-.. automodule:: oslo_i18n.fixture
- :members:
- :special-members:
+ api/modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/lower-constraints.txt
new/oslo.i18n-4.0.1/lower-constraints.txt
--- old/oslo.i18n-3.24.0/lower-constraints.txt 2019-09-04 16:24:15.000000000
+0200
+++ new/oslo.i18n-4.0.1/lower-constraints.txt 2020-04-07 12:06:30.000000000
+0200
@@ -19,7 +19,6 @@
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
-mock==2.0.0
mox3==0.20.0
netaddr==0.7.18
openstackdocstheme==1.18.1
@@ -41,7 +40,7 @@
six==1.10.0
smmap==0.9.0
snowballstemmer==1.2.1
-Sphinx==1.6.5
+Sphinx==1.8.0
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
stevedore==1.20.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo.i18n.egg-info/PKG-INFO
new/oslo.i18n-4.0.1/oslo.i18n.egg-info/PKG-INFO
--- old/oslo.i18n-3.24.0/oslo.i18n.egg-info/PKG-INFO 2019-09-04
16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo.i18n.egg-info/PKG-INFO 2020-04-07
12:07:30.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: oslo.i18n
-Version: 3.24.0
+Version: 4.0.1
Summary: Oslo i18n library
Home-page: https://docs.openstack.org/oslo.i18n/latest
Author: OpenStack
@@ -45,8 +45,9 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo.i18n.egg-info/SOURCES.txt
new/oslo.i18n-4.0.1/oslo.i18n.egg-info/SOURCES.txt
--- old/oslo.i18n-3.24.0/oslo.i18n.egg-info/SOURCES.txt 2019-09-04
16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo.i18n.egg-info/SOURCES.txt 2020-04-07
12:07:30.000000000 +0200
@@ -67,6 +67,7 @@
oslo_i18n/tests/test_translate.py
oslo_i18n/tests/utils.py
releasenotes/notes/add-reno-996dd44974d53238.yaml
+releasenotes/notes/drop-python27-support-eb9c2ad3268f0c1f.yaml
releasenotes/source/conf.py
releasenotes/source/index.rst
releasenotes/source/ocata.rst
@@ -74,6 +75,7 @@
releasenotes/source/queens.rst
releasenotes/source/rocky.rst
releasenotes/source/stein.rst
+releasenotes/source/train.rst
releasenotes/source/unreleased.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo.i18n.egg-info/pbr.json
new/oslo.i18n-4.0.1/oslo.i18n.egg-info/pbr.json
--- old/oslo.i18n-3.24.0/oslo.i18n.egg-info/pbr.json 2019-09-04
16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo.i18n.egg-info/pbr.json 2020-04-07
12:07:30.000000000 +0200
@@ -1 +1 @@
-{"git_version": "91b39bb", "is_release": true}
\ No newline at end of file
+{"git_version": "34aaaf2", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/_message.py
new/oslo.i18n-4.0.1/oslo_i18n/_message.py
--- old/oslo.i18n-3.24.0/oslo_i18n/_message.py 2019-09-04 16:24:15.000000000
+0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/_message.py 2020-04-07 12:06:30.000000000
+0200
@@ -69,6 +69,41 @@
return msg
def translate(self, desired_locale=None):
+ """DEPRECATED: Use ``translation`` instead
+
+ This is a compatibility shim to allow callers a chance to move away
+ from using this function, which shadows a built-in function from our
+ parent class.
+ """
+ # We did a bad thing here. We shadowed the unicode built-in translate,
+ # which means there are circumstances where this function may be called
+ # with a desired_locale that is a non-string sequence or mapping type.
+ # This will not only result in incorrect behavior, it also fails
+ # because things like lists are not hashable, and we use the value in
+ # desired_locale as part of a dict key. If we see a non-string
+ # desired_locale, we know that the caller did not intend to call this
+ # form of translate and we should instead pass that along to the
+ # unicode implementation of translate.
+ #
+ # Unfortunately this doesn't entirely solve the problem as it would be
+ # possible for a caller to use a string as the mapping type and in that
+ # case we can't tell which version of translate they intended to call.
+ # That doesn't seem to be a common thing to do though. str.maketrans
+ # returns a dict, and that is probably the way most callers will create
+ # their mapping.
+ if (desired_locale is not None and
+ not isinstance(desired_locale, six.string_types)):
+ return super(Message, self).translate(desired_locale)
+ warnings.warn('Message.translate called with a string argument. '
+ 'If your intent was to translate the message into '
+ 'another language, please call Message.translation '
+ 'instead. If your intent was to call "translate" as '
+ 'defined by the str/unicode type, please use a dict or '
+ 'list mapping instead. String mappings will not work '
+ 'until this compatibility shim is removed.')
+ return self.translation(desired_locale)
+
+ def translation(self, desired_locale=None):
"""Translate this message to the desired locale.
:param desired_locale: The desired locale to translate the message to,
@@ -77,7 +112,6 @@
:returns: the translated message in unicode
"""
-
translated_message = Message._translate_msgid(self.msgid,
self.domain,
desired_locale,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/_translate.py
new/oslo.i18n-4.0.1/oslo_i18n/_translate.py
--- old/oslo.i18n-3.24.0/oslo_i18n/_translate.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/_translate.py 2020-04-07 12:06:30.000000000
+0200
@@ -45,7 +45,7 @@
if isinstance(message, _message.Message):
# Even after unicoding() we still need to check if we are
# running with translatable unicode before translating
- return message.translate(desired_locale)
+ return message.translation(desired_locale)
return obj
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/tests/test_factory.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_factory.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_factory.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_factory.py 2020-04-07
12:06:30.000000000 +0200
@@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
from oslotest import base as test_base
import six
@@ -61,18 +62,6 @@
r = tf.primary('some text')
self.assertNotIsInstance(r, _message.Message)
- def test_py2(self):
- _lazy.enable_lazy(False)
- with mock.patch.object(six, 'PY3', False):
- with mock.patch('gettext.translation') as translation:
- trans = mock.Mock()
- translation.return_value = trans
- trans.gettext.side_effect = AssertionError(
- 'should have called ugettext')
- tf = _factory.TranslatorFactory('domain')
- tf.primary('some text')
- trans.ugettext.assert_called_with('some text')
-
def test_py3(self):
_lazy.enable_lazy(False)
with mock.patch.object(six, 'PY3', True):
@@ -92,20 +81,6 @@
tf._make_log_translation_func('mylevel')
mtf.assert_called_with('domain-log-mylevel')
- def test_contextual_form_py2(self):
- _lazy.enable_lazy(False)
- with mock.patch.object(six, 'PY3', False):
- with mock.patch('gettext.translation') as translation:
- trans = mock.Mock()
- translation.return_value = trans
- trans.gettext.side_effect = AssertionError(
- 'should have called ugettext')
- trans.ugettext.return_value = "some text"
- tf = _factory.TranslatorFactory('domain')
- tf.contextual_form('context', 'some text')
- trans.ugettext.assert_called_with(
- "%s%s%s" % ('context', CONTEXT_SEPARATOR, 'some text'))
-
def test_contextual_form_py3(self):
_lazy.enable_lazy(False)
with mock.patch.object(six, 'PY3', True):
@@ -120,19 +95,6 @@
trans.gettext.assert_called_with(
"%s%s%s" % ('context', CONTEXT_SEPARATOR, 'some text'))
- def test_plural_form_py2(self):
- _lazy.enable_lazy(False)
- with mock.patch.object(six, 'PY3', False):
- with mock.patch('gettext.translation') as translation:
- trans = mock.Mock()
- translation.return_value = trans
- trans.ngettext.side_effect = AssertionError(
- 'should have called ungettext')
- tf = _factory.TranslatorFactory('domain')
- tf.plural_form('single', 'plural', 1)
- trans.ungettext.assert_called_with(
- 'single', 'plural', 1)
-
def test_plural_form_py3(self):
_lazy.enable_lazy(False)
with mock.patch.object(six, 'PY3', True):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.i18n-3.24.0/oslo_i18n/tests/test_gettextutils.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_gettextutils.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_gettextutils.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_gettextutils.py 2020-04-07
12:06:30.000000000 +0200
@@ -16,9 +16,9 @@
import gettext
import logging
+from unittest import mock
from babel import localedata
-import mock
from oslotest import base as test_base
import six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/tests/test_handler.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_handler.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_handler.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_handler.py 2020-04-07
12:06:30.000000000 +0200
@@ -15,8 +15,8 @@
# under the License.
import logging
+from unittest import mock
-import mock
from oslotest import base as test_base
import six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/tests/test_logging.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_logging.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_logging.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_logging.py 2020-04-07
12:06:30.000000000 +0200
@@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
from oslotest import base as test_base
from oslo_i18n import _factory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/tests/test_message.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_message.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_message.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_message.py 2020-04-07
12:06:30.000000000 +0200
@@ -17,9 +17,9 @@
from __future__ import unicode_literals
import logging
+from unittest import mock
import warnings
-import mock
from oslotest import base as test_base
import six
import testtools
@@ -65,11 +65,11 @@
# The base representation of the message is in Spanish, as well as
# the default translation, since the default locale was Spanish.
self.assertEqual(es_translation, message)
- self.assertEqual(es_translation, message.translate())
+ self.assertEqual(es_translation, message.translation())
- def test_translate_returns_unicode(self):
+ def test_translation_returns_unicode(self):
message = _message.Message('some %s') % 'message'
- self.assertIsInstance(message.translate(), six.text_type)
+ self.assertIsInstance(message.translation(), six.text_type)
def test_mod_with_named_parameters(self):
msgid = ("%(description)s\nCommand: %(cmd)s\n"
@@ -86,7 +86,7 @@
expected = msgid % params
self.assertEqual(expected, result)
- self.assertEqual(expected, result.translate())
+ self.assertEqual(expected, result.translation())
def test_multiple_mod_with_named_parameter(self):
msgid = ("%(description)s\nCommand: %(cmd)s\n"
@@ -131,7 +131,7 @@
self.assertIsNot(expected, first)
# Final translations should be the same
- self.assertEqual(expected.translate(), first.translate())
+ self.assertEqual(expected.translation(), first.translation())
def test_mod_with_named_parameters_no_space(self):
msgid = ("Request: %(method)s http://%(server)s:"
@@ -146,7 +146,7 @@
expected = msgid % params
self.assertEqual(expected, result)
- self.assertEqual(expected, result.translate())
+ self.assertEqual(expected, result.translation())
def test_mod_with_dict_parameter(self):
msgid = "Test that we can inject a dictionary %s"
@@ -156,7 +156,7 @@
expected = msgid % params
self.assertEqual(expected, result)
- self.assertEqual(expected, result.translate())
+ self.assertEqual(expected, result.translation())
def test_mod_with_wrong_field_type_in_trans(self):
msgid = "Correct type %(arg1)s"
@@ -174,7 +174,7 @@
trans.return_value.gettext.return_value = wrong_type
else:
trans.return_value.ugettext.return_value = wrong_type
- trans_result = result.translate()
+ trans_result = result.translation()
expected = msgid % params
self.assertEqual(expected, trans_result)
@@ -204,10 +204,10 @@
for message, result in zip(messages, results):
self.assertEqual(type(result), _message.Message)
- self.assertEqual(message, result.translate())
+ self.assertEqual(message, result.translation())
# simulate writing out as string
- result_str = '%s' % result.translate()
+ result_str = '%s' % result.translation()
self.assertEqual(result_str, message)
self.assertEqual(message, result)
@@ -220,7 +220,7 @@
changing_dict['current_value'] = 2
# Even if the param changes when the message is
# translated it should use the original param
- self.assertEqual('Found object: 1', result.translate())
+ self.assertEqual('Found object: 1', result.translation())
def test_mod_deep_copies_parameters(self):
msgid = "Found list: %(current_list)s"
@@ -232,26 +232,26 @@
changing_list.append(4)
# Even though the list changed the message
# translation should use the original list
- self.assertEqual("Found list: [1, 2, 3]", result.translate())
+ self.assertEqual("Found list: [1, 2, 3]", result.translation())
def test_mod_deep_copies_param_nodeep_param(self):
msgid = "Value: %s"
params = utils.NoDeepCopyObject(5)
# Apply the params
result = _message.Message(msgid) % params
- self.assertEqual("Value: 5", result.translate())
+ self.assertEqual("Value: 5", result.translation())
def test_mod_deep_copies_param_nodeep_dict(self):
msgid = "Values: %(val1)s %(val2)s"
params = {'val1': 1, 'val2': utils.NoDeepCopyObject(2)}
# Apply the params
result = _message.Message(msgid) % params
- self.assertEqual("Values: 1 2", result.translate())
+ self.assertEqual("Values: 1 2", result.translation())
# Apply again to make sure other path works as well
params = {'val1': 3, 'val2': utils.NoDeepCopyObject(4)}
result = _message.Message(msgid) % params
- self.assertEqual("Values: 3 4", result.translate())
+ self.assertEqual("Values: 3 4", result.translation())
def test_mod_returns_a_copy(self):
msgid = "Some msgid string: %(test1)s %(test2)s"
@@ -261,16 +261,16 @@
self.assertIsNot(message, m1)
self.assertIsNot(message, m2)
- self.assertEqual(m1.translate(),
+ self.assertEqual(m1.translation(),
msgid % {'test1': 'foo', 'test2': 'bar'})
- self.assertEqual(m2.translate(),
+ self.assertEqual(m2.translation(),
msgid % {'test1': 'foo2', 'test2': 'bar2'})
def test_mod_with_none_parameter(self):
msgid = "Some string with params: %s"
message = _message.Message(msgid) % None
self.assertEqual(msgid % None, message)
- self.assertEqual(msgid % None, message.translate())
+ self.assertEqual(msgid % None, message.translation())
def test_mod_with_missing_parameters(self):
msgid = "Some string with params: %s %s"
@@ -288,7 +288,7 @@
expected = msgid % params
self.assertEqual(expected, result)
- self.assertEqual(expected, result.translate())
+ self.assertEqual(expected, result.translation())
# Make sure unused params still there
self.assertEqual(params.keys(), result.params.keys())
@@ -304,7 +304,7 @@
self.assertRaises(TypeError, test_me)
@mock.patch('gettext.translation')
- def test_translate(self, mock_translation):
+ def test_translation(self, mock_translation):
en_message = 'A message in the default locale'
es_translation = 'A message in Spanish'
message = _message.Message(en_message)
@@ -314,7 +314,7 @@
translator = fakes.FakeTranslations.translator(translations_map)
mock_translation.side_effect = translator
- self.assertEqual(es_translation, message.translate('es'))
+ self.assertEqual(es_translation, message.translation('es'))
@mock.patch('gettext.translation')
def test_translate_message_from_unicoded_object(self, mock_translation):
@@ -331,7 +331,7 @@
obj = utils.SomeObject(message)
unicoded_obj = six.text_type(obj)
- self.assertEqual(es_translation, unicoded_obj.translate('es'))
+ self.assertEqual(es_translation, unicoded_obj.translation('es'))
@mock.patch('gettext.translation')
def test_translate_multiple_languages(self, mock_translation):
@@ -347,11 +347,11 @@
translator = fakes.FakeTranslations.translator(translations_map)
mock_translation.side_effect = translator
- self.assertEqual(es_translation, message.translate('es'))
- self.assertEqual(zh_translation, message.translate('zh'))
- self.assertEqual(en_message, message.translate(None))
- self.assertEqual(en_message, message.translate('en'))
- self.assertEqual(en_message, message.translate('XX'))
+ self.assertEqual(es_translation, message.translation('es'))
+ self.assertEqual(zh_translation, message.translation('zh'))
+ self.assertEqual(en_message, message.translation(None))
+ self.assertEqual(en_message, message.translation('en'))
+ self.assertEqual(en_message, message.translation('XX'))
@mock.patch('gettext.translation')
def test_translate_message_with_param(self, mock_translation):
@@ -368,8 +368,8 @@
default_translation = message_with_params % param
expected_translation = es_translation % param
- self.assertEqual(expected_translation, msg.translate('es'))
- self.assertEqual(default_translation, msg.translate('XX'))
+ self.assertEqual(expected_translation, msg.translation('es'))
+ self.assertEqual(default_translation, msg.translation('XX'))
@mock.patch('gettext.translation')
@mock.patch('oslo_i18n._message.LOG')
@@ -390,7 +390,7 @@
msg = msg % param
default_translation = message_with_params % param
- self.assertEqual(default_translation, msg.translate('es'))
+ self.assertEqual(default_translation, msg.translation('es'))
self.assertEqual(1, len(w))
# Note(gibi): in python 3.4 str.__repr__ does not put the unicode
@@ -475,8 +475,8 @@
default_translation = message_with_params % param
expected_translation = es_translation % param_translation
- self.assertEqual(expected_translation, msg.translate('es'))
- self.assertEqual(default_translation, msg.translate('XX'))
+ self.assertEqual(expected_translation, msg.translation('es'))
+ self.assertEqual(default_translation, msg.translation('XX'))
@mock.patch('gettext.translation')
def test_translate_message_with_param_from_unicoded_obj(self,
@@ -498,8 +498,8 @@
obj = utils.SomeObject(msg)
unicoded_obj = six.text_type(obj)
- self.assertEqual(expected_translation, unicoded_obj.translate('es'))
- self.assertEqual(default_translation, unicoded_obj.translate('XX'))
+ self.assertEqual(expected_translation, unicoded_obj.translation('es'))
+ self.assertEqual(default_translation, unicoded_obj.translation('XX'))
@mock.patch('gettext.translation')
def test_translate_message_with_message_parameter(self, mock_translation):
@@ -519,8 +519,8 @@
default_translation = message_with_params % message_param
expected_translation = es_translation % es_param_translation
- self.assertEqual(expected_translation, msg.translate('es'))
- self.assertEqual(default_translation, msg.translate('XX'))
+ self.assertEqual(expected_translation, msg.translation('es'))
+ self.assertEqual(default_translation, msg.translation('XX'))
@mock.patch('gettext.translation')
def test_translate_message_with_message_parameters(self, mock_translation):
@@ -546,8 +546,8 @@
another_message_param)
expected_translation = es_translation % (es_param_translation,
another_es_param_translation)
- self.assertEqual(expected_translation, msg.translate('es'))
- self.assertEqual(default_translation, msg.translate('XX'))
+ self.assertEqual(expected_translation, msg.translation('es'))
+ self.assertEqual(default_translation, msg.translation('XX'))
@mock.patch('gettext.translation')
def test_translate_message_with_named_parameters(self, mock_translation):
@@ -567,8 +567,8 @@
default_translation = message_with_params % {'param': message_param}
expected_translation = es_translation % {'param': es_param_translation}
- self.assertEqual(expected_translation, msg.translate('es'))
- self.assertEqual(default_translation, msg.translate('XX'))
+ self.assertEqual(expected_translation, msg.translation('es'))
+ self.assertEqual(default_translation, msg.translation('XX'))
@mock.patch('locale.getdefaultlocale')
@mock.patch('gettext.translation')
@@ -609,12 +609,38 @@
# Because sys.getdefaultlocale() was Spanish,
# the default translation will be to Spanish
self.assertEqual(es_translation, msg)
- self.assertEqual(es_translation, msg.translate())
- self.assertEqual(es_translation, msg.translate('es'))
+ self.assertEqual(es_translation, msg.translation())
+ self.assertEqual(es_translation, msg.translation('es'))
# Translation into other locales still works
- self.assertEqual(zh_translation, msg.translate('zh'))
- self.assertEqual(fr_translation, msg.translate('fr'))
+ self.assertEqual(zh_translation, msg.translation('zh'))
+ self.assertEqual(fr_translation, msg.translation('fr'))
+
+ # TODO(bnemec): Remove these three tests when the translate compatibility
+ # shim is removed.
+ def test_translate_with_dict(self):
+ msg = _message.Message('abc')
+ # This dict is what you get back from str.maketrans('abc', 'xyz')
+ # We can't actually call that here because it doesn't exist on py2
+ # and the string.maketrans that does behaves differently.
+ self.assertEqual('xyz', msg.translate({97: 120, 98: 121, 99: 122}))
+
+ def test_translate_with_list(self):
+ msg = _message.Message('abc')
+ table = [six.unichr(x) for x in range(128)]
+ table[ord('a')] = 'b'
+ table[ord('b')] = 'c'
+ table[ord('c')] = 'd'
+ self.assertEqual('bcd', msg.translate(table))
+
+ @mock.patch('warnings.warn')
+ def test_translate_warning(self, mock_warn):
+ msg = _message.Message('a message')
+ msg.translate('es')
+ self.assertTrue(mock_warn.called, 'No warning found')
+ # Make sure it was our warning
+ self.assertIn('Message.translate called with a string argument.',
+ mock_warn.call_args[0][0])
class TranslateMsgidTest(test_base.BaseTestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/tests/test_public_api.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_public_api.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_public_api.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_public_api.py 2020-04-07
12:06:30.000000000 +0200
@@ -9,12 +9,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-"""A few tests that use the public API to ensure the imports work.
-"""
+"""A few tests that use the public API to ensure the imports work."""
import unittest
-
-import mock
+from unittest import mock
import oslo_i18n
from oslo_i18n import _lazy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/oslo_i18n/tests/test_translate.py
new/oslo.i18n-4.0.1/oslo_i18n/tests/test_translate.py
--- old/oslo.i18n-3.24.0/oslo_i18n/tests/test_translate.py 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/oslo_i18n/tests/test_translate.py 2020-04-07
12:06:30.000000000 +0200
@@ -16,7 +16,8 @@
from __future__ import unicode_literals
-import mock
+from unittest import mock
+
from oslotest import base as test_base
from oslo_i18n import _message
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.i18n-3.24.0/releasenotes/notes/drop-python27-support-eb9c2ad3268f0c1f.yaml
new/oslo.i18n-4.0.1/releasenotes/notes/drop-python27-support-eb9c2ad3268f0c1f.yaml
---
old/oslo.i18n-3.24.0/releasenotes/notes/drop-python27-support-eb9c2ad3268f0c1f.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.i18n-4.0.1/releasenotes/notes/drop-python27-support-eb9c2ad3268f0c1f.yaml
2020-04-07 12:06:30.000000000 +0200
@@ -0,0 +1,5 @@
+---
+upgrade:
+ - |
+ Support for Python 2.7 has been dropped. The minimum version of Python now
+ supported is Python 3.6.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/releasenotes/source/index.rst
new/oslo.i18n-4.0.1/releasenotes/source/index.rst
--- old/oslo.i18n-3.24.0/releasenotes/source/index.rst 2019-09-04
16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/releasenotes/source/index.rst 2020-04-07
12:06:30.000000000 +0200
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ train
stein
rocky
queens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.i18n-3.24.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
new/oslo.i18n-4.0.1/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
---
old/oslo.i18n-3.24.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
2019-09-04 16:24:15.000000000 +0200
+++
new/oslo.i18n-4.0.1/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
2020-04-07 12:06:30.000000000 +0200
@@ -1,14 +1,15 @@
# Andi Chandler <[email protected]>, 2017. #zanata
# Andi Chandler <[email protected]>, 2018. #zanata
+# Andi Chandler <[email protected]>, 2019. #zanata
msgid ""
msgstr ""
"Project-Id-Version: oslo.i18n\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-08-13 07:24+0000\n"
+"POT-Creation-Date: 2019-11-06 04:11+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2018-08-13 12:05+0000\n"
+"PO-Revision-Date: 2019-12-21 02:55+0000\n"
"Last-Translator: Andi Chandler <[email protected]>\n"
"Language-Team: English (United Kingdom)\n"
"Language: en_GB\n"
@@ -36,6 +37,12 @@
msgid "Rocky Series Release Notes"
msgstr "Rocky Series Release Notes"
+msgid "Stein Series Release Notes"
+msgstr "Stein Series Release Notes"
+
+msgid "Train Series Release Notes"
+msgstr "Train Series Release Notes"
+
msgid "Unreleased Release Notes"
msgstr "Unreleased Release Notes"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/releasenotes/source/train.rst
new/oslo.i18n-4.0.1/releasenotes/source/train.rst
--- old/oslo.i18n-3.24.0/releasenotes/source/train.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/oslo.i18n-4.0.1/releasenotes/source/train.rst 2020-04-07
12:06:30.000000000 +0200
@@ -0,0 +1,6 @@
+==========================
+Train Series Release Notes
+==========================
+
+.. release-notes::
+ :branch: stable/train
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/setup.cfg
new/oslo.i18n-4.0.1/setup.cfg
--- old/oslo.i18n-3.24.0/setup.cfg 2019-09-04 16:24:55.000000000 +0200
+++ new/oslo.i18n-4.0.1/setup.cfg 2020-04-07 12:07:30.000000000 +0200
@@ -6,6 +6,7 @@
author = OpenStack
author-email = [email protected]
home-page = https://docs.openstack.org/oslo.i18n/latest
+python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@@ -13,25 +14,16 @@
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3 :: Only
+ Programming Language :: Python :: Implementation :: CPython
[files]
packages =
oslo_i18n
-[build_sphinx]
-source-dir = doc/source
-build-dir = doc/build
-all_files = 1
-warning-is-error = 1
-
-[upload_sphinx]
-upload-dir = doc/build/html
-
[compile_catalog]
directory = oslo_i18n/locale
domain = oslo_i18n
@@ -46,9 +38,6 @@
mapping_file = babel.cfg
output_file = oslo_i18n/locale/oslo_i18n.pot
-[bdist_wheel]
-universal = 1
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/setup.py
new/oslo.i18n-4.0.1/setup.py
--- old/oslo.i18n-3.24.0/setup.py 2019-09-04 16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/setup.py 2020-04-07 12:06:30.000000000 +0200
@@ -13,17 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
- import multiprocessing # noqa
-except ImportError:
- pass
-
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/test-requirements.txt
new/oslo.i18n-4.0.1/test-requirements.txt
--- old/oslo.i18n-3.24.0/test-requirements.txt 2019-09-04 16:24:15.000000000
+0200
+++ new/oslo.i18n-4.0.1/test-requirements.txt 2020-04-07 12:06:30.000000000
+0200
@@ -1,10 +1,9 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-hacking>=1.1.0,<1.2.0 # Apache-2.0
+hacking>=3.0,<3.1.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
-mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.i18n-3.24.0/tox.ini new/oslo.i18n-4.0.1/tox.ini
--- old/oslo.i18n-3.24.0/tox.ini 2019-09-04 16:24:15.000000000 +0200
+++ new/oslo.i18n-4.0.1/tox.ini 2020-04-07 12:06:30.000000000 +0200
@@ -1,20 +1,17 @@
[tox]
-minversion = 2.0
-envlist = py27,py37,pep8
+minversion = 3.1.1
+envlist = py37,pep8
+ignore_basepython_conflict = true
[testenv]
-install_command = pip install {opts} {packages}
+basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
- -r{toxinidir}/test-requirements.txt
- -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+ -r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
-[testenv:py27]
-basepython = python2.7
-
[testenv:pep8]
-basepython = python3
deps =
-r{toxinidir}/test-requirements.txt
commands =
@@ -23,11 +20,9 @@
bandit -r oslo_i18n -x tests -n5
[testenv:venv]
-basepython = python3
commands = {posargs}
[testenv:docs]
-basepython = python3
whitelist_externals =
rm
deps =
@@ -35,17 +30,16 @@
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
- sphinx-build -W -b html doc/source doc/build/html
+ sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:cover]
-basepython = python3
setenv =
- PYTHON=coverage run --source oslo_i18n --parallel-mode
+ PYTHON=coverage run --source oslo_i18n --parallel-mode
commands =
- stestr run {posargs}
- coverage combine
- coverage html -d cover
- coverage xml -o cover/coverage.xml
+ stestr run {posargs}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
[flake8]
@@ -53,7 +47,7 @@
# E731 skipped as assign a lambda expression
show-source = True
-ignore = E123,E125,E731
+ignore = E123,E125,E731,W504
# H106: Don’t put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
@@ -62,14 +56,19 @@
[hacking]
import_exceptions =
- oslo_i18n._i18n._
+ oslo_i18n._i18n._
[testenv:releasenotes]
-basepython = python3
-commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html
releasenotes/source releasenotes/build/html
+whitelist_externals =
+ rm
+deps =
+
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -r{toxinidir}/doc/requirements.txt
+commands =
+ rm -rf releasenotes/build
+ sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html
releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt