Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

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 Feb 9, 2023
1 parent 0c3543d commit d2af09d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def read(path):
name='z3c.preference',
version='2.0.dev0',
author="Michael Howitz",
author_email="zope-dev@zope.org",
author_email="zope-dev@zope.dev",
description="UI for zope.preference using z3c.pagelet and z3c.form.",
long_description='\n\n'.join([
read('README.rst'),
Expand Down Expand Up @@ -66,6 +66,7 @@ def read(path):
include_package_data=True,
package_dir={'': 'src'},
namespace_packages=['z3c'],
python_requires='>=3.7',
extras_require=dict(
test=[
'zope.app.wsgi >= 3.7',
Expand Down
6 changes: 3 additions & 3 deletions src/z3c/preference/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class EditForm(z3c.formui.form.EditForm):
"""Edit form for preference groups."""

def __init__(self, *args, **kw):
super(EditForm, self).__init__(*args, **kw)
super().__init__(*args, **kw)
self.label = self.context.__title__
self.description = self.context.__description__
self.fields = to_fields(self.context)
Expand All @@ -41,7 +41,7 @@ class PreferenceGroup(z3c.form.group.Group):
"""z3c.form group of a preference group."""

def __init__(self, *args, **kw):
super(PreferenceGroup, self).__init__(*args, **kw)
super().__init__(*args, **kw)
self.fields = to_fields(self.context)
self.description = self.context.__description__
self.label = self.context.__title__
Expand All @@ -52,7 +52,7 @@ class CategoryEditForm(z3c.form.group.GroupForm,
"""Edit form for preference categories."""

def __init__(self, *args, **kw):
super(CategoryEditForm, self).__init__(*args, **kw)
super().__init__(*args, **kw)
sorted_prefs = sorted(self.context.items(), key=lambda x: x[0])
groups = [PreferenceGroup(pref, self.request, self)
for key, pref in sorted_prefs]
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/preference/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class BrowserLayer(zope.testbrowser.wsgi.Layer,
"""BrowserLayer which is compatible with zope.testbrowser."""

def testSetUp(self):
super(BrowserLayer, self).testSetUp()
super().testSetUp()
self._application.requestFactory._db = self.db

def testTearDown(self):
self._application.requestFactory._publication_cache.clear()
super(BrowserLayer, self).testTearDown()
super().testTearDown()

make_wsgi_app = zope.app.wsgi.testlayer.BrowserLayer.make_wsgi_app

Expand Down

0 comments on commit d2af09d

Please sign in to comment.