Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.7. #86

Merged
merged 2 commits into from Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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