From 35d5948e0a45891710db7e6715d9eee833122f98 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Thu, 20 Apr 2017 10:54:50 -0500 Subject: [PATCH 1/2] Cleanups for release - modern .travis.yml/tox.ini - Python 3.6 - Remove unicode_literals - publish changes --- .travis.yml | 17 +++++------------ CHANGES.rst | 2 +- MANIFEST.in | 1 + README.rst | 4 +++- setup.cfg | 3 --- setup.py | 8 ++++---- src/nti/__init__.py | 2 +- src/nti/wref/__init__.py | 2 +- src/nti/wref/configure.zcml | 32 ++++++++++++++++---------------- src/nti/wref/interfaces.py | 4 +--- src/nti/wref/tests/__init__.py | 3 +-- tox.ini | 6 ++---- 12 files changed, 36 insertions(+), 48 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0b2094..d4c0c08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,11 @@ language: python sudo: false python: - 2.7 - - 3.5 - - pypy + - 3.6 + - pypy-5.4.1 dist: trusty script: -# Coverage is slow on this old version of pypy - - if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run `which zope-testrunner` --test-path=src --auto-color --auto-progress --all; fi - - if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then zope-testrunner --test-path=src --all; fi + - coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress --all after_success: - coveralls notifications: @@ -21,13 +19,8 @@ install: - pip install -U zope.testrunner - pip install -U -e ".[test]" -# cache: pip seems not to work if `install` is replaced (https://github.com/travis-ci/travis-ci/issues/3239) -cache: - directories: - - $HOME/.cache/pip - - $HOME/.venv - - $HOME/.runtimes - - $HOME/.wheelhouse + +cache: pip before_cache: - rm -f $HOME/.cache/pip/log/debug.log diff --git a/CHANGES.rst b/CHANGES.rst index e4aa2c8..0958f3e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,7 +3,7 @@ ========= -1.0.0 (2016-08-18) +1.0.0 (unreleased) ================== - First PyPI release. diff --git a/MANIFEST.in b/MANIFEST.in index c0549bc..aa473a0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,6 +9,7 @@ include babel.cfg include nose2.cfg include tox.ini include *.txt +include .nti_cover_package recursive-include doc *.py recursive-include doc *.rst recursive-include doc Makefile diff --git a/README.rst b/README.rst index cd82fbc..63ba69e 100644 --- a/README.rst +++ b/README.rst @@ -8,4 +8,6 @@ .. image:: https://coveralls.io/repos/github/NextThought/nti.wref/badge.svg?branch=master :target: https://coveralls.io/github/NextThought/nti.wref?branch=master -For complete details and the changelog, see the `documentation `_. +Interfaces for a weak reference to an object, along with configuration +and code to be able to adapt persistent objects and ordinary objects +to them. diff --git a/setup.cfg b/setup.cfg index 03e56d4..264af40 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[egg_info] -tag_build = .dev - [nosetests] cover-package=nti.wref diff --git a/setup.py b/setup.py index 5105c70..7a0a5bf 100755 --- a/setup.py +++ b/setup.py @@ -7,8 +7,6 @@ } TESTS_REQUIRE = [ - 'fudge', - 'nose2[coverage_plugin]', 'nti.testing', 'pyhamcrest', 'z3c.baseregistry', @@ -27,7 +25,8 @@ def _read(fname): author='Jason Madden', author_email='jason@nextthought.com', description="NTI Weak References", - long_description=_read('README.rst'), + long_description=(_read('README.rst') + '\n\n' + _read("CHANGES.rst")), + url="https://github.com/NextThought/nti.wref", license='Apache', keywords='Weak References', classifiers=[ @@ -37,7 +36,7 @@ def _read(fname): 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], @@ -58,4 +57,5 @@ def _read(fname): 'test': TESTS_REQUIRE, }, entry_points=entry_points, + test_suite="nti.wref.tests", ) diff --git a/src/nti/__init__.py b/src/nti/__init__.py index de40ea7..2cdb0e4 100644 --- a/src/nti/__init__.py +++ b/src/nti/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover diff --git a/src/nti/wref/__init__.py b/src/nti/wref/__init__.py index de8e0d0..2442b24 100644 --- a/src/nti/wref/__init__.py +++ b/src/nti/wref/__init__.py @@ -4,7 +4,7 @@ .. $Id$ """ -from __future__ import print_function, unicode_literals, absolute_import, division +from __future__ import print_function, absolute_import, division __docformat__ = "restructuredtext en" logger = __import__('logging').getLogger(__name__) diff --git a/src/nti/wref/configure.zcml b/src/nti/wref/configure.zcml index b882c4e..5392aef 100644 --- a/src/nti/wref/configure.zcml +++ b/src/nti/wref/configure.zcml @@ -1,21 +1,21 @@ - + - - - - - - - + + + + - - + + + + + diff --git a/src/nti/wref/interfaces.py b/src/nti/wref/interfaces.py index 7caece5..a6283b5 100644 --- a/src/nti/wref/interfaces.py +++ b/src/nti/wref/interfaces.py @@ -2,11 +2,9 @@ # -*- coding: utf-8 -*- """ Interfaces relating to weak references. - -.. $Id$ """ -from __future__ import print_function, unicode_literals, absolute_import, division +from __future__ import print_function, absolute_import, division __docformat__ = "restructuredtext en" logger = __import__('logging').getLogger(__name__) diff --git a/src/nti/wref/tests/__init__.py b/src/nti/wref/tests/__init__.py index a4e5a28..2d1c7f3 100644 --- a/src/nti/wref/tests/__init__.py +++ b/src/nti/wref/tests/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from __future__ import print_function, unicode_literals, absolute_import, division +from __future__ import print_function, absolute_import, division __docformat__ = "restructuredtext en" # disable: accessing protected members, too many methods @@ -9,7 +9,6 @@ from zope.component.hooks import setHooks -from nti.testing.layers import find_test from nti.testing.layers import GCLayerMixin from nti.testing.layers import ZopeComponentLayer from nti.testing.layers import ConfiguringLayerMixin diff --git a/tox.ini b/tox.ini index 237779b..d80ed57 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,9 @@ [tox] -envlist = pypy, py27, py35 +envlist = pypy, py27, py36 [testenv] deps = - nti.testing - zope.testrunner - z3c.baseregistry + .[test] setenv = CHAMELEON_CACHE={envbindir} From c9f1f99bf2a13814e30c1b4cf8a32096f8272080 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Thu, 20 Apr 2017 10:57:47 -0500 Subject: [PATCH 2/2] Remove dependency on zope.security. --- CHANGES.rst | 2 ++ setup.py | 2 -- src/nti/wref/configure.zcml | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0958f3e..8fcd48b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,3 +8,5 @@ - First PyPI release. - Add support for Python 3. +- Remove dependency on zope.security. It is no longer loaded by + configure.zcml diff --git a/setup.py b/setup.py index 7a0a5bf..a6f5e7d 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,6 @@ TESTS_REQUIRE = [ 'nti.testing', 'pyhamcrest', - 'z3c.baseregistry', 'zope.testrunner', ] @@ -51,7 +50,6 @@ def _read(fname): 'persistent', 'zope.component', 'zope.interface', - 'zope.security', ], extras_require={ 'test': TESTS_REQUIRE, diff --git a/src/nti/wref/configure.zcml b/src/nti/wref/configure.zcml index 5392aef..8a9a147 100644 --- a/src/nti/wref/configure.zcml +++ b/src/nti/wref/configure.zcml @@ -4,9 +4,8 @@ xmlns:zcml="http://namespaces.zope.org/zcml"> - - +