Skip to content

Commit

Permalink
Merge be3b0b7 into 68e5a59
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Nov 12, 2018
2 parents 68e5a59 + be3b0b7 commit 6505434
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 41 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ python:
- "3.4"
- "3.5"
- "3.6"
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
install:
- pip install -U pip setuptools
- pip install -U coverage coveralls zope.testrunner
Expand Down
6 changes: 3 additions & 3 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
CHANGES
=======

4.0.0 (unreleased)
------------------
3.1 (unreleased)
----------------

- Added support for Python 3.4, 3.5 and 3.6.
- Added support for Python 3.4, 3.5, 3.6, 3.7.

- Dropped support for Python 2.6 and 3.3.

Expand Down
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
import os
from setuptools import setup, find_packages


def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()


setup(
name='z3c.formui',
version='4.0.0.dev0',
version='3.1.dev0',
author="Stephan Richter, Roger Ineichen and the Zope Community",
author_email="zope-dev@zope.org",
description="A set of initial UI components for z3c.form.",
Expand All @@ -34,7 +35,7 @@ def read(*rnames):
read('src', 'z3c', 'formui', 'README.txt')
+ '\n\n' +
read('CHANGES.txt')
),
),
license="ZPL 2.1",
keywords="zope3 form widget",
classifiers=[
Expand All @@ -49,6 +50,7 @@ def read(*rnames):
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Natural Language :: English',
'Operating System :: OS Independent',
Expand All @@ -61,7 +63,7 @@ def read(*rnames):
namespace_packages=['z3c'],
extras_require=dict(
test=['z3c.form[test]'],
),
),
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
install_requires=[
'setuptools',
Expand All @@ -71,10 +73,10 @@ def read(*rnames):
'zope.component',
'zope.publisher',
'zope.viewlet',
],
],
tests_require=[
'z3c.form [test]',
],
],
test_suite='z3c.formui.tests.test_suite',
zip_safe=False,
)
)
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__)
8 changes: 2 additions & 6 deletions src/z3c/formui/adding.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Implementation of layout-aware addform for IAdding
$Id:$
"""
__docformat__ = "reStructuredText"

"""Implementation of layout-aware addform for IAdding."""
from z3c.form import adding
from z3c.formui import form, layout


class AddForm(form.ContentTemplateMixin, layout.AddFormLayoutSupport,
adding.AddForm):
"""Layout aware add form for zope.app.container.interfaces.IAdding."""
15 changes: 6 additions & 9 deletions src/z3c/formui/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Form UI Browser
$Id: browser.py 75941 2007-05-24 14:48:22Z srichter $
"""
__docformat__ = "reStructuredText"

"""Form UI Browser."""
import zope.component
from z3c.form import form
from z3c.formui import layout
Expand All @@ -36,7 +31,7 @@ class ContentTemplateMixin(object):
"""

def render(self):
'''See interfaces.IForm'''
"""See interfaces.IForm."""
# render content template
if self.template is None:
template = zope.component.queryMultiAdapter(
Expand All @@ -53,8 +48,10 @@ class BaseForm(ContentTemplateMixin, layout.FormLayoutSupport, form.BaseForm):
"""Layout aware base form."""


class DisplayForm(ContentTemplateMixin, layout.FormLayoutSupport,
form.DisplayForm):
class DisplayForm(
ContentTemplateMixin,
layout.FormLayoutSupport,
form.DisplayForm):
"""Layout aware display form."""


Expand Down
10 changes: 5 additions & 5 deletions src/z3c/formui/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Form UI Interfaces
$Id$
"""
__docformat__ = "reStructuredText"
"""Form UI Interfaces."""
from zope.publisher.interfaces.browser import IBrowserRequest
from zope.viewlet.interfaces import IViewletManager


class IFormUILayer(IBrowserRequest):
"""A basic layer for the Form UI package."""


class IDivFormLayer(IFormUILayer):
"""A layer that supports forms created only using DIV elements."""


class ITableFormLayer(IFormUILayer):
"""A layer that supports forms created using tables."""


class ICSS(IViewletManager):
"""CSS viewlet manager."""
6 changes: 2 additions & 4 deletions src/z3c/formui/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import z3c.form.testing




def setUpZPT(test):
z3c.form.testing.setUpZPT(test)
from zope.browserpage.metaconfigure import registerType
Expand All @@ -43,7 +41,7 @@ def test_suite():
'README.txt',
setUp=setUp,
tearDown=z3c.form.testing.tearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
checker=z3c.form.testing.outputChecker)
#for setUp in (setUpZPT, setUpZ3CPT)]) # XXX: broken macro tests
# for setUp in (setUpZPT, setUpZ3CPT)]) # XXX: broken macro tests
for setUp in (setUpZPT, )])
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py34,py35,py36,coverage
flake8,py27,py34,py35,py36,py37,coverage

[testenv]
commands =
Expand All @@ -19,3 +19,9 @@ commands =
deps =
{[testenv]deps}
coverage

[testenv:flake8]
basepython = python3.6
skip_install = true
deps = flake8
commands = flake8 --doctests src setup.py

0 comments on commit 6505434

Please sign in to comment.