diff --git a/deform/exception.py b/deform/exception.py index 8b61915f..7e4a8fd4 100644 --- a/deform/exception.py +++ b/deform/exception.py @@ -25,7 +25,7 @@ class ValidationFailure(Exception): """ def __init__(self, field, cstruct, error): - Exception.__init__(self) + super().__init__(field, cstruct, error) self.field = field self.cstruct = cstruct self.error = error diff --git a/deform/i18n.py b/deform/i18n.py index 42d23c84..cebb4883 100644 --- a/deform/i18n.py +++ b/deform/i18n.py @@ -2,5 +2,4 @@ from translationstring import TranslationStringFactory - _ = TranslationStringFactory("deform") diff --git a/deform/schema.py b/deform/schema.py index 063fb5e2..9f39c981 100644 --- a/deform/schema.py +++ b/deform/schema.py @@ -8,7 +8,6 @@ from . import widget - default_widget_makers = { colander.Mapping: widget.MappingWidget, colander.Sequence: widget.SequenceWidget, diff --git a/deform/template.py b/deform/template.py index 90ccb5ea..7a82b4d0 100644 --- a/deform/template.py +++ b/deform/template.py @@ -9,7 +9,6 @@ from .exception import TemplateError - BOOLEAN_HTML_ATTRS = frozenset( [ # List of Boolean attributes in HTML that should be rendered in diff --git a/deform/widget.py b/deform/widget.py index 481fdbef..d385af1a 100644 --- a/deform/widget.py +++ b/deform/widget.py @@ -22,7 +22,6 @@ from .i18n import _ from .utils import text_ - sequence_types = ( list, tuple, diff --git a/pyproject.toml b/pyproject.toml index a67f2c57..0196deba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools<81.0.0", "wheel"] [tool.black] line-length = 79 @@ -37,7 +37,6 @@ include_trailing_comma = true known_first_party = "deform" known_pyramid = "colander,jinja2,plaster,pyramid,pyramid_layout,venusian,zope,transaction,pyramid_chameleon,Chameleon" line_length = 79 -lines_after_imports = 2 multi_line_output = 3 no_lines_before = "THIRDPARTY" profile = "black" diff --git a/setup.py b/setup.py index 5e604a36..a79a6118 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ def readfile(name): "peppercorn>=0.3", # rename operation type "translationstring>=1.0", # add format mapping with % "zope.deprecation", + "setuptools<81.0.0", ] lint_extras = [ @@ -82,7 +83,6 @@ def readfile(name): long_description=README + "\n\n" + CHANGES, classifiers=[ "Intended Audience :: Developers", - "License :: Repoze Public License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", diff --git a/tox.ini b/tox.ini index 238ea1ea..27cbf2a3 100644 --- a/tox.ini +++ b/tox.ini @@ -13,11 +13,15 @@ setenv = commands = python --version pytest {posargs:} +deps = + setuptools<81.0.0 [testenv:py311-cover] commands = python --version pytest --cov {posargs:} +deps = + setuptools<81.0.0 [testenv:lint] commands = @@ -28,7 +32,7 @@ commands = black --check --diff deform setup.py # XXX -r reports now warnings too so we fail python setup.py check -s -m - rstcheck README.rst CHANGES.txt + rstcheck README.rst CHANGES.txt check-manifest extras = lint @@ -88,5 +92,5 @@ commands = # build wheel from sdist pip wheel -v --no-deps --no-index --no-build-isolation --wheel-dir {toxinidir}/dist --find-links {toxinidir}/dist deform deps = - setuptools + setuptools<81.0.0 wheel