Skip to content

Commit

Permalink
Merge ee72638 into 92489a3
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Nov 15, 2018
2 parents 92489a3 + ee72638 commit 69d7232
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
@@ -1,13 +1,17 @@
sudo: false
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
install:
matrix:
include:
- python: "3.7"
dist: xenial
before_install:
- pip install -U pip setuptools
- pip install -U coverage coveralls zope.testrunner
install:
- pip install -U -e .[test]
script:
- coverage run -m zope.testrunner --test-path=src
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -5,6 +5,8 @@ Changelog
4.1 (unreleased)
----------------

- Add support for Python 3.7.

- Deal with items with same name but different values in ordered field widget.
[rodfersou]

Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -66,6 +66,7 @@ def alltests():
'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 Down
10 changes: 6 additions & 4 deletions src/z3c/form/converter.rst
Expand Up @@ -400,8 +400,9 @@ Dates are simply converted to ISO format:
The converter only knows how to convert this particular format back to a
datetime value:

>>> tddc.toFieldValue(u'1 day, 1:01:01')
datetime.timedelta(1, 3661)
>>> fv = tddc.toFieldValue(u'1 day, 1:01:01')
>>> (fv.days, fv.seconds)
(1, 3661)

If no day is available, the following short form is used:

Expand All @@ -411,8 +412,9 @@ If no day is available, the following short form is used:

And now back to the field value:

>>> tddc.toFieldValue(u'1:01:01')
datetime.timedelta(0, 3661)
>>> fv = tddc.toFieldValue(u'1:01:01')
>>> (fv.days, fv.seconds)
(0, 3661)

By default the converter converts missing input to missin_input value:

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py34,py35,py36,coverage,docs
py27,py34,py35,py36,py37,coverage,docs

[testenv]
commands =
Expand Down

0 comments on commit 69d7232

Please sign in to comment.