Skip to content

Commit

Permalink
Drop support for Python 2.7 up to 3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jan 18, 2023
1 parent ea04465 commit 69ecf7b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def read(*rnames):
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['z3c'],
python_requires='>=3.7',
extras_require=dict(
test=[
'zope.browserpage',
Expand Down
8 changes: 1 addition & 7 deletions src/z3c/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__)
5 changes: 1 addition & 4 deletions src/z3c/testing/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from io import StringIO

import zope.component
import zope.security
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/testing/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
###############################################################################

class ContextStub(object):
class ContextStub:
"""Stub for the context argument passed to evolve scripts.
>>> from zope.app.zopeappgenerations import getRootFolder
Expand All @@ -29,7 +29,7 @@ class ContextStub(object):
"""

class ConnectionStub(object):
class ConnectionStub:
def __init__(self, root_folder, db):
self.root_folder = root_folder
self.db = db
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/testing/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from zope.site import hooks


class BufferedDatabaseTestLayer(object):
class BufferedDatabaseTestLayer:
"""A test layer which creates a filestorage database.
The created database is later used without the need to run through the
Expand Down
6 changes: 3 additions & 3 deletions src/z3c/testing/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def method(a1):


@zope.interface.implementer(ISample)
class Sample(object):
class Sample:
"""Sample object."""

@non_overridable
Expand All @@ -70,7 +70,7 @@ def getTestInterface(self):
return ISample


class ExamplePage(object):
class ExamplePage:

def __call__(self):
return "Example succeeded."
Expand All @@ -79,7 +79,7 @@ def __call__(self):
def test_suite():
suite = unittest.TestSuite()
# Unit Tests
suite.addTest(unittest.makeSuite(TestTestCase))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestTestCase))
# Functional Tests
if HAVE_FTEST:
suites = (
Expand Down

0 comments on commit 69ecf7b

Please sign in to comment.