Skip to content

Commit

Permalink
Add Python 3.6, drop Python 3.3, 100% coverage.
Browse files Browse the repository at this point in the history
Fixes #5 and fixes #6.

- Badges
- DRY in tox.ini
- Use zope.testrunner for namespace package issue
- Add coverage environment and coveralls
  - Reach 100% coverage
  - Remove outdated support for ancient ZODB and Python 3.2
  - Remove _compat._u function
  - Convert doctest functions in tests.py to unittests for coverage
- Minor whitespace cleanups per pep8
  • Loading branch information
jamadden committed Aug 28, 2017
1 parent 6b9f4a5 commit ffd3b87
Show file tree
Hide file tree
Showing 16 changed files with 406 additions and 420 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
@@ -0,0 +1,12 @@
[run]
source = zope.session

[report]
precision = 2
exclude_lines =
pragma: no cover
if __name__ == '__main__':
raise NotImplementedError
self.fail
raise AssertionError
raise unittest.Skip
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,5 @@ dist/
eggs/
parts/
.tox/
.coverage
htmlcov/
19 changes: 14 additions & 5 deletions .travis.yml
Expand Up @@ -2,14 +2,23 @@ language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
- pypy
- pypy3
- 3.6
# Force a newer PyPy on the old 'precise' CI image
# in order to install 'cryptography' needed for coveralls
# After September 2017 this should be the default and the version
# pin can be removed.
- pypy-5.6.0
- pypy3.5-5.8.0
install:
- pip install .
- pip install -U pip setuptools
- pip install -U coverage coveralls
- pip install -U -e .[test]
script:
- python setup.py test -q
- coverage run -m zope.testrunner --test-path=src
after_success:
- coveralls
notifications:
email: false
cache: pip
52 changes: 27 additions & 25 deletions CHANGES.rst
@@ -1,36 +1,38 @@
CHANGES
=======
=========
CHANGES
=========

4.2.0 (unreleased)
------------------
==================

- Add support for Python 3.5.
- Add support for Python 3.5 and 3.6.

- Drop support for Python 2.6.
- Drop support for Python 2.6 and 3.3

- Reach 100% code coverage and maintain it via tox.ini and Travis CI.

4.1.0 (2015-06-02)
------------------
==================

- Add support for PyPy and PyPy3.


4.0.0 (2014-12-24)
------------------
==================

- Add support for Python 3.4.

- Add support for testing on Travis.


4.0.0a2 (2013-08-27)
--------------------
====================

- Fix test that fails on any timezone east of GMT


4.0.0a1 (2013-02-21)
--------------------
====================

- Add support for Python 3.3

Expand All @@ -44,7 +46,7 @@ CHANGES


3.9.5 (2011-08-11)
------------------
==================

- LP #824355: enable support for HttpOnly cookies.

Expand All @@ -54,7 +56,7 @@ CHANGES


3.9.4 (2011-03-07)
------------------
==================

- Add an explicit `provides` to the IClientId adapter declaration in
adapter.zcml.
Expand All @@ -64,7 +66,7 @@ CHANGES


3.9.3 (2010-09-25)
------------------
==================

- Add test extra to declare test dependency on ``zope.testing``.

Expand All @@ -73,7 +75,7 @@ CHANGES


3.9.2 (2009-11-23)
------------------
==================

- Fix Python 2.4 hmac compatibility issue by only using hashlib in
Python versions 2.5 and above.
Expand All @@ -91,13 +93,13 @@ CHANGES


3.9.1 (2009-04-20)
------------------
==================

- Restore compatibility with Python 2.4.


3.9.0 (2009-03-19)
------------------
==================

- Don't raise deprecation warnings on Python 2.6.

Expand Down Expand Up @@ -125,7 +127,7 @@ CHANGES


3.8.1 (2009-02-23)
------------------
==================

- Add an ability to set cookie effective domain for CookieClientIdManager.
This is useful for simple cases when you have your application set up on
Expand All @@ -136,14 +138,14 @@ CHANGES


3.8.0 (2008-12-31)
------------------
==================

- Add missing test dependency on ``zope.site`` and
``zope.app.publication``.


3.7.1 (2008-12-30)
------------------
==================

- Specify i18n_domain for titles in apidoc.zcml

Expand All @@ -153,7 +155,7 @@ CHANGES


3.7.0 (2008-10-03)
------------------
==================

New features:

Expand All @@ -164,7 +166,7 @@ New features:


3.6.0 (2008-08-12)
------------------
==================

New features:

Expand All @@ -180,32 +182,32 @@ New features:


3.5.2 (2008-06-12)
------------------
==================

- Remove ConflictErrors caused on SessionData caused by setting
``lastAccessTime``.


3.5.1 (2008-04-30)
------------------
==================

- Split up the ZCML to make it possible to re-use more reasonably.


3.5.0 (2008-03-11)
------------------
==================

- Change the default session "resolution" to a sane value and document/test it.


3.4.1 (2007-09-25)
------------------
==================

- Fixed some meta data and switch to tgz release.


3.4.0 (2007-09-25)
------------------
==================

- Initial release

Expand Down
19 changes: 16 additions & 3 deletions README.rst
@@ -1,8 +1,21 @@
``zope.session``
================
==============
zope.session
==============

.. image:: https://img.shields.io/pypi/v/zope.session.svg
:target: https://pypi.python.org/pypi/zope.session/
:alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/zope.session.svg
:target: https://pypi.org/project/zope.session/
:alt: Supported Python versions

.. image:: https://travis-ci.org/zopefoundation/zope.session.png?branch=master
:target: https://travis-ci.org/zopefoundation/zope.session

.. image:: https://coveralls.io/repos/github/zopefoundation/zope.session/badge.svg?branch=master
:target: https://coveralls.io/github/zopefoundation/zope.session?branch=master

This package provides interfaces for client identification and session
support and their implementations for ``zope.publisher``'s request objects.
support and their implementations for the request objects of
`zope.publisher <https://zopepublisher.readthedocs.io/>`_.
3 changes: 3 additions & 0 deletions setup.cfg
@@ -1,2 +1,5 @@
[flake8]
doctests = yes

[bdist_wheel]
universal = 1
116 changes: 61 additions & 55 deletions setup.py
Expand Up @@ -25,59 +25,65 @@ def read(*rnames):
with open(os.path.join(os.path.dirname(__file__), *rnames)) as f:
return f.read()

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

setup(name='zope.session',
version='4.2.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Client identification and sessions for Zope',
long_description=(
read('README.rst')
+ '\n\n' +
read('src', 'zope', 'session', 'design.txt')
+ '\n\n' +
read('src', 'zope', 'session', 'api.txt')
+ '\n\n' +
read('CHANGES.rst')
),
license='ZPL 2.1',
keywords = "zope3 session",
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3'],
url='http://pypi.python.org/pypi/zope.session',
packages=find_packages('src'),
package_dir = {'': 'src'},
namespace_packages=['zope',],
install_requires=[
'setuptools',
'ZODB >= 4.2.0.b1',
'zope.component',
'zope.i18nmessageid >= 4.0.3',
'zope.interface',
'zope.location',
'zope.publisher >= 4.1.0',
'zope.minmax',
],
extras_require=dict(
test=['zope.testing',],
),
tests_require = ['zope.testing',],
test_suite = 'zope.session.tests.test_suite',
include_package_data = True,
zip_safe = False,
)
version='4.2.0.dev0',
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description='Client identification and sessions for Zope',
long_description=(
read('README.rst')
+ '\n\n' +
read('src', 'zope', 'session', 'design.rst')
+ '\n\n' +
read('src', 'zope', 'session', 'api.rst')
+ '\n\n' +
read('CHANGES.rst')
),
license='ZPL 2.1',
keywords="zope3 session",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 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',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3',
],
url='http://github.com/zopefoundation/zope.session',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['zope',],
install_requires=[
'setuptools',
'ZODB >= 4.2.0.b1',
'zope.component',
'zope.i18nmessageid >= 4.0.3',
'zope.interface',
'zope.location',
'zope.publisher >= 4.1.0',
'zope.minmax',
],
extras_require={
'test': TESTS_REQUIRE,
},
tests_require=TESTS_REQUIRE,
test_suite='zope.session.tests.test_suite',
include_package_data=True,
zip_safe=False,
)
2 changes: 1 addition & 1 deletion src/zope/__init__.py
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover

0 comments on commit ffd3b87

Please sign in to comment.