Update sphinx and hacking requirements

Update the sphinx version allowed for building documentation.

Update the version of hacking used for code checks. At the same time,
fix the code that causes new checks in hacking 0.9 to fail.

Change-Id: Iafbfaf961838de9e6a1c2f5d474929cafd049a70
This commit is contained in:
Doug Hellmann 2014-06-14 10:10:21 -07:00
parent 68bb4ec065
commit 57e22f17e9
10 changed files with 18 additions and 31 deletions

@ -27,8 +27,7 @@ from oslo.i18n import _message
class TranslatorFactory(object):
"""Create translator functions
"""
"Create translator functions"
def __init__(self, domain, localedir=None):
"""Establish a set of translation functions for the domain.

@ -16,7 +16,10 @@
def get_locale_dir_variable_name(domain):
"""Convert a translation domain name to a variable for specifying
"""Build environment variable name for local dir.
Convert a translation domain name to a variable for specifying
a separate locale dir.
"""
return domain.upper().replace('.', '_').replace('-', '_') + '_LOCALEDIR'

@ -1,6 +1,6 @@
hacking>=0.8.0,<0.9
hacking>=0.9.2,<0.10
sphinx>=1.1.2,<1.2
sphinx>=1.1.2,!=1.2.0,<1.3
oslosphinx
oslotest

@ -1,13 +0,0 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

@ -36,7 +36,9 @@ class FakeTranslations(gettext.GNUTranslations):
@staticmethod
def translator(locales_map):
"""Returns a mock gettext.translation function that uses
"""Build mock translator for the given locales.
Returns a mock gettext.translation function that uses
individual TestTranslations to translate in the given locales.
:param locales_map: A map from locale name to a translations map.
@ -44,6 +46,8 @@ class FakeTranslations(gettext.GNUTranslations):
'es': {'Hi': 'Hola', 'Bye': 'Adios'},
'zh': {'Hi': 'Ni Hao', 'Bye': 'Zaijian'}
}
"""
def _translation(domain, localedir=None,
languages=None, fallback=None):

@ -15,9 +15,8 @@
# under the License.
import mock
import six
from oslotest import base as test_base
import six
from oslo.i18n import _lazy
from oslo.i18n import _message

@ -19,10 +19,9 @@ import logging
from babel import localedata
import mock
import six
from oslotest import base as test_base
from oslotest import moxstubout
import six
from oslo.i18n import _lazy
from oslo.i18n import _message

@ -20,10 +20,9 @@ import mock
from oslotest import base as test_base
import six
from tests import fakes
from oslo.i18n import _message
from oslo.i18n import log as i18n_log
from tests import fakes
LOG = logging.getLogger(__name__)

@ -23,11 +23,10 @@ from oslotest import base as test_base
import six
import testtools
from oslo.i18n import _message
from tests import fakes
from tests import utils
from oslo.i18n import _message
LOG = logging.getLogger(__name__)

@ -17,14 +17,12 @@
from __future__ import unicode_literals
import mock
from oslotest import base as test_base
from tests import fakes
from tests import utils
from oslo.i18n import _message
from oslo.i18n import _translate
from tests import fakes
from tests import utils
class TranslateTest(test_base.BaseTestCase):