zope.hookable 7.0__tar.gz → 8.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.

Potentially problematic release.


This version of zope.hookable might be problematic. Click here for more details.

Files changed (42) hide show
  1. {zope_hookable-7.0 → zope_hookable-8.0}/.manylinux-install.sh +11 -6
  2. {zope_hookable-7.0 → zope_hookable-8.0}/.pre-commit-config.yaml +5 -5
  3. {zope_hookable-7.0 → zope_hookable-8.0}/CHANGES.rst +10 -0
  4. {zope_hookable-7.0 → zope_hookable-8.0}/CONTRIBUTING.md +1 -1
  5. {zope_hookable-7.0 → zope_hookable-8.0}/PKG-INFO +29 -8
  6. {zope_hookable-7.0 → zope_hookable-8.0}/pyproject.toml +19 -3
  7. {zope_hookable-7.0 → zope_hookable-8.0}/setup.py +8 -9
  8. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope/hookable/__init__.py +1 -1
  9. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope.hookable.egg-info/PKG-INFO +29 -8
  10. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope.hookable.egg-info/SOURCES.txt +0 -7
  11. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope.hookable.egg-info/requires.txt +2 -2
  12. {zope_hookable-7.0 → zope_hookable-8.0}/tox.ini +7 -3
  13. zope_hookable-7.0/docs/_build/doctest/output.txt +0 -17
  14. zope_hookable-7.0/docs/_build/html/_sources/api.rst.txt +0 -5
  15. zope_hookable-7.0/docs/_build/html/_sources/hacking.rst.txt +0 -113
  16. zope_hookable-7.0/docs/_build/html/_sources/index.rst.txt +0 -20
  17. zope_hookable-7.0/docs/_build/html/_sources/narr.rst.txt +0 -48
  18. zope_hookable-7.0/src/zope/__init__.py +0 -1
  19. zope_hookable-7.0/src/zope.hookable.egg-info/namespace_packages.txt +0 -1
  20. {zope_hookable-7.0 → zope_hookable-8.0}/.manylinux.sh +0 -0
  21. {zope_hookable-7.0 → zope_hookable-8.0}/.readthedocs.yaml +0 -0
  22. {zope_hookable-7.0 → zope_hookable-8.0}/COPYRIGHT.txt +0 -0
  23. {zope_hookable-7.0 → zope_hookable-8.0}/LICENSE.txt +0 -0
  24. {zope_hookable-7.0 → zope_hookable-8.0}/MANIFEST.in +0 -0
  25. {zope_hookable-7.0 → zope_hookable-8.0}/README.rst +0 -0
  26. {zope_hookable-7.0 → zope_hookable-8.0}/buildout.cfg +0 -0
  27. {zope_hookable-7.0 → zope_hookable-8.0}/docs/Makefile +0 -0
  28. {zope_hookable-7.0 → zope_hookable-8.0}/docs/api.rst +0 -0
  29. {zope_hookable-7.0 → zope_hookable-8.0}/docs/conf.py +0 -0
  30. {zope_hookable-7.0 → zope_hookable-8.0}/docs/hacking.rst +0 -0
  31. {zope_hookable-7.0 → zope_hookable-8.0}/docs/index.rst +0 -0
  32. {zope_hookable-7.0 → zope_hookable-8.0}/docs/make.bat +0 -0
  33. {zope_hookable-7.0 → zope_hookable-8.0}/docs/narr.rst +0 -0
  34. {zope_hookable-7.0 → zope_hookable-8.0}/docs/requirements.txt +0 -0
  35. {zope_hookable-7.0 → zope_hookable-8.0}/setup.cfg +0 -0
  36. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope/hookable/_zope_hookable.c +0 -0
  37. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope/hookable/tests/__init__.py +0 -0
  38. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope/hookable/tests/test_compile_flags.py +0 -0
  39. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope/hookable/tests/test_hookable.py +0 -0
  40. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope.hookable.egg-info/dependency_links.txt +0 -0
  41. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope.hookable.egg-info/not-zip-safe +0 -0
  42. {zope_hookable-7.0 → zope_hookable-8.0}/src/zope.hookable.egg-info/top_level.txt +0 -0
@@ -28,12 +28,12 @@ yum -y install libffi-devel
28
28
 
29
29
  tox_env_map() {
30
30
  case $1 in
31
- *"cp38"*) echo 'py38';;
32
31
  *"cp39"*) echo 'py39';;
33
32
  *"cp310"*) echo 'py310';;
34
33
  *"cp311"*) echo 'py311';;
35
34
  *"cp312"*) echo 'py312';;
36
35
  *"cp313"*) echo 'py313';;
36
+ *"cp314"*) echo 'py314';;
37
37
  *) echo 'py';;
38
38
  esac
39
39
  }
@@ -41,14 +41,19 @@ tox_env_map() {
41
41
  # Compile wheels
42
42
  for PYBIN in /opt/python/*/bin; do
43
43
  if \
44
- [[ "${PYBIN}" == *"cp38/"* ]] || \
45
44
  [[ "${PYBIN}" == *"cp39/"* ]] || \
46
45
  [[ "${PYBIN}" == *"cp310/"* ]] || \
47
46
  [[ "${PYBIN}" == *"cp311/"* ]] || \
48
47
  [[ "${PYBIN}" == *"cp312/"* ]] || \
49
- [[ "${PYBIN}" == *"cp313/"* ]] ; then
50
- "${PYBIN}/pip" install -e /io/
51
- "${PYBIN}/pip" wheel /io/ -w wheelhouse/
48
+ [[ "${PYBIN}" == *"cp313/"* ]] || \
49
+ [[ "${PYBIN}" == *"cp314/"* ]] ; then
50
+ if [[ "${PYBIN}" == *"cp314/"* ]] ; then
51
+ "${PYBIN}/pip" install --pre -e /io/
52
+ "${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
53
+ else
54
+ "${PYBIN}/pip" install -e /io/
55
+ "${PYBIN}/pip" wheel /io/ -w wheelhouse/
56
+ fi
52
57
  if [ `uname -m` == 'aarch64' ]; then
53
58
  cd /io/
54
59
  ${PYBIN}/pip install tox
@@ -61,6 +66,6 @@ for PYBIN in /opt/python/*/bin; do
61
66
  done
62
67
 
63
68
  # Bundle external shared libraries into the wheels
64
- for whl in wheelhouse/zope.hookable*.whl; do
69
+ for whl in wheelhouse/zope_hookable*.whl; do
65
70
  auditwheel repair "$whl" -w /io/wheelhouse/
66
71
  done
@@ -3,25 +3,25 @@
3
3
  minimum_pre_commit_version: '3.6'
4
4
  repos:
5
5
  - repo: https://github.com/pycqa/isort
6
- rev: "5.13.2"
6
+ rev: "6.0.1"
7
7
  hooks:
8
8
  - id: isort
9
9
  - repo: https://github.com/hhatto/autopep8
10
- rev: "v2.3.1"
10
+ rev: "v2.3.2"
11
11
  hooks:
12
12
  - id: autopep8
13
13
  args: [--in-place, --aggressive, --aggressive]
14
14
  - repo: https://github.com/asottile/pyupgrade
15
- rev: v3.17.0
15
+ rev: v3.20.0
16
16
  hooks:
17
17
  - id: pyupgrade
18
- args: [--py38-plus]
18
+ args: [--py39-plus]
19
19
  - repo: https://github.com/isidentical/teyit
20
20
  rev: 0.4.3
21
21
  hooks:
22
22
  - id: teyit
23
23
  - repo: https://github.com/PyCQA/flake8
24
- rev: "7.1.1"
24
+ rev: "7.3.0"
25
25
  hooks:
26
26
  - id: flake8
27
27
  additional_dependencies:
@@ -2,6 +2,15 @@
2
2
  Changes
3
3
  =========
4
4
 
5
+ 8.0 (2025-09-12)
6
+ ================
7
+
8
+ - Replace ``pkg_resources`` namespace with PEP 420 native namespace.
9
+
10
+ - Drop support for Python 3.8.
11
+
12
+ - Add preliminary support for Python 3.14.
13
+
5
14
  7.0 (2024-09-17)
6
15
  ================
7
16
 
@@ -16,6 +25,7 @@
16
25
 
17
26
  - Build windows wheels on GHA.
18
27
 
28
+
19
29
  6.0 (2023-10-05)
20
30
  ================
21
31
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  Generated from:
3
3
  https://github.com/zopefoundation/meta/tree/master/config/c-code
4
- -->
4
+ -->
5
5
  # Contributing to zopefoundation projects
6
6
 
7
7
  The projects under the zopefoundation GitHub organization are open source and
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: zope.hookable
3
- Version: 7.0
3
+ Version: 8.0
4
4
  Summary: Zope hookable
5
5
  Home-page: http://github.com/zopefoundation/zope.hookable
6
6
  Author: Zope Foundation and Contributors
7
- Author-email: zope-dev@zope.org
8
- License: ZPL 2.1
7
+ Author-email: zope-dev@zope.dev
8
+ License: ZPL-2.1
9
9
  Keywords: function hook replacement loose coupled
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
@@ -13,7 +13,6 @@ Classifier: License :: OSI Approved :: Zope Public License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
@@ -23,7 +22,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
23
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
24
23
  Classifier: Framework :: Zope :: 3
25
24
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.8
25
+ Requires-Python: >=3.9
27
26
  License-File: LICENSE.txt
28
27
  Requires-Dist: setuptools
29
28
  Provides-Extra: docs
@@ -31,11 +30,23 @@ Requires-Dist: Sphinx; extra == "docs"
31
30
  Requires-Dist: sphinx_rtd_theme; extra == "docs"
32
31
  Provides-Extra: testing
33
32
  Requires-Dist: zope.testing; extra == "testing"
34
- Requires-Dist: zope.testrunner; extra == "testing"
33
+ Requires-Dist: zope.testrunner>=6.4; extra == "testing"
35
34
  Requires-Dist: coverage; extra == "testing"
36
35
  Provides-Extra: test
37
36
  Requires-Dist: zope.testing; extra == "test"
38
- Requires-Dist: zope.testrunner; extra == "test"
37
+ Requires-Dist: zope.testrunner>=6.4; extra == "test"
38
+ Dynamic: author
39
+ Dynamic: author-email
40
+ Dynamic: classifier
41
+ Dynamic: description
42
+ Dynamic: home-page
43
+ Dynamic: keywords
44
+ Dynamic: license
45
+ Dynamic: license-file
46
+ Dynamic: provides-extra
47
+ Dynamic: requires-dist
48
+ Dynamic: requires-python
49
+ Dynamic: summary
39
50
 
40
51
  ===============
41
52
  zope.hookable
@@ -75,6 +86,15 @@ Documentation is hosted at https://zopehookable.readthedocs.io
75
86
  Changes
76
87
  =========
77
88
 
89
+ 8.0 (2025-09-12)
90
+ ================
91
+
92
+ - Replace ``pkg_resources`` namespace with PEP 420 native namespace.
93
+
94
+ - Drop support for Python 3.8.
95
+
96
+ - Add preliminary support for Python 3.14.
97
+
78
98
  7.0 (2024-09-17)
79
99
  ================
80
100
 
@@ -89,6 +109,7 @@ Documentation is hosted at https://zopehookable.readthedocs.io
89
109
 
90
110
  - Build windows wheels on GHA.
91
111
 
112
+
92
113
  6.0 (2023-10-05)
93
114
  ================
94
115
 
@@ -3,7 +3,10 @@
3
3
  # https://github.com/zopefoundation/meta/tree/master/config/c-code
4
4
 
5
5
  [build-system]
6
- requires = ["setuptools<74"]
6
+ requires = [
7
+ "setuptools == 78.1.1",
8
+ "wheel",
9
+ ]
7
10
  build-backend = "setuptools.build_meta"
8
11
 
9
12
  [tool.coverage.run]
@@ -16,10 +19,23 @@ fail_under = 98
16
19
  precision = 2
17
20
  ignore_errors = true
18
21
  show_missing = true
19
- exclude_lines = ["pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip"]
22
+ exclude_lines = [
23
+ "pragma: no cover",
24
+ "pragma: nocover",
25
+ "except ImportError:",
26
+ "raise NotImplementedError",
27
+ "if __name__ == '__main__':",
28
+ "self.fail",
29
+ "raise AssertionError",
30
+ "raise unittest.Skip",
31
+ ]
20
32
 
21
33
  [tool.coverage.html]
22
34
  directory = "parts/htmlcov"
23
35
 
24
36
  [tool.coverage.paths]
25
- source = ["src/", ".tox/*/lib/python*/site-packages/", ".tox/pypy*/site-packages/"]
37
+ source = [
38
+ "src/",
39
+ ".tox/*/lib/python*/site-packages/",
40
+ ".tox/pypy*/site-packages/",
41
+ ]
@@ -25,7 +25,6 @@ from distutils.errors import DistutilsExecError
25
25
  from distutils.errors import DistutilsPlatformError
26
26
 
27
27
  from setuptools import Extension
28
- from setuptools import find_packages
29
28
  from setuptools import setup
30
29
  from setuptools.command.build_ext import build_ext
31
30
 
@@ -81,17 +80,17 @@ else:
81
80
 
82
81
  TESTS_REQUIRE = [
83
82
  'zope.testing',
84
- 'zope.testrunner',
83
+ 'zope.testrunner >= 6.4',
85
84
  ]
86
85
 
87
86
  setup(name='zope.hookable',
88
- version='7.0',
87
+ version='8.0',
89
88
  url='http://github.com/zopefoundation/zope.hookable',
90
- license='ZPL 2.1',
89
+ license='ZPL-2.1',
91
90
  description='Zope hookable',
92
91
  keywords='function hook replacement loose coupled',
93
92
  author='Zope Foundation and Contributors',
94
- author_email='zope-dev@zope.org',
93
+ author_email='zope-dev@zope.dev',
95
94
  long_description=(read('README.rst') + '\n\n' +
96
95
  read('CHANGES.rst')),
97
96
  classifiers=[
@@ -101,7 +100,6 @@ setup(name='zope.hookable',
101
100
  "Operating System :: OS Independent",
102
101
  "Programming Language :: Python",
103
102
  "Programming Language :: Python :: 3",
104
- "Programming Language :: Python :: 3.8",
105
103
  "Programming Language :: Python :: 3.9",
106
104
  "Programming Language :: Python :: 3.10",
107
105
  "Programming Language :: Python :: 3.11",
@@ -116,9 +114,10 @@ setup(name='zope.hookable',
116
114
  cmdclass={
117
115
  'build_ext': optional_build_ext,
118
116
  },
119
- packages=find_packages('src'),
117
+ # we need the following two parameters because we compile C code,
118
+ # otherwise only the shared library is installed:
120
119
  package_dir={'': 'src'},
121
- namespace_packages=['zope'],
120
+ packages=['zope.hookable'],
122
121
  install_requires=[
123
122
  'setuptools',
124
123
  ],
@@ -129,5 +128,5 @@ setup(name='zope.hookable',
129
128
  'testing': TESTS_REQUIRE + ['coverage'],
130
129
  'test': TESTS_REQUIRE,
131
130
  },
132
- python_requires='>=3.8',
131
+ python_requires='>=3.9',
133
132
  )
@@ -70,7 +70,7 @@ class _py_hookable:
70
70
 
71
71
  try:
72
72
  from zope.hookable._zope_hookable import hookable as _c_hookable
73
- except ImportError: # pragma: no cover
73
+ except ModuleNotFoundError: # pragma: no cover
74
74
  _c_hookable = None
75
75
 
76
76
  if _PYPY_OR_JAVA or _PURE_PYTHON or _c_hookable is None:
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: zope.hookable
3
- Version: 7.0
3
+ Version: 8.0
4
4
  Summary: Zope hookable
5
5
  Home-page: http://github.com/zopefoundation/zope.hookable
6
6
  Author: Zope Foundation and Contributors
7
- Author-email: zope-dev@zope.org
8
- License: ZPL 2.1
7
+ Author-email: zope-dev@zope.dev
8
+ License: ZPL-2.1
9
9
  Keywords: function hook replacement loose coupled
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
@@ -13,7 +13,6 @@ Classifier: License :: OSI Approved :: Zope Public License
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
@@ -23,7 +22,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
23
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
24
23
  Classifier: Framework :: Zope :: 3
25
24
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.8
25
+ Requires-Python: >=3.9
27
26
  License-File: LICENSE.txt
28
27
  Requires-Dist: setuptools
29
28
  Provides-Extra: docs
@@ -31,11 +30,23 @@ Requires-Dist: Sphinx; extra == "docs"
31
30
  Requires-Dist: sphinx_rtd_theme; extra == "docs"
32
31
  Provides-Extra: testing
33
32
  Requires-Dist: zope.testing; extra == "testing"
34
- Requires-Dist: zope.testrunner; extra == "testing"
33
+ Requires-Dist: zope.testrunner>=6.4; extra == "testing"
35
34
  Requires-Dist: coverage; extra == "testing"
36
35
  Provides-Extra: test
37
36
  Requires-Dist: zope.testing; extra == "test"
38
- Requires-Dist: zope.testrunner; extra == "test"
37
+ Requires-Dist: zope.testrunner>=6.4; extra == "test"
38
+ Dynamic: author
39
+ Dynamic: author-email
40
+ Dynamic: classifier
41
+ Dynamic: description
42
+ Dynamic: home-page
43
+ Dynamic: keywords
44
+ Dynamic: license
45
+ Dynamic: license-file
46
+ Dynamic: provides-extra
47
+ Dynamic: requires-dist
48
+ Dynamic: requires-python
49
+ Dynamic: summary
39
50
 
40
51
  ===============
41
52
  zope.hookable
@@ -75,6 +86,15 @@ Documentation is hosted at https://zopehookable.readthedocs.io
75
86
  Changes
76
87
  =========
77
88
 
89
+ 8.0 (2025-09-12)
90
+ ================
91
+
92
+ - Replace ``pkg_resources`` namespace with PEP 420 native namespace.
93
+
94
+ - Drop support for Python 3.8.
95
+
96
+ - Add preliminary support for Python 3.14.
97
+
78
98
  7.0 (2024-09-17)
79
99
  ================
80
100
 
@@ -89,6 +109,7 @@ Documentation is hosted at https://zopehookable.readthedocs.io
89
109
 
90
110
  - Build windows wheels on GHA.
91
111
 
112
+
92
113
  6.0 (2023-10-05)
93
114
  ================
94
115
 
@@ -21,16 +21,9 @@ docs/index.rst
21
21
  docs/make.bat
22
22
  docs/narr.rst
23
23
  docs/requirements.txt
24
- docs/_build/doctest/output.txt
25
- docs/_build/html/_sources/api.rst.txt
26
- docs/_build/html/_sources/hacking.rst.txt
27
- docs/_build/html/_sources/index.rst.txt
28
- docs/_build/html/_sources/narr.rst.txt
29
- src/zope/__init__.py
30
24
  src/zope.hookable.egg-info/PKG-INFO
31
25
  src/zope.hookable.egg-info/SOURCES.txt
32
26
  src/zope.hookable.egg-info/dependency_links.txt
33
- src/zope.hookable.egg-info/namespace_packages.txt
34
27
  src/zope.hookable.egg-info/not-zip-safe
35
28
  src/zope.hookable.egg-info/requires.txt
36
29
  src/zope.hookable.egg-info/top_level.txt
@@ -6,9 +6,9 @@ sphinx_rtd_theme
6
6
 
7
7
  [test]
8
8
  zope.testing
9
- zope.testrunner
9
+ zope.testrunner>=6.4
10
10
 
11
11
  [testing]
12
12
  zope.testing
13
- zope.testrunner
13
+ zope.testrunner>=6.4
14
14
  coverage
@@ -3,20 +3,23 @@
3
3
  [tox]
4
4
  minversion = 4.0
5
5
  envlist =
6
+ release-check
6
7
  lint
7
- py38,py38-pure
8
8
  py39,py39-pure
9
9
  py310,py310-pure
10
10
  py311,py311-pure
11
11
  py312,py312-pure
12
12
  py313,py313-pure
13
+ py314,py314-pure
13
14
  pypy3
14
15
  docs
15
16
  coverage
16
17
 
17
18
  [testenv]
19
+ pip_pre = py314: true
18
20
  deps =
19
- setuptools <74
21
+ setuptools == 78.1.1
22
+ Sphinx
20
23
  setenv =
21
24
  pure: PURE_PYTHON=1
22
25
  !pure-!pypy3: PURE_PYTHON=0
@@ -52,7 +55,8 @@ description = ensure that the distribution is ready to release
52
55
  basepython = python3
53
56
  skip_install = true
54
57
  deps =
55
- setuptools <74
58
+ setuptools == 78.1.1
59
+ wheel
56
60
  twine
57
61
  build
58
62
  check-manifest
@@ -1,17 +0,0 @@
1
- Results of doctest builder run on 2024-09-17 08:22:56
2
- =====================================================
3
-
4
- Document: narr
5
- --------------
6
- 1 items passed all tests:
7
- 13 tests in default
8
- 13 tests in 1 items.
9
- 13 passed and 0 failed.
10
- Test passed.
11
-
12
- Doctest summary
13
- ===============
14
- 13 tests
15
- 0 failures in tests
16
- 0 failures in setup code
17
- 0 failures in cleanup code
@@ -1,5 +0,0 @@
1
- :mod:`zope.hookable` API
2
- ========================
3
-
4
- .. automodule:: zope.hookable
5
- :members:
@@ -1,113 +0,0 @@
1
- Hacking on :mod:`zope.hookable`
2
- ================================
3
-
4
- Getting the Code
5
- ################
6
-
7
- The main repository for :mod:`zope.hookable` is in the Zope Foundation
8
- Github repository:
9
-
10
- https://github.com/zopefoundation/zope.hookable
11
-
12
- You can get a read-only checkout from there:
13
-
14
- .. code-block:: sh
15
-
16
- $ git clone https://github.com/zopefoundation/zope.hookable.git
17
-
18
- or fork it and get a writeable checkout of your fork:
19
-
20
- .. code-block:: sh
21
-
22
- $ git clone git@github.com/jrandom/zope.hookable.git
23
-
24
-
25
- Using :mod:`tox`
26
- ################
27
-
28
- Running Tests on Multiple Python Versions
29
- -----------------------------------------
30
-
31
- `tox <http://tox.testrun.org/latest/>`_ is a Python-based test automation
32
- tool designed to run tests against multiple Python versions. It creates
33
- a ``virtualenv`` for each configured version, installs the current package
34
- and configured dependencies into each ``virtualenv``, and then runs the
35
- configured commands.
36
-
37
- :mod:`zope.hookable` configures the following :mod:`tox` environments via
38
- its ``tox.ini`` file:
39
-
40
- - The defined Python environments build a ``virtualenv/venv``, install
41
- :mod:`zope.hookable` and dependencies, and run the tests via
42
- ``zope.testrunner`` There are environments both for with and without using
43
- the C code extension.
44
-
45
- - The ``coverage`` environment builds a ``virtualenv``,
46
- installs :mod:`zope.hookable` and dependencies, installs
47
- :mod:`coverage`, and runs the tests with coverage.
48
-
49
- - The ``docs`` environment builds a virtualenv installs :mod:`zope.hookable`
50
- and dependencies, installs ``Sphinx`` and dependencies, and then builds the
51
- docs and exercises the doctest snippets.
52
-
53
- This example requires that you have a working ``python3.11`` on your path,
54
- as well as an installed ``tox``:
55
-
56
- .. code-block:: sh
57
-
58
- $ tox -e py311
59
-
60
- Running ``tox`` with no arguments runs all the configured environments,
61
- including building the docs and testing their snippets:
62
-
63
- .. code-block:: sh
64
-
65
- $ tox
66
-
67
- To run the tests in parallel use:
68
-
69
- .. code-block:: sh
70
-
71
- $ tox -p auto
72
-
73
- To see the coverage output:
74
-
75
- .. code-block:: sh
76
-
77
- $ tox -e coverage
78
-
79
- Building the documentation
80
- --------------------------
81
-
82
- :mod:`zope.hookable` uses the nifty :mod:`Sphinx` documentation system
83
- for building its docs.
84
-
85
- .. code-block:: sh
86
-
87
- $ tox -e docs
88
-
89
- It also tests the code snippets in the documentation.
90
-
91
- Contributing to :mod:`zope.hookable`
92
- ####################################
93
-
94
- Submitting a Bug Report
95
- -----------------------
96
-
97
- :mod:`zope.hookable` tracks its bugs on Github:
98
-
99
-
100
- https://github.com/zopefoundation/zope.hookable/issues
101
-
102
- Please submit bug reports and feature requests there.
103
-
104
-
105
- Sharing Your Changes
106
- --------------------
107
-
108
- If have made a change you would like to share, the best route is to fork
109
- the GitHub repository, check out your fork, make your changes on a branch
110
- in your fork, and push it. You can then submit a pull request from your
111
- branch:
112
-
113
- https://github.com/zopefoundation/zope.hookable/pulls
@@ -1,20 +0,0 @@
1
- :mod:`zope.hookable`
2
- ====================
3
-
4
- Contents:
5
-
6
- .. toctree::
7
- :maxdepth: 2
8
-
9
- narr
10
- api
11
- hacking
12
-
13
-
14
- Indices and tables
15
- ==================
16
-
17
- * :ref:`genindex`
18
- * :ref:`modindex`
19
- * :ref:`search`
20
-
@@ -1,48 +0,0 @@
1
- Hookable Object Support
2
- =======================
3
-
4
- :mod:`zope.hookable` supports the efficient creation of hookable objects,
5
- which are callable objects that are meant to be replaced by other callables,
6
- at least optionally.
7
-
8
- The idea is to create a function that does some default thing and
9
- make it hookable. Later, someone can modify what it does by calling
10
- its sethook method and changing its implementation. All users of
11
- the function, including those that imported it, will see the
12
- change.
13
-
14
- .. doctest::
15
-
16
- >>> from zope.hookable import hookable
17
- >>> def f41():
18
- ... return 41
19
- >>> f = hookable(f41)
20
- >>> f.implementation is f.original
21
- True
22
- >>> f()
23
- 41
24
-
25
- We can replace the implementation, without replacing ``f``: this means
26
- that modules which have already imported ``f`` will see the hooked version.
27
-
28
- .. doctest::
29
-
30
- >>> old = f.sethook(lambda: 42)
31
- >>> f.implementation is f.original
32
- False
33
- >>> old is f41
34
- True
35
- >>> f()
36
- 42
37
- >>> f.original()
38
- 41
39
- >>> f.implementation()
40
- 42
41
-
42
- We can undo the hook by calling ``reset``.
43
-
44
- .. doctest::
45
-
46
- >>> f.reset()
47
- >>> f()
48
- 41
@@ -1 +0,0 @@
1
- __import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes