Skip to content

Commit

Permalink
Add support for Python 3.6
Browse files Browse the repository at this point in the history
Also add support for pip caching on Travis, and DRY with dependencies
in tox.ini.

Fix test_requires to be consistent. PyPy3.2 is no longer supported by
pip
  • Loading branch information
jamadden committed Apr 21, 2017
1 parent 0ecab6f commit 3366c36
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 35 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ python:
- 3.3
- 3.4
- 3.5
- pypy
- pypy3
- 3.6
- pypy-5.4.1
install:
- pip install tox-travis
- pip install -U pip setuptools
- pip install -U -e .[test]
script:
- tox
- zope-testrunner --test-path=src --auto-color --auto-progress
notifications:
email: false
after_success:
- coveralls
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changes
4.3.1 (unreleased)
------------------

- Add support for Python 3.6.

- Accept both new and old locations for ``__code__`` in
``zope.publisher.publisher.unwrapMethod``. This restores compatibility with
Products.PythonScripts, where parameters were not extracted.
Expand All @@ -14,12 +16,14 @@ Changes

* http://bugs.python.org/issue18394
* https://hg.python.org/cpython/rev/c0e9ba7b26d5
* https://github.com/zopefoundation/zope.publisher/pull/13

We now keep a reference to the FieldStorage till we are finished
processing the request.

- Fix POST with large values on Python 3. Related to cgi.FieldStorage
doing the decoding in Python 3.
doing the decoding in Python 3. See `pull 16
<https://github.com/zopefoundation/zope.publisher/pull/16>`_.

4.3.0 (2016-07-04)
------------------
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def read(*rnames):
sample = zope.publisher.tests.test_paste:SamplePublication
'''

tests_require = [
'zope.testing',
'zope.testrunner',
]

setup(name='zope.publisher',
version='4.3.1.dev0',
url='http://pypi.python.org/pypi/zope.publisher',
Expand All @@ -64,6 +69,7 @@ def read(*rnames):
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
Expand All @@ -87,8 +93,10 @@ def read(*rnames):
'zope.proxy',
'zope.security>=4.0.0',
],
extras_require={'test': ['zope.testing']},
tests_require = ['zope.testing', 'zope.testrunner'],
extras_require={
'test': tests_require
},
tests_require=tests_require,
test_suite = '__main__.alltests',
entry_points=entry_points,
include_package_data=True,
Expand Down
33 changes: 5 additions & 28 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,34 +1,21 @@
[tox]
envlist =
py27,py33,py34,py35,pypy,pypy3
py27,py33,py34,py35,py36,pypy,pypy3

[testenv]
commands =
zope-testrunner --test-path=src {posargs:-pvc}
# without explicit deps, setup.py test will download a bunch of eggs into $PWD
deps =
six
zope.testing
zope.testrunner
zope.browser
zope.component
zope.configuration
zope.contenttype >= 3.5
zope.event
zope.exceptions
zope.i18n
zope.interface
zope.location
zope.proxy
zope.security
.[test]

[testenv:pypy3]
# On certain platforms, at least OS X, pypy3 does not correctly read
# a LANG environment variable; when cpython3.2 would return 'utf-8'
# from locale.getpreferredencoding(), pypy3 returns 'us-ascii', causing
# two test failures. Fix that by setting something it does read.
setenv =
LC_CTYPE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8

[testenv:coverage]
basepython =
Expand All @@ -38,20 +25,10 @@ commands =
# So, we uninstall that from the environment, and then install the editable
# version, before running nosetests.
pip uninstall -y zope.publisher
pip install -e .
pip install -e .[test]
nosetests --with-xunit --with-xcoverage
deps =
nose
coverage
nosexcover
zope.browser
zope.component
zope.configuration
zope.contenttype >= 3.5
zope.event
zope.exceptions
zope.i18n
zope.interface
zope.location
zope.proxy
zope.security
.[test]

0 comments on commit 3366c36

Please sign in to comment.