Skip to content

Commit

Permalink
Merge pull request #23 from zopefoundation/issue20
Browse files Browse the repository at this point in the history
Add support for Python 3.7; drop Python 3.3
  • Loading branch information
jamadden committed Sep 22, 2018
2 parents 4a4c1a0 + 7cc30bd commit 0ea9198
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 46 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Expand Up @@ -2,11 +2,16 @@ language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- pypy-5.4.1
- pypy
- pypy3
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
script:
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress

Expand Down
8 changes: 7 additions & 1 deletion CHANGES.rst
@@ -1,9 +1,15 @@
Changes
=======

4.1.1 (unreleased)
4.2.0 (unreleased)
------------------

- Add support for Python 3.7.

- Drop support for Python 3.3.

- Drop support for ``python setup.py test``.

- Fix resolving names from a Python 2 package whose `__init__.py` has
unicode elements in `__all__`.

Expand Down
43 changes: 4 additions & 39 deletions setup.py
Expand Up @@ -24,39 +24,6 @@ def read(*rnames):
with open(os.path.join(os.path.dirname(__file__), *rnames)) as f:
return f.read()

def _modname(path, base, name=''):
if path == base:
return name
dirname, basename = os.path.split(path)
return _modname(dirname, base, basename + '.' + name)

def alltests():
import logging
import pkg_resources
import unittest

class NullHandler(logging.Handler):
level = 50

def emit(self, record):
pass

logging.getLogger().addHandler(NullHandler())

suite = unittest.TestSuite()
base = pkg_resources.working_set.find(
pkg_resources.Requirement.parse('zope.configuration')).location
for dirpath, dirnames, filenames in os.walk(base):
if os.path.basename(dirpath) == 'tests':
for filename in filenames:
if ( filename.endswith('.py') and
filename.startswith('test') ):
mod = __import__(
_modname(dirpath, base, os.path.splitext(filename)[0]),
{}, {}, ['*'])
suite.addTest(mod.test_suite())
return suite

TESTS_REQUIRE = [
'zope.testrunner',
]
Expand All @@ -70,7 +37,7 @@ def emit(self, record):
read('README.rst')
+ '\n\n' +
read('CHANGES.rst')
),
),
keywords="zope configuration zcml",
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -81,10 +48,10 @@ def emit(self, record):
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
"Programming Language :: Python :: 3",
'Programming Language :: Python :: 3.3',
'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',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
Expand All @@ -97,9 +64,8 @@ def emit(self, record):
package_dir={'': 'src'},
namespace_packages=['zope'],
extras_require={
'docs': ['Sphinx', 'repoze.sphinx.autointerface'],
'test': TESTS_REQUIRE,
'testing': TESTS_REQUIRE + ['nose', 'coverage'],
'docs': ['Sphinx', 'repoze.sphinx.autointerface'],
'test': TESTS_REQUIRE,
},
install_requires=[
'setuptools',
Expand All @@ -110,5 +76,4 @@ def emit(self, record):
include_package_data=True,
zip_safe=False,
tests_require=TESTS_REQUIRE,
test_suite='__main__.alltests',
)
5 changes: 1 addition & 4 deletions tox.ini
@@ -1,9 +1,6 @@
[tox]
envlist =
# Jython support pending 2.7 support, due 2012-07-15 or so. See:
# http://fwierzbicki.blogspot.com/2012/03/adconion-to-fund-jython-27.html
# py27,py33,py34,py35,jython,pypy,coverage,docs
py27,py33,py34,py35,py36,pypy,coverage,docs
py27,py34,py35,py36,py37,pypy,pypy3,coverage,docs

[testenv]
deps =
Expand Down

0 comments on commit 0ea9198

Please sign in to comment.