Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

Commit

Permalink
adjust dependencies, reflect changes in zope packages
Browse files Browse the repository at this point in the history
  • Loading branch information
projekt01 committed Nov 29, 2009
1 parent 34e07bc commit 7fb98ca
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
CHANGES
=======

1.1.0 (2009-11-29)
------------------

- adjust dependencies, reflect changes in zope packages

1.0.2 (2008-05-21)
------------------

Expand Down
19 changes: 7 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def read(*rnames):

setup (
name='z3c.language.switch',
version='1.0.2dev',
version='1.1.0',
author = "Roger Ineichen and the Zope Community",
author_email = "zope-dev@zope.org",
description = "Zope3 i18n language switch.",
Expand Down Expand Up @@ -56,27 +56,22 @@ def read(*rnames):
namespace_packages = ['z3c', 'z3c.language'],
extras_require = dict(
test = [
'zope.app.testing',
'zope.testing',
'z3c.testing',
'z3c.coverage',
'z3c.testing',
'zope.testing',
],
),
install_requires = [
'setuptools',
'z3c.i18n',
'z3c.language.session',
'zope.app.component',
'zope.app.generations',
'zope.component',
'zope.event',
'zope.i18n',
'zope.interface',
'zope.security',
'zope.event',
'zope.lifecycleevent',
'zope.publisher',
'zope.schema',
'zope.session',
'zope.lifecycleevent',
'zope.app.generations',
'zope.security',
],
zip_safe = False,
)
2 changes: 1 addition & 1 deletion src/z3c/language/switch/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def getAttribute(self, name, language=None):
def queryAttribute(self, name, language=None, default=None):
try:
return self.getAttribute(name, language)
except KeyError:
except (KeyError, AttributeError):
return default

# z3c.langauge.switch.IReadI18n
Expand Down
2 changes: 0 additions & 2 deletions src/z3c/language/switch/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import zope.interface
from zope.schema.interfaces import IVocabularyTokenized

from z3c.i18n import MessageFactory as _


class IReadI18n(zope.interface.Interface):
"""Let the language switch to the desired language.
Expand Down
7 changes: 3 additions & 4 deletions src/z3c/language/switch/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
"""
__docformat__ = 'restructuredtext'

import unittest
import zope.interface
import zope.component.testing
from zope.interface.verify import verifyClass
from zope.app.testing import placelesssetup

from z3c.language.switch import IReadI18n
from z3c.language.switch import IWriteI18n
Expand Down Expand Up @@ -297,15 +296,15 @@ def makeTestObject(self, object=None, *pos, **kws):
return iface(obj)

def setUp(self):
placelesssetup.setUp()
zope.component.testing.setUp()
factory = self.getTestClass()
iface = self.getTestInterface()
required = self.getAdaptedClass()
# register language switch for test interface adapter
zope.component.provideAdapter(factory, (required,), iface)

def tearDown(self):
placelesssetup.tearDown()
zope.component.testing.tearDown()

def test_getLanguage(self):
obj = self.makeTestObject()
Expand Down
1 change: 0 additions & 1 deletion src/z3c/language/switch/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""
__docformat__ = 'restructuredtext'

import doctest
import unittest

from zope.testing import doctestunit
Expand Down

0 comments on commit 7fb98ca

Please sign in to comment.