diff options
-rw-r--r-- | CHANGES.rst | 8 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | src/zope/i18n/locales/inheritance.py | 11 |
3 files changed, 13 insertions, 8 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 265f7a2..6754958 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,7 +2,7 @@ CHANGES ========= -4.2.1 (unreleased) +4.3.0 (unreleased) ================== - Ensure that all files are properly closed when compiling .mo files, @@ -24,7 +24,11 @@ KeyError when the ``week`` mapping contained an integer for ``firstDay`` as documented. -- Reach 100% test coverage and maintain in through tox.ini and coveralls.io. +- Reach 100% test coverage and maintain in through tox.ini and + coveralls.io. + +- Override ``values`` in ``InheritingDictionary``. Previously it + implemented a separate ``value`` method by mistake. - Fix parsing times with a timezone. Previously it could raise a ``TypeError``. @@ -59,7 +59,7 @@ TESTS_REQUIRE = COMPILE_REQUIRES + ZCML_REQUIRES + [ setup( name='zope.i18n', - version='4.2.1.dev0', + version='4.3.0.dev0', author='Zope Foundation and Contributors', author_email='zope-dev@zope.org', description='Zope Internationalization Support', diff --git a/src/zope/i18n/locales/inheritance.py b/src/zope/i18n/locales/inheritance.py index 62c99dc..0075b66 100644 --- a/src/zope/i18n/locales/inheritance.py +++ b/src/zope/i18n/locales/inheritance.py @@ -179,10 +179,9 @@ class InheritingDictionary(Inheritance, dict): >>> list(locale.data.items()) [(1, 'eins'), (2, 'two'), (3, 'three')] - We currently fail to override ``values``, but instead inherited - data can be seen in the ``value`` method:: + We also override ``values``:: - >>> sorted(locale.data.value()) + >>> sorted(locale.data.values()) ['eins', 'three', 'two'] """ @@ -226,6 +225,8 @@ class InheritingDictionary(Inheritance, dict): def keys(self): return list(self._make_reified_inherited_dict().keys()) - def value(self): - # XXX: Was this meant to override values() and is just a typo? + def values(self): return list(self._make_reified_inherited_dict().values()) + + # Preserve the old name for compatibility + value = values |