zope.proxy 5.2__tar.gz → 6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {zope.proxy-5.2 → zope_proxy-6.0}/.manylinux-install.sh +9 -16
  2. zope_proxy-6.0/.pre-commit-config.yaml +28 -0
  3. {zope.proxy-5.2 → zope_proxy-6.0}/CHANGES.rst +17 -0
  4. {zope.proxy-5.2 → zope_proxy-6.0}/MANIFEST.in +1 -2
  5. {zope.proxy-5.2 → zope_proxy-6.0}/PKG-INFO +20 -6
  6. {zope.proxy-5.2 → zope_proxy-6.0}/README.rst +0 -3
  7. zope_proxy-6.0/docs/_build/doctest/output.txt +313 -0
  8. zope_proxy-6.0/docs/api.rst +95 -0
  9. zope_proxy-6.0/docs/changes.rst +1 -0
  10. zope_proxy-6.0/docs/conf.py +34 -0
  11. zope_proxy-6.0/docs/hacking.rst +311 -0
  12. zope_proxy-6.0/docs/index.rst +20 -0
  13. zope_proxy-6.0/docs/narr.rst +153 -0
  14. zope_proxy-6.0/pyproject.toml +25 -0
  15. {zope.proxy-5.2 → zope_proxy-6.0}/setup.cfg +0 -3
  16. {zope.proxy-5.2 → zope_proxy-6.0}/setup.py +7 -6
  17. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/_zope_proxy_proxy.c +1 -1
  18. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/tests/test_proxy.py +56 -56
  19. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/PKG-INFO +20 -6
  20. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/SOURCES.txt +8 -2
  21. {zope.proxy-5.2 → zope_proxy-6.0}/tox.ini +16 -22
  22. zope.proxy-5.2/.coveragerc +0 -29
  23. zope.proxy-5.2/appveyor.yml +0 -52
  24. zope.proxy-5.2/docs/conf.py +0 -249
  25. {zope.proxy-5.2 → zope_proxy-6.0}/.manylinux.sh +0 -0
  26. {zope.proxy-5.2 → zope_proxy-6.0}/.readthedocs.yaml +0 -0
  27. {zope.proxy-5.2 → zope_proxy-6.0}/CONTRIBUTING.md +0 -0
  28. {zope.proxy-5.2 → zope_proxy-6.0}/COPYRIGHT.txt +0 -0
  29. {zope.proxy-5.2 → zope_proxy-6.0}/LICENSE.txt +0 -0
  30. {zope.proxy-5.2 → zope_proxy-6.0}/buildout.cfg +0 -0
  31. {zope.proxy-5.2 → zope_proxy-6.0}/docs/Makefile +0 -0
  32. /zope.proxy-5.2/docs/api.rst → /zope_proxy-6.0/docs/_build/html/_sources/api.rst.txt +0 -0
  33. /zope.proxy-5.2/docs/changes.rst → /zope_proxy-6.0/docs/_build/html/_sources/changes.rst.txt +0 -0
  34. /zope.proxy-5.2/docs/hacking.rst → /zope_proxy-6.0/docs/_build/html/_sources/hacking.rst.txt +0 -0
  35. /zope.proxy-5.2/docs/index.rst → /zope_proxy-6.0/docs/_build/html/_sources/index.rst.txt +0 -0
  36. /zope.proxy-5.2/docs/narr.rst → /zope_proxy-6.0/docs/_build/html/_sources/narr.rst.txt +0 -0
  37. {zope.proxy-5.2 → zope_proxy-6.0}/docs/make.bat +0 -0
  38. {zope.proxy-5.2 → zope_proxy-6.0}/docs/requirements.txt +0 -0
  39. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/__init__.py +0 -0
  40. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/__init__.py +0 -0
  41. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/decorator.py +0 -0
  42. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/interfaces.py +0 -0
  43. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/proxy.h +0 -0
  44. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/tests/__init__.py +0 -0
  45. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/tests/test_compile_flags.py +0 -0
  46. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope/proxy/tests/test_decorator.py +0 -0
  47. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/dependency_links.txt +0 -0
  48. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/namespace_packages.txt +0 -0
  49. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/not-zip-safe +0 -0
  50. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/requires.txt +0 -0
  51. {zope.proxy-5.2 → zope_proxy-6.0}/src/zope.proxy.egg-info/top_level.txt +0 -0
@@ -28,13 +28,12 @@ yum -y install libffi-devel
28
28
 
29
29
  tox_env_map() {
30
30
  case $1 in
31
- *"cp313"*) echo 'py313';;
32
- *"cp37"*) echo 'py37';;
33
31
  *"cp38"*) echo 'py38';;
34
32
  *"cp39"*) echo 'py39';;
35
33
  *"cp310"*) echo 'py310';;
36
34
  *"cp311"*) echo 'py311';;
37
35
  *"cp312"*) echo 'py312';;
36
+ *"cp313"*) echo 'py313';;
38
37
  *) echo 'py';;
39
38
  esac
40
39
  }
@@ -42,20 +41,14 @@ tox_env_map() {
42
41
  # Compile wheels
43
42
  for PYBIN in /opt/python/*/bin; do
44
43
  if \
45
- [[ "${PYBIN}" == *"cp313"* ]] || \
46
- [[ "${PYBIN}" == *"cp311"* ]] || \
47
- [[ "${PYBIN}" == *"cp312"* ]] || \
48
- [[ "${PYBIN}" == *"cp37"* ]] || \
49
- [[ "${PYBIN}" == *"cp38"* ]] || \
50
- [[ "${PYBIN}" == *"cp39"* ]] || \
51
- [[ "${PYBIN}" == *"cp310"* ]] ; then
52
- if [[ "${PYBIN}" == *"cp313"* ]] ; then
53
- "${PYBIN}/pip" install --pre -e /io/
54
- "${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
55
- else
56
- "${PYBIN}/pip" install -e /io/
57
- "${PYBIN}/pip" wheel /io/ -w wheelhouse/
58
- fi
44
+ [[ "${PYBIN}" == *"cp38/"* ]] || \
45
+ [[ "${PYBIN}" == *"cp39/"* ]] || \
46
+ [[ "${PYBIN}" == *"cp310/"* ]] || \
47
+ [[ "${PYBIN}" == *"cp311/"* ]] || \
48
+ [[ "${PYBIN}" == *"cp312/"* ]] || \
49
+ [[ "${PYBIN}" == *"cp313/"* ]] ; then
50
+ "${PYBIN}/pip" install -e /io/
51
+ "${PYBIN}/pip" wheel /io/ -w wheelhouse/
59
52
  if [ `uname -m` == 'aarch64' ]; then
60
53
  cd /io/
61
54
  ${PYBIN}/pip install tox
@@ -0,0 +1,28 @@
1
+ # Generated from:
2
+ # https://github.com/zopefoundation/meta/tree/master/config/c-code
3
+ minimum_pre_commit_version: '3.6'
4
+ repos:
5
+ - repo: https://github.com/pycqa/isort
6
+ rev: "5.13.2"
7
+ hooks:
8
+ - id: isort
9
+ - repo: https://github.com/hhatto/autopep8
10
+ rev: "v2.3.1"
11
+ hooks:
12
+ - id: autopep8
13
+ args: [--in-place, --aggressive, --aggressive]
14
+ # - repo: https://github.com/asottile/pyupgrade
15
+ # rev: v3.17.0
16
+ # hooks:
17
+ # - id: pyupgrade
18
+ # args: [--py38-plus]
19
+ - repo: https://github.com/isidentical/teyit
20
+ rev: 0.4.3
21
+ hooks:
22
+ - id: teyit
23
+ - repo: https://github.com/PyCQA/flake8
24
+ rev: "7.1.1"
25
+ hooks:
26
+ - id: flake8
27
+ additional_dependencies:
28
+ - flake8-debugger == 4.1.2
@@ -2,6 +2,23 @@
2
2
  Changes
3
3
  =========
4
4
 
5
+ 6.0 (2024-09-17)
6
+ ================
7
+
8
+ - Declare full support for Python 3.13.
9
+
10
+ - Drop support for Python 3.7.
11
+
12
+
13
+ 5.3 (2024-08-07)
14
+ ================
15
+
16
+ - Build Windows wheels on GHA.
17
+
18
+ - Correct return type for ``wrap_hash`` (fixes build on ``i386``).
19
+ (`#61 <https://github.com/zopefoundation/zope.proxy/issues/61>`_)
20
+
21
+
5
22
  5.2 (2024-02-09)
6
23
  ================
7
24
 
@@ -5,8 +5,7 @@ include *.rst
5
5
  include *.txt
6
6
  include buildout.cfg
7
7
  include tox.ini
8
- include appveyor.yml
9
- include .coveragerc
8
+ include .pre-commit-config.yaml
10
9
 
11
10
  recursive-include docs *.py
12
11
  recursive-include docs *.rst
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zope.proxy
3
- Version: 5.2
3
+ Version: 6.0
4
4
  Summary: Generic Transparent Proxies
5
5
  Home-page: http://github.com/zopefoundation/zope.proxy
6
6
  Author: Zope Foundation and Contributors
@@ -15,18 +15,18 @@ Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: Zope Public License
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.7
19
18
  Classifier: Programming Language :: Python :: 3.8
20
19
  Classifier: Programming Language :: Python :: 3.9
21
20
  Classifier: Programming Language :: Python :: 3.10
22
21
  Classifier: Programming Language :: Python :: 3.11
23
22
  Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
25
  Classifier: Programming Language :: Python :: Implementation :: PyPy
26
26
  Classifier: Framework :: Zope :: 3
27
27
  Classifier: Natural Language :: English
28
28
  Classifier: Operating System :: OS Independent
29
- Requires-Python: >=3.7
29
+ Requires-Python: >=3.8
30
30
  License-File: LICENSE.txt
31
31
  Requires-Dist: zope.interface
32
32
  Requires-Dist: setuptools
@@ -45,9 +45,6 @@ Requires-Dist: sphinx_rtd_theme; extra == "docs"
45
45
  .. image:: https://github.com/zopefoundation/zope.proxy/actions/workflows/tests.yml/badge.svg
46
46
  :target: https://github.com/zopefoundation/zope.proxy/actions/workflows/tests.yml
47
47
 
48
- .. image:: https://ci.appveyor.com/api/projects/status/github/zopefoundation/zope.proxy?branch=master&svg=true
49
- :target: https://ci.appveyor.com/project/mgedmin/zope-proxy
50
-
51
48
  .. image:: https://coveralls.io/repos/github/zopefoundation/zope.proxy/badge.svg?branch=master
52
49
  :target: https://coveralls.io/github/zopefoundation/zope.proxy?branch=master
53
50
 
@@ -80,6 +77,23 @@ Complete documentation is at https://zopeproxy.readthedocs.io
80
77
  Changes
81
78
  =========
82
79
 
80
+ 6.0 (2024-09-17)
81
+ ================
82
+
83
+ - Declare full support for Python 3.13.
84
+
85
+ - Drop support for Python 3.7.
86
+
87
+
88
+ 5.3 (2024-08-07)
89
+ ================
90
+
91
+ - Build Windows wheels on GHA.
92
+
93
+ - Correct return type for ``wrap_hash`` (fixes build on ``i386``).
94
+ (`#61 <https://github.com/zopefoundation/zope.proxy/issues/61>`_)
95
+
96
+
83
97
  5.2 (2024-02-09)
84
98
  ================
85
99
 
@@ -5,9 +5,6 @@
5
5
  .. image:: https://github.com/zopefoundation/zope.proxy/actions/workflows/tests.yml/badge.svg
6
6
  :target: https://github.com/zopefoundation/zope.proxy/actions/workflows/tests.yml
7
7
 
8
- .. image:: https://ci.appveyor.com/api/projects/status/github/zopefoundation/zope.proxy?branch=master&svg=true
9
- :target: https://ci.appveyor.com/project/mgedmin/zope-proxy
10
-
11
8
  .. image:: https://coveralls.io/repos/github/zopefoundation/zope.proxy/badge.svg?branch=master
12
9
  :target: https://coveralls.io/github/zopefoundation/zope.proxy?branch=master
13
10
 
@@ -0,0 +1,313 @@
1
+ Results of doctest builder run on 2024-09-17 09:14:15
2
+ =====================================================
3
+
4
+ Document: api
5
+ -------------
6
+ **********************************************************************
7
+ File "api.rst", line 64, in default
8
+ Failed example:
9
+ [interface.getName() for interface in list(providedBy(D1(x)))]
10
+ Exception raised:
11
+ Traceback (most recent call last):
12
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
13
+ exec(compile(example.source, filename, "single",
14
+ File "<doctest default[0]>", line 1, in <module>
15
+ [interface.getName() for interface in list(providedBy(D1(x)))]
16
+ ^^^^^
17
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
18
+ inst = super().__new__(cls)
19
+ ^^^^^^^
20
+ TypeError: super(type, obj): obj must be an instance or subtype of type
21
+ **********************************************************************
22
+ File "api.rst", line 67, in default
23
+ Failed example:
24
+ [interface.getName() for interface in list(providedBy(D2(D1(x))))]
25
+ Exception raised:
26
+ Traceback (most recent call last):
27
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
28
+ exec(compile(example.source, filename, "single",
29
+ File "<doctest default[1]>", line 1, in <module>
30
+ [interface.getName() for interface in list(providedBy(D2(D1(x))))]
31
+ ^^^^^
32
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
33
+ inst = super().__new__(cls)
34
+ ^^^^^^^
35
+ TypeError: super(type, obj): obj must be an instance or subtype of type
36
+ **********************************************************************
37
+ File "api.rst", line 84, in default
38
+ Failed example:
39
+ [interface.getName() for interface in list(providedBy(D1(x)))]
40
+ Exception raised:
41
+ Traceback (most recent call last):
42
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
43
+ exec(compile(example.source, filename, "single",
44
+ File "<doctest default[4]>", line 1, in <module>
45
+ [interface.getName() for interface in list(providedBy(D1(x)))]
46
+ ^^^^^
47
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
48
+ inst = super().__new__(cls)
49
+ ^^^^^^^
50
+ TypeError: super(type, obj): obj must be an instance or subtype of type
51
+ **********************************************************************
52
+ File "api.rst", line 87, in default
53
+ Failed example:
54
+ [interface.getName() for interface in list(providedBy(D2(D1(x))))]
55
+ Exception raised:
56
+ Traceback (most recent call last):
57
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
58
+ exec(compile(example.source, filename, "single",
59
+ File "<doctest default[5]>", line 1, in <module>
60
+ [interface.getName() for interface in list(providedBy(D2(D1(x))))]
61
+ ^^^^^
62
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
63
+ inst = super().__new__(cls)
64
+ ^^^^^^^
65
+ TypeError: super(type, obj): obj must be an instance or subtype of type
66
+ **********************************************************************
67
+ 1 items had failures:
68
+ 4 of 23 in default
69
+ 23 tests in 1 items.
70
+ 19 passed and 4 failed.
71
+ ***Test Failed*** 4 failures.
72
+
73
+ Document: narr
74
+ --------------
75
+ **********************************************************************
76
+ File "narr.rst", line 21, in default
77
+ Failed example:
78
+ p = MyProxy(l)
79
+ Exception raised:
80
+ Traceback (most recent call last):
81
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
82
+ exec(compile(example.source, filename, "single",
83
+ File "<doctest default[3]>", line 1, in <module>
84
+ p = MyProxy(l)
85
+ ^^^^^^^^^^
86
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
87
+ inst = super().__new__(cls)
88
+ ^^^^^^^
89
+ TypeError: super(type, obj): obj must be an instance or subtype of type
90
+ **********************************************************************
91
+ File "narr.rst", line 27, in default
92
+ Failed example:
93
+ p.x = 'x'
94
+ Exception raised:
95
+ Traceback (most recent call last):
96
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
97
+ exec(compile(example.source, filename, "single",
98
+ File "<doctest default[0]>", line 1, in <module>
99
+ p.x = 'x'
100
+ ^
101
+ NameError: name 'p' is not defined
102
+ **********************************************************************
103
+ File "narr.rst", line 28, in default
104
+ Failed example:
105
+ p.x
106
+ Exception raised:
107
+ Traceback (most recent call last):
108
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
109
+ exec(compile(example.source, filename, "single",
110
+ File "<doctest default[1]>", line 1, in <module>
111
+ p.x
112
+ ^
113
+ NameError: name 'p' is not defined
114
+ **********************************************************************
115
+ File "narr.rst", line 30, in default
116
+ Failed example:
117
+ p.f()
118
+ Exception raised:
119
+ Traceback (most recent call last):
120
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
121
+ exec(compile(example.source, filename, "single",
122
+ File "<doctest default[2]>", line 1, in <module>
123
+ p.f()
124
+ ^
125
+ NameError: name 'p' is not defined
126
+ **********************************************************************
127
+ File "narr.rst", line 37, in default
128
+ Failed example:
129
+ p
130
+ Exception raised:
131
+ Traceback (most recent call last):
132
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
133
+ exec(compile(example.source, filename, "single",
134
+ File "<doctest default[0]>", line 1, in <module>
135
+ p
136
+ NameError: name 'p' is not defined
137
+ **********************************************************************
138
+ File "narr.rst", line 39, in default
139
+ Failed example:
140
+ p.pop()
141
+ Exception raised:
142
+ Traceback (most recent call last):
143
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
144
+ exec(compile(example.source, filename, "single",
145
+ File "<doctest default[1]>", line 1, in <module>
146
+ p.pop()
147
+ ^
148
+ NameError: name 'p' is not defined
149
+ **********************************************************************
150
+ File "narr.rst", line 41, in default
151
+ Failed example:
152
+ p
153
+ Exception raised:
154
+ Traceback (most recent call last):
155
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
156
+ exec(compile(example.source, filename, "single",
157
+ File "<doctest default[2]>", line 1, in <module>
158
+ p
159
+ NameError: name 'p' is not defined
160
+ **********************************************************************
161
+ File "narr.rst", line 68, in default
162
+ Failed example:
163
+ p = MyProxy(o)
164
+ Exception raised:
165
+ Traceback (most recent call last):
166
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
167
+ exec(compile(example.source, filename, "single",
168
+ File "<doctest default[5]>", line 1, in <module>
169
+ p = MyProxy(o)
170
+ ^^^^^^^^^^
171
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
172
+ inst = super().__new__(cls)
173
+ ^^^^^^^
174
+ TypeError: super(type, obj): obj must be an instance or subtype of type
175
+ **********************************************************************
176
+ File "narr.rst", line 69, in default
177
+ Failed example:
178
+ p.q
179
+ Exception raised:
180
+ Traceback (most recent call last):
181
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
182
+ exec(compile(example.source, filename, "single",
183
+ File "<doctest default[6]>", line 1, in <module>
184
+ p.q
185
+ ^
186
+ NameError: name 'p' is not defined
187
+ **********************************************************************
188
+ File "narr.rst", line 72, in default
189
+ Failed example:
190
+ p.z
191
+ Exception raised:
192
+ Traceback (most recent call last):
193
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
194
+ exec(compile(example.source, filename, "single",
195
+ File "<doctest default[7]>", line 1, in <module>
196
+ p.z
197
+ ^
198
+ NameError: name 'p' is not defined
199
+ **********************************************************************
200
+ File "narr.rst", line 75, in default
201
+ Failed example:
202
+ p.z = 1
203
+ Exception raised:
204
+ Traceback (most recent call last):
205
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
206
+ exec(compile(example.source, filename, "single",
207
+ File "<doctest default[8]>", line 1, in <module>
208
+ p.z = 1
209
+ ^
210
+ NameError: name 'p' is not defined
211
+ **********************************************************************
212
+ File "narr.rst", line 76, in default
213
+ Failed example:
214
+ o.z, p.z
215
+ Exception raised:
216
+ Traceback (most recent call last):
217
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
218
+ exec(compile(example.source, filename, "single",
219
+ File "<doctest default[9]>", line 1, in <module>
220
+ o.z, p.z
221
+ ^^^
222
+ AttributeError: 'MyOb' object has no attribute 'z'
223
+ **********************************************************************
224
+ File "narr.rst", line 107, in default
225
+ Failed example:
226
+ p = MyProxy(o)
227
+ Exception raised:
228
+ Traceback (most recent call last):
229
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
230
+ exec(compile(example.source, filename, "single",
231
+ File "<doctest default[5]>", line 1, in <module>
232
+ p = MyProxy(o)
233
+ ^^^^^^^^^^
234
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
235
+ inst = super().__new__(cls)
236
+ ^^^^^^^
237
+ TypeError: super(type, obj): obj must be an instance or subtype of type
238
+ **********************************************************************
239
+ File "narr.rst", line 108, in default
240
+ Failed example:
241
+ p.foo()
242
+ Exception raised:
243
+ Traceback (most recent call last):
244
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
245
+ exec(compile(example.source, filename, "single",
246
+ File "<doctest default[6]>", line 1, in <module>
247
+ p.foo()
248
+ ^
249
+ NameError: name 'p' is not defined
250
+ **********************************************************************
251
+ File "narr.rst", line 126, in default
252
+ Failed example:
253
+ p = ProxyBase(c1)
254
+ Exception raised:
255
+ Traceback (most recent call last):
256
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
257
+ exec(compile(example.source, filename, "single",
258
+ File "<doctest default[5]>", line 1, in <module>
259
+ p = ProxyBase(c1)
260
+ ^^^^^^^^^^^^^
261
+ File "/Users/jens/src/zope/zope.proxy/.tox/docs/lib/python3.11/site-packages/zope/proxy/__init__.py", line 110, in __new__
262
+ inst = super().__new__(cls)
263
+ ^^^^^^^
264
+ TypeError: super(type, obj): obj must be an instance or subtype of type
265
+ **********************************************************************
266
+ File "narr.rst", line 133, in default
267
+ Failed example:
268
+ old = setProxiedObject(p, c2)
269
+ Exception raised:
270
+ Traceback (most recent call last):
271
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
272
+ exec(compile(example.source, filename, "single",
273
+ File "<doctest default[0]>", line 1, in <module>
274
+ old = setProxiedObject(p, c2)
275
+ ^
276
+ NameError: name 'p' is not defined
277
+ **********************************************************************
278
+ File "narr.rst", line 134, in default
279
+ Failed example:
280
+ old is c1
281
+ Exception raised:
282
+ Traceback (most recent call last):
283
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
284
+ exec(compile(example.source, filename, "single",
285
+ File "<doctest default[1]>", line 1, in <module>
286
+ old is c1
287
+ ^^^
288
+ NameError: name 'old' is not defined
289
+ **********************************************************************
290
+ File "narr.rst", line 137, in default
291
+ Failed example:
292
+ getProxiedObject(p) is c2
293
+ Exception raised:
294
+ Traceback (most recent call last):
295
+ File "/Users/jens/src/python/Python-3.11.9/lib/python3.11/doctest.py", line 1355, in __run
296
+ exec(compile(example.source, filename, "single",
297
+ File "<doctest default[2]>", line 1, in <module>
298
+ getProxiedObject(p) is c2
299
+ ^
300
+ NameError: name 'p' is not defined
301
+ **********************************************************************
302
+ 1 items had failures:
303
+ 18 of 37 in default
304
+ 37 tests in 1 items.
305
+ 19 passed and 18 failed.
306
+ ***Test Failed*** 18 failures.
307
+
308
+ Doctest summary
309
+ ===============
310
+ 60 tests
311
+ 22 failures in tests
312
+ 0 failures in setup code
313
+ 0 failures in cleanup code
@@ -0,0 +1,95 @@
1
+ :mod:`zope.proxy` API
2
+ =====================
3
+
4
+ :mod:`zope.proxy.interfaces`
5
+ ----------------------------
6
+
7
+ .. automodule:: zope.proxy.interfaces
8
+
9
+ .. autointerface:: IProxyIntrospection
10
+ :members:
11
+ :member-order: bysource
12
+
13
+
14
+ :mod:`zope.proxy`
15
+ -----------------
16
+
17
+ .. automodule:: zope.proxy
18
+ :members:
19
+
20
+
21
+ :mod:`zope.proxy.decorator`
22
+ ---------------------------
23
+
24
+ .. automodule:: zope.proxy.decorator
25
+
26
+ .. doctest::
27
+
28
+ >>> from zope.interface import Interface
29
+ >>> from zope.interface import directlyProvides
30
+ >>> from zope.interface import implementer
31
+ >>> class I1(Interface):
32
+ ... pass
33
+ >>> class I2(Interface):
34
+ ... pass
35
+ >>> class I3(Interface):
36
+ ... pass
37
+ >>> class I4(Interface):
38
+ ... pass
39
+ >>> from zope.proxy.decorator import SpecificationDecoratorBase
40
+ >>> @implementer(I1)
41
+ ... class D1(SpecificationDecoratorBase):
42
+ ... pass
43
+ >>> @implementer(I2)
44
+ ... class D2(SpecificationDecoratorBase):
45
+ ... pass
46
+ >>> @implementer(I3)
47
+ ... class X(object):
48
+ ... pass
49
+ >>> x = X()
50
+ >>> directlyProvides(x, I4)
51
+
52
+ Interfaces of X are ordered with the directly-provided interfaces first.
53
+
54
+ .. doctest::
55
+
56
+ >>> from zope.interface import providedBy
57
+ >>> [interface.getName() for interface in list(providedBy(x))]
58
+ ['I4', 'I3']
59
+
60
+ When we decorate objects, what order should the interfaces come
61
+ in? One could argue that decorators are less specific, so they
62
+ should come last.
63
+
64
+ .. doctest::
65
+
66
+ >>> [interface.getName() for interface in list(providedBy(D1(x)))]
67
+ ['I4', 'I3', 'I1']
68
+
69
+ >>> [interface.getName() for interface in list(providedBy(D2(D1(x))))]
70
+ ['I4', 'I3', 'I1', 'I2']
71
+
72
+ SpecificationDecorators also work with old-style classes:
73
+
74
+ .. doctest::
75
+
76
+ >>> @implementer(I3)
77
+ ... class X:
78
+ ... pass
79
+
80
+ >>> x = X()
81
+ >>> directlyProvides(x, I4)
82
+
83
+ >>> [interface.getName() for interface in list(providedBy(x))]
84
+ ['I4', 'I3']
85
+
86
+ >>> [interface.getName() for interface in list(providedBy(D1(x)))]
87
+ ['I4', 'I3', 'I1']
88
+
89
+ >>> [interface.getName() for interface in list(providedBy(D2(D1(x))))]
90
+ ['I4', 'I3', 'I1', 'I2']
91
+
92
+ .. autoclass:: DecoratorSpecificationDescriptor
93
+ :members:
94
+
95
+ .. autoclass:: SpecificationDecoratorBase
@@ -0,0 +1 @@
1
+ .. include:: ../CHANGES.rst
@@ -0,0 +1,34 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ import datetime
7
+
8
+
9
+ # -- Project information -----------------------------------------------------
10
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
11
+ year = datetime.datetime.now().year
12
+
13
+ project = 'zope.proxy'
14
+ copyright = f'2012-{year}, Zope Foundation and contributors'
15
+ author = 'Zope Foundation and contributors'
16
+
17
+ # -- General configuration ---------------------------------------------------
18
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
19
+
20
+ extensions = [
21
+ 'sphinx.ext.autodoc',
22
+ 'sphinx.ext.doctest',
23
+ 'repoze.sphinx.autointerface',
24
+ ]
25
+
26
+ templates_path = ['_templates']
27
+ exclude_patterns = []
28
+
29
+
30
+ # -- Options for HTML output -------------------------------------------------
31
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
32
+
33
+ html_theme = 'sphinx_rtd_theme'
34
+ html_static_path = ['_static']