Skip to content

Commit

Permalink
Merge c9f1f99 into 9732d2c
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Apr 20, 2017
2 parents 9732d2c + c9f1f99 commit a107b65
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 50 deletions.
17 changes: 5 additions & 12 deletions .travis.yml
Expand Up @@ -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:
Expand All @@ -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
4 changes: 3 additions & 1 deletion CHANGES.rst
Expand Up @@ -3,8 +3,10 @@
=========


1.0.0 (2016-08-18)
1.0.0 (unreleased)
==================

- First PyPI release.
- Add support for Python 3.
- Remove dependency on zope.security. It is no longer loaded by
configure.zcml
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Expand Up @@ -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 <http://ntiwref.readthedocs.io/>`_.
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.
3 changes: 0 additions & 3 deletions setup.cfg
@@ -1,6 +1,3 @@
[egg_info]
tag_build = .dev

[nosetests]
cover-package=nti.wref

Expand Down
10 changes: 4 additions & 6 deletions setup.py
Expand Up @@ -7,11 +7,8 @@
}

TESTS_REQUIRE = [
'fudge',
'nose2[coverage_plugin]',
'nti.testing',
'pyhamcrest',
'z3c.baseregistry',
'zope.testrunner',
]

Expand All @@ -27,7 +24,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=[
Expand All @@ -37,7 +35,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',
],
Expand All @@ -52,10 +50,10 @@ def _read(fname):
'persistent',
'zope.component',
'zope.interface',
'zope.security',
],
extras_require={
'test': TESTS_REQUIRE,
},
entry_points=entry_points,
test_suite="nti.wref.tests",
)
2 changes: 1 addition & 1 deletion src/nti/__init__.py
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
2 changes: 1 addition & 1 deletion src/nti/wref/__init__.py
Expand Up @@ -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__)
Expand Down
31 changes: 15 additions & 16 deletions src/nti/wref/configure.zcml
@@ -1,21 +1,20 @@
<!-- -*- mode: nxml -*- -->
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:zcml="http://namespaces.zope.org/zcml">
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:zcml="http://namespaces.zope.org/zcml">

<include package="zope.component" file="meta.zcml" />
<include package="zope.security" file="meta.zcml" />
<include package="zope.component" />
<include package="zope.security" />

<!-- persistent objects -->
<adapter factory="persistent.wref.WeakRef"
provides=".interfaces.IWeakRef"
for="persistent.interfaces.IPersistent" />
<include package="zope.component" file="meta.zcml" />
<include package="zope.component" />

<!-- objects implementing no interface -->
<adapter factory="weakref.ref"
provides=".interfaces.IWeakRef"
for="" />

<!-- persistent objects -->
<adapter factory="persistent.wref.WeakRef"
provides=".interfaces.IWeakRef"
for="persistent.interfaces.IPersistent" />

<!-- objects implementing no interface -->
<adapter factory="weakref.ref"
provides=".interfaces.IWeakRef"
for="" />

</configure>
4 changes: 1 addition & 3 deletions src/nti/wref/interfaces.py
Expand Up @@ -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__)
Expand Down
3 changes: 1 addition & 2 deletions src/nti/wref/tests/__init__.py
@@ -1,15 +1,14 @@
#!/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
# pylint: disable=W0212,R0904

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
Expand Down
6 changes: 2 additions & 4 deletions 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}
Expand Down

0 comments on commit a107b65

Please sign in to comment.