Commit 5283e749 authored by Tres Seaver's avatar Tres Seaver

Merge pull request #4 from NextThought/use-py-proxy-base

Make PyContainedProxyBase inherit directly from AbstractPyProxyBase. 
parents 2ef11f47 542e966f
...@@ -6,6 +6,7 @@ env: ...@@ -6,6 +6,7 @@ env:
- TOXENV=pypy - TOXENV=pypy
- TOXENV=py33 - TOXENV=py33
- TOXENV=py34 - TOXENV=py34
- TOXENV=py27-pure-zodb
install: install:
- pip install tox - pip install tox
script: script:
......
...@@ -73,6 +73,8 @@ install_requires = [ ...@@ -73,6 +73,8 @@ install_requires = [
'zope.size', 'zope.size',
'zope.traversing>=4.0.0a1', 'zope.traversing>=4.0.0a1',
'zope.publisher', 'zope.publisher',
'zope.proxy>=4.1.5',
'persistent>=4.1.0',
'BTrees' 'BTrees'
] ]
if not is_pypy: if not is_pypy:
......
This diff is collapsed.
...@@ -62,7 +62,8 @@ def test_basic_persistent_w_non_persistent_proxied(): ...@@ -62,7 +62,8 @@ def test_basic_persistent_w_non_persistent_proxied():
>>> p2._p_changed >>> p2._p_changed
0 0
>>> p2._p_deactivate() >>> p2._p_deactivate()
>>> p2._p_changed >>> bool(p2._p_changed)
False
>>> p2.__name__ >>> p2.__name__
'test' 'test'
...@@ -188,7 +189,7 @@ def test_proxy_cache_interaction(): ...@@ -188,7 +189,7 @@ def test_proxy_cache_interaction():
We've also accessed the root object. If we garbage-collect the We've also accessed the root object. If we garbage-collect the
cache: cache:
>>> conn._cache.incrgc() >>> _ = conn._cache.incrgc()
Then the root object will still be active, because it was accessed Then the root object will still be active, because it was accessed
recently: recently:
...@@ -204,7 +205,8 @@ def test_proxy_cache_interaction(): ...@@ -204,7 +205,8 @@ def test_proxy_cache_interaction():
But it's a ghost: But it's a ghost:
>>> conn.root()['p']._p_changed >>> bool(conn.root()['p']._p_changed)
False
If we deactivate the root object: If we deactivate the root object:
......
[tox] [tox]
envlist = py26,py27,pypy,py33,py34,docs envlist = py26,py27,pypy,py33,py34,py27-zodb,pypy-zodb,py27-pure-zodb,docs
[testenv] [testenv]
commands = python setup.py -q test -q commands = python setup.py -q test -q
...@@ -23,6 +23,29 @@ deps = ...@@ -23,6 +23,29 @@ deps =
zope.testrunner zope.testrunner
zope.testing zope.testing
[testenv:py27-zodb]
basepython =
python2.7
deps =
{[testenv]deps}
ZODB
[testenv:py27-pure-zodb]
basepython =
python2.7
setenv =
PURE_PYTHON = 1
deps =
{[testenv]deps}
ZODB
[testenv:pypy-zodb]
basepython =
pypy
deps =
{[testenv]deps}
ZODB
[testenv:coverage] [testenv:coverage]
usedevelop = true usedevelop = true
basepython = basepython =
...@@ -38,7 +61,7 @@ deps = ...@@ -38,7 +61,7 @@ deps =
[testenv:docs] [testenv:docs]
basepython = basepython =
python2.7 python2.7
commands = commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
deps = deps =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment