zope.hookable 5.4__tar.gz → 7.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.
- {zope.hookable-5.4 → zope_hookable-7.0}/.manylinux-install.sh +8 -12
- zope_hookable-7.0/.pre-commit-config.yaml +28 -0
- zope_hookable-7.0/.readthedocs.yaml +25 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/CHANGES.rst +22 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/MANIFEST.in +2 -2
- {zope.hookable-5.4 → zope_hookable-7.0}/PKG-INFO +35 -8
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/_build/doctest/output.txt +1 -1
- zope_hookable-7.0/docs/_build/html/_sources/hacking.rst.txt +113 -0
- zope_hookable-7.0/docs/conf.py +37 -0
- zope_hookable-7.0/docs/hacking.rst +113 -0
- zope_hookable-7.0/docs/requirements.txt +3 -0
- zope_hookable-7.0/pyproject.toml +25 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/setup.cfg +1 -4
- {zope.hookable-5.4 → zope_hookable-7.0}/setup.py +5 -9
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope/hookable/__init__.py +8 -4
- zope_hookable-7.0/src/zope/hookable/_zope_hookable.c +285 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope/hookable/tests/test_hookable.py +13 -8
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/PKG-INFO +35 -8
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/SOURCES.txt +4 -2
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/requires.txt +1 -0
- zope_hookable-7.0/tox.ini +84 -0
- zope.hookable-5.4/.coveragerc +0 -29
- zope.hookable-5.4/appveyor.yml +0 -51
- zope.hookable-5.4/docs/_build/html/_sources/hacking.rst.txt +0 -304
- zope.hookable-5.4/docs/conf.py +0 -248
- zope.hookable-5.4/docs/hacking.rst +0 -304
- zope.hookable-5.4/src/zope/hookable/_zope_hookable.c +0 -276
- zope.hookable-5.4/tox.ini +0 -76
- {zope.hookable-5.4 → zope_hookable-7.0}/.manylinux.sh +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/CONTRIBUTING.md +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/COPYRIGHT.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/LICENSE.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/README.rst +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/buildout.cfg +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/Makefile +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/_build/html/_sources/api.rst.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/_build/html/_sources/index.rst.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/_build/html/_sources/narr.rst.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/api.rst +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/index.rst +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/make.bat +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/docs/narr.rst +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope/__init__.py +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope/hookable/tests/__init__.py +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope/hookable/tests/test_compile_flags.py +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/dependency_links.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/namespace_packages.txt +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/not-zip-safe +0 -0
- {zope.hookable-5.4 → zope_hookable-7.0}/src/zope.hookable.egg-info/top_level.txt +0 -0
|
@@ -28,14 +28,12 @@ yum -y install libffi-devel
|
|
|
28
28
|
|
|
29
29
|
tox_env_map() {
|
|
30
30
|
case $1 in
|
|
31
|
-
*"cp27"*) echo 'py27';;
|
|
32
|
-
*"cp35"*) echo 'py35';;
|
|
33
|
-
*"cp36"*) echo 'py36';;
|
|
34
|
-
*"cp37"*) echo 'py37';;
|
|
35
31
|
*"cp38"*) echo 'py38';;
|
|
36
32
|
*"cp39"*) echo 'py39';;
|
|
37
33
|
*"cp310"*) echo 'py310';;
|
|
38
34
|
*"cp311"*) echo 'py311';;
|
|
35
|
+
*"cp312"*) echo 'py312';;
|
|
36
|
+
*"cp313"*) echo 'py313';;
|
|
39
37
|
*) echo 'py';;
|
|
40
38
|
esac
|
|
41
39
|
}
|
|
@@ -43,14 +41,12 @@ tox_env_map() {
|
|
|
43
41
|
# Compile wheels
|
|
44
42
|
for PYBIN in /opt/python/*/bin; do
|
|
45
43
|
if \
|
|
46
|
-
[[ "${PYBIN}" == *"
|
|
47
|
-
[[ "${PYBIN}" == *"
|
|
48
|
-
[[ "${PYBIN}" == *"
|
|
49
|
-
[[ "${PYBIN}" == *"
|
|
50
|
-
[[ "${PYBIN}" == *"
|
|
51
|
-
[[ "${PYBIN}" == *"
|
|
52
|
-
[[ "${PYBIN}" == *"cp39"* ]] || \
|
|
53
|
-
[[ "${PYBIN}" == *"cp310"* ]] ; then
|
|
44
|
+
[[ "${PYBIN}" == *"cp38/"* ]] || \
|
|
45
|
+
[[ "${PYBIN}" == *"cp39/"* ]] || \
|
|
46
|
+
[[ "${PYBIN}" == *"cp310/"* ]] || \
|
|
47
|
+
[[ "${PYBIN}" == *"cp311/"* ]] || \
|
|
48
|
+
[[ "${PYBIN}" == *"cp312/"* ]] || \
|
|
49
|
+
[[ "${PYBIN}" == *"cp313/"* ]] ; then
|
|
54
50
|
"${PYBIN}/pip" install -e /io/
|
|
55
51
|
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
|
|
56
52
|
if [ `uname -m` == 'aarch64' ]; then
|
|
@@ -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
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Generated from:
|
|
2
|
+
# https://github.com/zopefoundation/meta/tree/master/config/c-code
|
|
3
|
+
# Read the Docs configuration file
|
|
4
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
5
|
+
|
|
6
|
+
# Required
|
|
7
|
+
version: 2
|
|
8
|
+
|
|
9
|
+
# Set the version of Python and other tools you might need
|
|
10
|
+
build:
|
|
11
|
+
os: ubuntu-22.04
|
|
12
|
+
tools:
|
|
13
|
+
python: "3.11"
|
|
14
|
+
|
|
15
|
+
# Build documentation in the docs/ directory with Sphinx
|
|
16
|
+
sphinx:
|
|
17
|
+
configuration: docs/conf.py
|
|
18
|
+
|
|
19
|
+
# We recommend specifying your dependencies to enable reproducible builds:
|
|
20
|
+
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
21
|
+
python:
|
|
22
|
+
install:
|
|
23
|
+
- requirements: docs/requirements.txt
|
|
24
|
+
- method: pip
|
|
25
|
+
path: .
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Changes
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
7.0 (2024-09-17)
|
|
6
|
+
================
|
|
7
|
+
|
|
8
|
+
- C extension now enables multi-phase module initialization (PEP 489).
|
|
9
|
+
For CPython >= 3.11, the ``hookable`` type is now a heap-allocated
|
|
10
|
+
type. See:
|
|
11
|
+
https://docs.python.org/3.13/howto/isolating-extensions.html
|
|
12
|
+
|
|
13
|
+
- Drop support for Python 3.7.
|
|
14
|
+
|
|
15
|
+
- Add support for Python 3.13.
|
|
16
|
+
|
|
17
|
+
- Build windows wheels on GHA.
|
|
18
|
+
|
|
19
|
+
6.0 (2023-10-05)
|
|
20
|
+
================
|
|
21
|
+
|
|
22
|
+
- Drop support for Python 2.7, 3.5, 3.6.
|
|
23
|
+
|
|
24
|
+
- Add support for Python 3.12.
|
|
25
|
+
|
|
26
|
+
|
|
5
27
|
5.4 (2022-11-17)
|
|
6
28
|
================
|
|
7
29
|
|
|
@@ -5,8 +5,7 @@ include *.rst
|
|
|
5
5
|
include *.txt
|
|
6
6
|
include buildout.cfg
|
|
7
7
|
include tox.ini
|
|
8
|
-
include
|
|
9
|
-
include .coveragerc
|
|
8
|
+
include .pre-commit-config.yaml
|
|
10
9
|
|
|
11
10
|
recursive-include docs *.py
|
|
12
11
|
recursive-include docs *.rst
|
|
@@ -14,5 +13,6 @@ recursive-include docs *.txt
|
|
|
14
13
|
recursive-include docs Makefile
|
|
15
14
|
|
|
16
15
|
recursive-include src *.py
|
|
16
|
+
include *.yaml
|
|
17
17
|
include *.sh
|
|
18
18
|
recursive-include docs *.bat
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zope.hookable
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0
|
|
4
4
|
Summary: Zope hookable
|
|
5
5
|
Home-page: http://github.com/zopefoundation/zope.hookable
|
|
6
6
|
Author: Zope Foundation and Contributors
|
|
@@ -12,25 +12,30 @@ Classifier: Intended Audience :: Developers
|
|
|
12
12
|
Classifier: License :: OSI Approved :: Zope Public License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Programming Language :: Python
|
|
15
|
-
Classifier: Programming Language :: Python :: 2
|
|
16
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
17
15
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
21
16
|
Classifier: Programming Language :: Python :: 3.8
|
|
22
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
22
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
26
23
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
27
24
|
Classifier: Framework :: Zope :: 3
|
|
28
25
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
|
-
Requires-Python: >=
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
License-File: LICENSE.txt
|
|
28
|
+
Requires-Dist: setuptools
|
|
30
29
|
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: Sphinx; extra == "docs"
|
|
31
|
+
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
31
32
|
Provides-Extra: testing
|
|
33
|
+
Requires-Dist: zope.testing; extra == "testing"
|
|
34
|
+
Requires-Dist: zope.testrunner; extra == "testing"
|
|
35
|
+
Requires-Dist: coverage; extra == "testing"
|
|
32
36
|
Provides-Extra: test
|
|
33
|
-
|
|
37
|
+
Requires-Dist: zope.testing; extra == "test"
|
|
38
|
+
Requires-Dist: zope.testrunner; extra == "test"
|
|
34
39
|
|
|
35
40
|
===============
|
|
36
41
|
zope.hookable
|
|
@@ -70,6 +75,28 @@ Documentation is hosted at https://zopehookable.readthedocs.io
|
|
|
70
75
|
Changes
|
|
71
76
|
=========
|
|
72
77
|
|
|
78
|
+
7.0 (2024-09-17)
|
|
79
|
+
================
|
|
80
|
+
|
|
81
|
+
- C extension now enables multi-phase module initialization (PEP 489).
|
|
82
|
+
For CPython >= 3.11, the ``hookable`` type is now a heap-allocated
|
|
83
|
+
type. See:
|
|
84
|
+
https://docs.python.org/3.13/howto/isolating-extensions.html
|
|
85
|
+
|
|
86
|
+
- Drop support for Python 3.7.
|
|
87
|
+
|
|
88
|
+
- Add support for Python 3.13.
|
|
89
|
+
|
|
90
|
+
- Build windows wheels on GHA.
|
|
91
|
+
|
|
92
|
+
6.0 (2023-10-05)
|
|
93
|
+
================
|
|
94
|
+
|
|
95
|
+
- Drop support for Python 2.7, 3.5, 3.6.
|
|
96
|
+
|
|
97
|
+
- Add support for Python 3.12.
|
|
98
|
+
|
|
99
|
+
|
|
73
100
|
5.4 (2022-11-17)
|
|
74
101
|
================
|
|
75
102
|
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
|
@@ -0,0 +1,37 @@
|
|
|
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.hookable'
|
|
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
|
+
'sphinx.ext.intersphinx',
|
|
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']
|
|
35
|
+
|
|
36
|
+
# Example configuration for intersphinx: refer to the Python standard library.
|
|
37
|
+
intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)}
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Generated from:
|
|
3
|
+
# https://github.com/zopefoundation/meta/tree/master/config/c-code
|
|
4
|
+
|
|
5
|
+
[build-system]
|
|
6
|
+
requires = ["setuptools<74"]
|
|
7
|
+
build-backend = "setuptools.build_meta"
|
|
8
|
+
|
|
9
|
+
[tool.coverage.run]
|
|
10
|
+
branch = true
|
|
11
|
+
source = ["zope.hookable"]
|
|
12
|
+
relative_files = true
|
|
13
|
+
|
|
14
|
+
[tool.coverage.report]
|
|
15
|
+
fail_under = 98
|
|
16
|
+
precision = 2
|
|
17
|
+
ignore_errors = true
|
|
18
|
+
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"]
|
|
20
|
+
|
|
21
|
+
[tool.coverage.html]
|
|
22
|
+
directory = "parts/htmlcov"
|
|
23
|
+
|
|
24
|
+
[tool.coverage.paths]
|
|
25
|
+
source = ["src/", ".tox/*/lib/python*/site-packages/", ".tox/pypy*/site-packages/"]
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
[bdist_wheel]
|
|
2
|
-
universal = 1
|
|
3
|
-
|
|
4
1
|
[zest.releaser]
|
|
5
2
|
create-wheel = no
|
|
6
3
|
|
|
@@ -18,7 +15,7 @@ ignore =
|
|
|
18
15
|
force_single_line = True
|
|
19
16
|
combine_as_imports = True
|
|
20
17
|
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
|
|
21
|
-
known_third_party =
|
|
18
|
+
known_third_party = docutils, pkg_resources, pytz
|
|
22
19
|
known_zope =
|
|
23
20
|
known_first_party =
|
|
24
21
|
default_section = ZOPE
|
|
@@ -85,7 +85,7 @@ TESTS_REQUIRE = [
|
|
|
85
85
|
]
|
|
86
86
|
|
|
87
87
|
setup(name='zope.hookable',
|
|
88
|
-
version='
|
|
88
|
+
version='7.0',
|
|
89
89
|
url='http://github.com/zopefoundation/zope.hookable',
|
|
90
90
|
license='ZPL 2.1',
|
|
91
91
|
description='Zope hookable',
|
|
@@ -100,16 +100,13 @@ setup(name='zope.hookable',
|
|
|
100
100
|
"License :: OSI Approved :: Zope Public License",
|
|
101
101
|
"Operating System :: OS Independent",
|
|
102
102
|
"Programming Language :: Python",
|
|
103
|
-
"Programming Language :: Python :: 2",
|
|
104
|
-
"Programming Language :: Python :: 2.7",
|
|
105
103
|
"Programming Language :: Python :: 3",
|
|
106
|
-
"Programming Language :: Python :: 3.5",
|
|
107
|
-
"Programming Language :: Python :: 3.6",
|
|
108
|
-
"Programming Language :: Python :: 3.7",
|
|
109
104
|
"Programming Language :: Python :: 3.8",
|
|
110
105
|
"Programming Language :: Python :: 3.9",
|
|
111
106
|
"Programming Language :: Python :: 3.10",
|
|
112
107
|
"Programming Language :: Python :: 3.11",
|
|
108
|
+
"Programming Language :: Python :: 3.12",
|
|
109
|
+
"Programming Language :: Python :: 3.13",
|
|
113
110
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
114
111
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
115
112
|
"Framework :: Zope :: 3",
|
|
@@ -127,11 +124,10 @@ setup(name='zope.hookable',
|
|
|
127
124
|
],
|
|
128
125
|
include_package_data=True,
|
|
129
126
|
zip_safe=False,
|
|
130
|
-
test_suite='zope.hookable.tests.test_hookable.test_suite',
|
|
131
127
|
extras_require={
|
|
132
|
-
'docs': ['Sphinx'],
|
|
128
|
+
'docs': ['Sphinx', 'sphinx_rtd_theme'],
|
|
133
129
|
'testing': TESTS_REQUIRE + ['coverage'],
|
|
134
130
|
'test': TESTS_REQUIRE,
|
|
135
131
|
},
|
|
136
|
-
python_requires='>=
|
|
132
|
+
python_requires='>=3.8',
|
|
137
133
|
)
|
|
@@ -17,11 +17,15 @@ import os
|
|
|
17
17
|
import platform
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
# Keep these two flags separate: we want the `_PURE_PYTHON` one
|
|
21
|
+
# to represent that the flag is explicitly set to '1' in the environment,
|
|
22
|
+
# since our 'tox.ini' sets it to '0' for its environments which expect
|
|
23
|
+
# to test the C extension.
|
|
24
|
+
_PYPY_OR_JAVA = platform.python_implementation() in ('PyPy', 'Jython')
|
|
25
|
+
_PURE_PYTHON = os.environ.get('PURE_PYTHON') == '1'
|
|
22
26
|
|
|
23
27
|
|
|
24
|
-
class _py_hookable
|
|
28
|
+
class _py_hookable:
|
|
25
29
|
__slots__ = ('_original', '_implementation')
|
|
26
30
|
|
|
27
31
|
def __init__(self, *args, **kw):
|
|
@@ -69,7 +73,7 @@ try:
|
|
|
69
73
|
except ImportError: # pragma: no cover
|
|
70
74
|
_c_hookable = None
|
|
71
75
|
|
|
72
|
-
if _PURE_PYTHON or _c_hookable is None:
|
|
76
|
+
if _PYPY_OR_JAVA or _PURE_PYTHON or _c_hookable is None:
|
|
73
77
|
hookable = _py_hookable
|
|
74
78
|
else: # pragma: no cover
|
|
75
79
|
hookable = _c_hookable
|