Remove the direct dependency to oslo.i18n

We do not use this library.

Change-Id: I0ef98a9e8b67a96b42889d7c9729dd6f3fe1a837
This commit is contained in:
Andrey Kurilin 2017-10-06 15:44:53 +03:00
parent 57a2e08310
commit 0e20fe0eb8
2 changed files with 8 additions and 9 deletions

View File

@ -16,8 +16,6 @@ See https://docs.openstack.org/oslo.i18n/latest/user/usage.html .
"""
import oslo_i18n
from rally.common import logging
LOG = logging.getLogger(__name__)
@ -25,17 +23,19 @@ LOG.warning("rally.common.i18n module is deprecated and is going to be "
"removed. Please do not import it.")
_translators = oslo_i18n.TranslatorFactory(domain="rally")
def _do_nothing(msg):
return msg
# The primary translation function using the well-known name "_"
_ = _translators.primary
_ = _do_nothing
# Translators for log levels.
#
# The abbreviated names are meant to reflect the usual use of a short
# name like '_'. The "L" is for "log" and the other letter comes from
# the level.
_LI = _translators.log_info
_LW = _translators.log_warning
_LE = _translators.log_error
_LC = _translators.log_critical
_LI = _do_nothing
_LW = _do_nothing
_LE = _do_nothing
_LC = _do_nothing

View File

@ -10,7 +10,6 @@ jsonschema>=2.0.0,!=2.5.0,<3.0.0 # MIT
netaddr>=0.7.13,!=0.7.16,<=0.7.19 # BSD
oslo.config>=4.0.0,!=4.3.0,!=4.4.0,<=4.12.0 # Apache Software License
oslo.db>=4.24.0,<=4.26.0 # Apache Software License
oslo.i18n>=2.1.0,!=3.15.2,<=3.17.0 # Apache Software License
oslo.log==3.30.0 # Apache Software License
oslo.serialization>=1.10.0,!=2.19.1,<=2.20.0 # Apache Software License
oslo.utils>=3.20.0,<=3.29.0 # Apache Software License