pax_global_header00006660000000000000000000000064150607435130014516gustar00rootroot0000000000000052 comment=0145a97ac31bb4e0eb9a0d850cdf81b7f64393f9 zope.event-6.0/000077500000000000000000000000001506074351300134605ustar00rootroot00000000000000zope.event-6.0/.editorconfig000066400000000000000000000020101506074351300161260ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python # # EditorConfig Configuration file, for more details see: # http://EditorConfig.org # EditorConfig is a convention description, that could be interpreted # by multiple editors to enforce common coding conventions for specific # file types # top-most EditorConfig file: # Will ignore other EditorConfig files in Home directory or upper tree level. root = true [*] # For All Files # Unix-style newlines with a newline ending every file end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true # Set default charset charset = utf-8 # Indent style default indent_style = space # Max Line Length - a hard line wrap, should be disabled max_line_length = off [*.{py,cfg,ini}] # 4 space indentation indent_size = 4 [*.{yml,zpt,pt,dtml,zcml}] # 2 space indentation indent_size = 2 [{Makefile,.gitmodules}] # Tab indentation (no size specified, but view as 4 spaces) indent_style = tab indent_size = unset tab_width = unset zope.event-6.0/.github/000077500000000000000000000000001506074351300150205ustar00rootroot00000000000000zope.event-6.0/.github/workflows/000077500000000000000000000000001506074351300170555ustar00rootroot00000000000000zope.event-6.0/.github/workflows/pre-commit.yml000066400000000000000000000015521506074351300216570ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python name: pre-commit on: pull_request: push: branches: - master # Allow to run this workflow manually from the Actions tab workflow_dispatch: env: FORCE_COLOR: 1 jobs: pre-commit: permissions: contents: read pull-requests: write name: linting runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: 3.x - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1 with: extra_args: --all-files --show-diff-on-failure env: PRE_COMMIT_COLOR: always - uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 #v1.1.0 if: always() with: msg: Apply pre-commit code formatting zope.event-6.0/.github/workflows/tests.yml000066400000000000000000000034541506074351300207500ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python name: tests on: push: pull_request: schedule: - cron: '0 12 * * 0' # run once a week on Sunday # Allow to run this workflow manually from the Actions tab workflow_dispatch: jobs: build: permissions: contents: read pull-requests: write strategy: # We want to see all failures: fail-fast: false matrix: os: - ["ubuntu", "ubuntu-latest"] config: # [Python version, tox env] - ["3.11", "release-check"] - ["3.9", "py39"] - ["3.10", "py310"] - ["3.11", "py311"] - ["3.12", "py312"] - ["3.13", "py313"] - ["pypy-3.10", "pypy3"] - ["3.11", "docs"] - ["3.11", "coverage"] runs-on: ${{ matrix.os[1] }} if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.config[1] }} steps: - uses: actions/checkout@v4 with: persist-credentials: false - name: Install uv + caching uses: astral-sh/setup-uv@v6 with: enable-cache: true cache-dependency-glob: | setup.* tox.ini python-version: ${{ matrix.matrix.config[0] }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: Test if: ${{ !startsWith(runner.os, 'Mac') }} run: uvx --with tox-uv tox -e ${{ matrix.config[1] }} - name: Test (macOS) if: ${{ startsWith(runner.os, 'Mac') }} run: uvx --with tox-uv tox -e ${{ matrix.config[1] }}-universal2 - name: Coverage if: matrix.config[1] == 'coverage' run: | uvx coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} zope.event-6.0/.gitignore000066400000000000000000000005411506074351300154500ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python *.dll *.egg-info/ *.profraw *.pyc *.pyo *.so .coverage .coverage.* .eggs/ .installed.cfg .mr.developer.cfg .tox/ .vscode/ __pycache__/ bin/ build/ coverage.xml develop-eggs/ develop/ dist/ docs/_build eggs/ etc/ lib/ lib64 log/ parts/ pyvenv.cfg testing.log var/ zope.event-6.0/.meta.toml000066400000000000000000000006321506074351300153620ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" commit-id = "f71de85a" [python] with-windows = false with-pypy = true with-future-python = false with-docs = true with-sphinx-doctests = true with-macos = false [coverage] fail-under = 100 [manifest] additional-rules = [ "include *.yaml", "recursive-include docs *.bat", ] zope.event-6.0/.pre-commit-config.yaml000066400000000000000000000013261506074351300177430ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python minimum_pre_commit_version: '3.6' repos: - repo: https://github.com/pycqa/isort rev: "6.0.1" hooks: - id: isort - repo: https://github.com/hhatto/autopep8 rev: "v2.3.2" hooks: - id: autopep8 args: [--in-place, --aggressive, --aggressive] - repo: https://github.com/asottile/pyupgrade rev: v3.20.0 hooks: - id: pyupgrade args: [--py39-plus] - repo: https://github.com/isidentical/teyit rev: 0.4.3 hooks: - id: teyit - repo: https://github.com/PyCQA/flake8 rev: "7.2.0" hooks: - id: flake8 additional_dependencies: - flake8-debugger == 4.1.2 zope.event-6.0/.readthedocs.yaml000066400000000000000000000012351506074351300167100ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the version of Python and other tools you might need build: os: ubuntu-22.04 tools: python: "3.11" # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py # We recommend specifying your dependencies to enable reproducible builds: # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - requirements: docs/requirements.txt - method: pip path: . zope.event-6.0/CHANGES.rst000066400000000000000000000045551506074351300152730ustar00rootroot00000000000000========================== ``zope.event`` Changelog ========================== 6.0 (2025-09-12) ================ - Replace ``pkg_resources`` namespace with PEP 420 native namespace. 5.1.1 (2025-07-22) ================== - Require ``setuptools >= 75.8.2`` to prevent problems with the new packaging standard. (`#30 `_) 5.1 (2025-06-26) ================ - Add support for Python 3.12 and 3.13. - Drop support for Python 3.7 and 3.8. 5.0 (2023-06-23) ================ - Drop support for Python 2.7, 3.5, 3.6. 4.6 (2022-12-15) ================ - Port documentation to Python 3. - Add support for Python 3.10, 3.11. 4.5.0 (2020-09-18) ================== - Add support for Python 3.8 and 3.9. - Remove support for Python 3.4. 4.4 (2018-10-05) ================ - Add support for Python 3.7 4.3.0 (2017-07-25) ================== - Add support for Python 3.6. - Drop support for Python 3.3. 4.2.0 (2016-02-17) ================== - Add support for Python 3.5. - Drop support for Python 2.6 and 3.2. 4.1.0 (2015-10-18) ================== - Require 100% branch (as well as statement) coverage. - Add a simple class-based handler implementation. 4.0.3 (2014-03-19) ================== - Add support for Python 3.4. - Update ``boostrap.py`` to version 2.2. 4.0.2 (2012-12-31) ================== - Flesh out PyPI Trove classifiers. - Add support for jython 2.7. 4.0.1 (2012-11-21) ================== - Add support for Python 3.3. 4.0.0 (2012-05-16) ================== - Automate build of Sphinx HTML docs and running doctest snippets via tox. - Drop explicit support for Python 2.4 / 2.5 / 3.1. - Add support for PyPy. 3.5.2 (2012-03-30) ================== - This release is the last which will maintain support for Python 2.4 / Python 2.5. - Add support for continuous integration using ``tox`` and ``jenkins``. - Add 'setup.py dev' alias (runs ``setup.py develop`` plus installs ``nose`` and ``coverage``). - Add 'setup.py docs' alias (installs ``Sphinx`` and dependencies). 3.5.1 (2011-08-04) ================== - Add Sphinx documentation. 3.5.0 (2010-05-01) ================== - Add change log to ``long-description``. - Add support for Python 3.x. 3.4.1 (2009-03-03) ================== - A few minor cleanups. 3.4.0 (2007-07-14) ================== - Initial release as a separate project. zope.event-6.0/CONTRIBUTING.md000066400000000000000000000014431506074351300157130ustar00rootroot00000000000000 # Contributing to zopefoundation projects The projects under the zopefoundation GitHub organization are open source and welcome contributions in different forms: * bug reports * code improvements and bug fixes * documentation improvements * pull request reviews For any changes in the repository besides trivial typo fixes you are required to sign the contributor agreement. See https://www.zope.dev/developer/becoming-a-committer.html for details. Please visit our [Developer Guidelines](https://www.zope.dev/developer/guidelines.html) if you'd like to contribute code changes and our [guidelines for reporting bugs](https://www.zope.dev/developer/reporting-bugs.html) if you want to file a bug report. zope.event-6.0/COPYRIGHT.txt000066400000000000000000000000401506074351300155630ustar00rootroot00000000000000Zope Foundation and Contributorszope.event-6.0/LICENSE.txt000066400000000000000000000040261506074351300153050ustar00rootroot00000000000000Zope Public License (ZPL) Version 2.1 A copyright notice accompanies this license document that identifies the copyright holders. This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. zope.event-6.0/MANIFEST.in000066400000000000000000000006071506074351300152210ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python include *.md include *.rst include *.txt include buildout.cfg include tox.ini include .pre-commit-config.yaml recursive-include docs *.py recursive-include docs *.rst recursive-include docs *.txt recursive-include docs Makefile recursive-include src *.py include *.yaml recursive-include docs *.bat zope.event-6.0/README.rst000066400000000000000000000020151506074351300151450ustar00rootroot00000000000000========== zope.event ========== .. image:: https://img.shields.io/pypi/v/zope.event.svg :target: https://pypi.python.org/pypi/zope.event/ :alt: Latest Version .. image:: https://github.com/zopefoundation/zope.event/actions/workflows/tests.yml/badge.svg :target: https://github.com/zopefoundation/zope.event/actions/workflows/tests.yml .. image:: https://readthedocs.org/projects/zopeevent/badge/?version=latest :target: http://zopeevent.readthedocs.org/en/latest/ :alt: Documentation Status The ``zope.event`` package provides a simple event system, including: - An event publishing API, intended for use by applications which are unaware of any subscribers to their events. - A very simple synchronous event-dispatching system, on which more sophisticated event dispatching systems can be built. For example, a type-based event dispatching system that builds on ``zope.event`` can be found in ``zope.component``. Please see http://zopeevent.readthedocs.io/ for the documentation. zope.event-6.0/buildout.cfg000066400000000000000000000001401506074351300157630ustar00rootroot00000000000000[buildout] develop = . parts = test [test] recipe = zc.recipe.testrunner eggs = zope.event zope.event-6.0/docs/000077500000000000000000000000001506074351300144105ustar00rootroot00000000000000zope.event-6.0/docs/Makefile000066400000000000000000000060741506074351300160570ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/zopeevent.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/zopeevent.qhc" latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ "run these through (pdf)latex." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." zope.event-6.0/docs/_static/000077500000000000000000000000001506074351300160365ustar00rootroot00000000000000zope.event-6.0/docs/_static/.gitignore000066400000000000000000000000001506074351300200140ustar00rootroot00000000000000zope.event-6.0/docs/api.rst000066400000000000000000000004201506074351300157070ustar00rootroot00000000000000.. _api-docs: ================================= :mod:`zope.event` API Reference ================================= The package exports the following API symbols. Data ==== .. autodata:: zope.event.subscribers Functions ========= .. autofunction:: zope.event.notify zope.event-6.0/docs/classhandler.rst000066400000000000000000000003031506074351300176010ustar00rootroot00000000000000============================ Class-based event handlers ============================ .. automodule:: zope.event.classhandler :no-members: .. autofunction:: handler(event_class, [handler]) zope.event-6.0/docs/conf.py000066400000000000000000000154371506074351300157210ustar00rootroot00000000000000# # zope.event documentation build configuration file, created by # sphinx-quickstart on Fri Apr 16 17:22:42 2010. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out serve # to show the default. import os import sys import pkg_resources # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('../src')) rqmt = pkg_resources.require('zope.event')[0] # -- General configuration ----------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = {'.rst': 'restructuredtext'} # The encoding of source files. # source_encoding = 'utf-8' # The master toctree document. master_doc = 'index' # General information about the project. project = 'zope.event' copyright = '2010-2024, Zope Foundation and Contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2])) # The full version, including alpha/beta/rc tags. release = rqmt.version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. # unused_docs = [] # List of directories, relative to source directory, that shouldn't be searched # for source files. exclude_trees = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_use_modindex = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'zopeeventdoc' # -- Options for LaTeX output -------------------------------------------- # The paper size ('letter' or 'a4'). # latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). # latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples (source start # file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'zopeevent.tex', 'zope.event Documentation', 'Zope Foundation and Contributors', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # Additional stuff for the LaTeX preamble. # latex_preamble = '' # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_use_modindex = True # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'python': ('https://docs.python.org/', None)} autodoc_default_flags = ['members', 'show-inheritance'] autodoc_member_order = 'bysource' autoclass_content = 'both' zope.event-6.0/docs/hacking.rst000066400000000000000000000205411506074351300165500ustar00rootroot00000000000000Hacking on :mod:`zope.event` ============================ Getting the Code ################ The main repository for :mod:`zope.event` is in the Zope Foundation Github repository: https://github.com/zopefoundation/zope.event You can get a read-only checkout from there: .. code-block:: sh $ git clone https://github.com/zopefoundation/zope.event.git or fork it and get a writeable checkout of your fork: .. code-block:: sh $ git clone git@github.com/jrandom/zope.event.git The project also mirrors the trunk from the Github repository as a Bazaar branch on Launchpad: https://code.launchpad.net/zope.event You can branch the trunk from there using Bazaar: .. code-block:: sh $ bzr branch lp:zope.event Working in a ``virtualenv`` ########################### Installing ---------- If you use the ``virtualenv`` package to create lightweight Python development environments, you can run the tests using nothing more than the ``python`` binary in a virtualenv. First, create a scratch environment: .. code-block:: sh $ /path/to/virtualenv --no-site-packages /tmp/hack-zope.event Next, get this package registered as a "development egg" in the environment: .. code-block:: sh $ /tmp/hack-zope.event/bin/python setup.py develop Running the tests ----------------- Then, you canrun the tests using the build-in ``setuptools`` testrunner: .. code-block:: sh $ /tmp/hack-zope.event/bin/python setup.py test running test ... test_empty (zope.event.tests.Test_notify) ... ok test_not_empty (zope.event.tests.Test_notify) ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK If you have the :mod:`nose` package installed in the virtualenv, you can use its testrunner too: .. code-block:: sh $ /tmp/hack-zope.event/bin/easy_install nose ... $ /tmp/hack-zope.event/bin/python setup.py nosetests running nosetests ... ---------------------------------------------------------------------- Ran 3 tests in 0.011s OK or: .. code-block:: sh $ /tmp/hack-zope.event/bin/nosetests ... ---------------------------------------------------------------------- Ran 3 tests in 0.011s OK If you have the :mod:`coverage` pacakge installed in the virtualenv, you can see how well the tests cover the code: .. code-block:: sh $ /tmp/hack-zope.event/bin/easy_install nose coverage ... $ /tmp/hack-zope.event/bin/python setup.py nosetests \ --with coverage --cover-package=zope.event running nosetests ... Name Stmts Exec Cover Missing ------------------------------------------ zope.event 5 5 100% ---------------------------------------------------------------------- Ran 3 tests in 0.019s OK Building the documentation -------------------------- :mod:`zope.event` uses the nifty :mod:`Sphinx` documentation system for building its docs. Using the same virtualenv you set up to run the tests, you can build the docs: .. code-block:: sh $ /tmp/hack-zope.event/bin/easy_install Sphinx ... $ cd docs $ PATH=/tmp/hack-zope.event/bin:$PATH make html sphinx-build -b html -d _build/doctrees . _build/html ... build succeeded. Build finished. The HTML pages are in _build/html. You can also test the code snippets in the documentation: .. code-block:: sh $ PATH=/tmp/hack-zope.event/bin:$PATH make doctest sphinx-build -b doctest -d _build/doctrees . _build/doctest ... running tests... Document: index --------------- 1 items passed all tests: 17 tests in default 17 tests in 1 items. 17 passed and 0 failed. Test passed. Doctest summary =============== 17 tests 0 failures in tests 0 failures in setup code build succeeded. Testing of doctests in the sources finished, look at the \ results in _build/doctest/output.txt. Using :mod:`zc.buildout` ######################## Setting up the buildout ----------------------- :mod:`zope.event` ships with its own :file:`buildout.cfg` file and :file:`bootstrap.py` for setting up a development buildout: .. code-block:: sh $ /path/to/python2.6 bootstrap.py ... Generated script '.../bin/buildout' $ bin/buildout Develop: '/home/jrandom/projects/Zope/zope.event/.' ... Generated script '.../bin/sphinx-quickstart'. Generated script '.../bin/sphinx-build'. Running the tests ----------------- You can now run the tests: .. code-block:: sh $ bin/test --all Running zope.testing.testrunner.layer.UnitTests tests: Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds. Ran 2 tests with 0 failures and 0 errors in 0.000 seconds. Tearing down left over layers: Tear down zope.testing.testrunner.layer.UnitTests in 0.000 seconds. Using :mod:`tox` ################ Running Tests on Multiple Python Versions ----------------------------------------- `tox `_ is a Python-based test automation tool designed to run tests against multiple Python versions. It creates a ``virtualenv`` for each configured version, installs the current package and configured dependencies into each ``virtualenv``, and then runs the configured commands. :mod:`zope.event` configures the following :mod:`tox` environments via its ``tox.ini`` file: - The ``py26``, ``py27``, ``py33``, ``py34``, and ``pypy`` environments builds a ``virtualenv`` with the corresponding interpreter, installs :mod:`zope.event` and dependencies, and runs the tests via ``python setup.py -q test -q``. - The ``coverage`` environment builds a ``virtualenv`` with ``python2.6``, installs :mod:`zope.event`, installs :mod:`nose` and :mod:`coverage`, and runs ``nosetests`` with statement and branch coverage. - The ``docs`` environment builds a virtualenv with ``python2.6``, installs :mod:`zope.event`, installs ``Sphinx`` and dependencies, and then builds the docs and exercises the doctest snippets. This example requires that you have a working ``python2.6`` on your path, as well as installing ``tox``: .. code-block:: sh $ tox -e py26 GLOB sdist-make: .../zope.event/setup.py py26 sdist-reinst: .../zope.event/.tox/dist/zope.event-4.0.2dev.zip py26 runtests: commands[0] ... ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK ___________________________________ summary ____________________________________ py26: commands succeeded congratulations :) Running ``tox`` with no arguments runs all the configured environments, including building the docs and testing their snippets: .. code-block:: sh $ tox GLOB sdist-make: .../zope.event/setup.py py26 sdist-reinst: .../zope.event/.tox/dist/zope.event-4.0.2dev.zip py26 runtests: commands[0] ... Doctest summary =============== 17 tests 0 failures in tests 0 failures in setup code 0 failures in cleanup code build succeeded. ___________________________________ summary ____________________________________ py26: commands succeeded py27: commands succeeded py32: commands succeeded pypy: commands succeeded coverage: commands succeeded docs: commands succeeded congratulations :) Contributing to :mod:`zope.event` ################################# Submitting a Bug Report ----------------------- :mod:`zope.event` tracks its bugs on Github: https://github.com/zopefoundation/zope.event/issues Please submit bug reports and feature requests there. Sharing Your Changes -------------------- .. note:: Please ensure that all tests are passing before you submit your code. If possible, your submission should include new tests for new features or bug fixes, although it is possible that you may have tested your new code by updating existing tests. If have made a change you would like to share, the best route is to fork the Githb repository, check out your fork, make your changes on a branch in your fork, and push it. You can then submit a pull request from your branch: https://github.com/zopefoundation/zope.event/pulls If you branched the code from Launchpad using Bazaar, you have another option: you can "push" your branch to Launchpad: .. code-block:: sh $ bzr push lp:~jrandom/zope.event/cool_feature After pushing your branch, you can link it to a bug report on Github, or request that the maintainers merge your branch using the Launchpad "merge request" feature. zope.event-6.0/docs/index.rst000066400000000000000000000017421506074351300162550ustar00rootroot00000000000000================================= :mod:`zope.event` Documentation ================================= This package provides a simple event system on which application-specific event systems can be built. For example, a type-based event dispatching system that builds on `zope.interface `_ can be found in `zope.component `_. A simpler system is distributed with this package and is described in :doc:`classhandler`. Application code can generate events without being concerned about the event-processing frameworks that might handle the events. Events are objects that represent something happening in a system. They are used to extend processing by providing processing plug points. Contents: .. toctree:: :maxdepth: 2 usage theory api classhandler hacking ==================== Indices and tables ==================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` zope.event-6.0/docs/make.bat000066400000000000000000000060051506074351300160160ustar00rootroot00000000000000@ECHO OFF REM Command file for Sphinx documentation set SPHINXBUILD=sphinx-build set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\zopeevent.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\zopeevent.ghc goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) :end zope.event-6.0/docs/requirements.txt000066400000000000000000000000071506074351300176710ustar00rootroot00000000000000Sphinx zope.event-6.0/docs/theory.rst000066400000000000000000000007551506074351300164630ustar00rootroot00000000000000.. _theory-docs: Theory of Operation =================== .. note:: This section explains both why an application or framework might publish events, and various ways the integrator might configure the subscribers to achieve different goals. Outline ------- - Events as decoupling mechanism. - Injecting policy into reusable applications. - Extending frameworks. - Event dispatch strategies - Type-based dispatch, as used in ZCA - Attribute-based / key-based dispatch zope.event-6.0/docs/usage.rst000066400000000000000000000061651506074351300162560ustar00rootroot00000000000000.. _usage-docs: ========================= Using :mod:`zope.event` ========================= .. py:module:: zope.event At its core, :mod:`zope.event` simply consists of two things: a list of subscribers (callable objects), and an API function (:func:`~.zope.event.notify`) that invokes those subscribers in order. .. testsetup:: import zope.event old_subscribers = zope.event.subscribers[:] del zope.event.subscribers[:] Notifications ============= Alerting subscribers that an event has occurred is referred to as "notifying them", or sometimes "sending them the event." The package provides a :func:`~.zope.event.notify` function, which is used to notify subscribers that something has happened: .. doctest:: >>> class MyEvent(object): ... pass >>> event = MyEvent() >>> zope.event.notify(event) The notify function is called with a single object, which we call an event. Any object will do: .. doctest:: >>> zope.event.notify(None) >>> zope.event.notify(42) Our subscriber list is currently empty, so nothing happened in response to these notifications. Subscribers =========== A *subscriber* is a callable object that takes one argument, an object that we call the *event*. Application code can manage subscriptions by manipulating the list that ``zope.event`` maintains. This list starts out empty. .. doctest:: >>> import zope.event >>> zope.event.subscribers [] .. note:: Users of higher-level event frameworks will not typically need to modify *this* subscriber list directly. Generally, such event (or application) frameworks will provide more sophisticated subscription mechanisms that build on this simple mechanism. The frameworks will install subscribers that then distribute the event to other subscribers based on event types or data. A simple framework that is based on the class hierarchy is distributed with this package and described in :doc:`classhandler`. A higher-level event framework is distributed with :mod:`zope.component`. For information on using :mod:`zope.event` together with :mod:`zope.component`, see `zope.component's documentation `_. Trivial Subscribers ------------------- As mentioned above, subscribers are simply callable objects that are added to the subscriptions list: .. doctest:: >>> def f(event): ... print('got:', event) >>> zope.event.subscribers.append(f) >>> zope.event.notify(42) got: 42 >>> def g(event): ... print('also got:', event) >>> zope.event.subscribers.append(g) >>> zope.event.notify(42) got: 42 also got: 42 To unsubscribe, simply remove a subscriber from the list: .. doctest:: >>> zope.event.subscribers.remove(f) >>> zope.event.notify(42) also got: 42 >>> zope.event.subscribers.remove(g) >>> zope.event.notify(42) .. testcleanup:: zope.event.subscribers[:] = old_subscribers .. note:: The :func:`~.zope.event.notify` is synchronous, meaning it calls the subscribers in sequential order (and not in parallel). This also means that the process will not continue until all subscribers are done handling the event. zope.event-6.0/pyproject.toml000066400000000000000000000012001506074351300163650ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python [build-system] requires = [ "setuptools == 78.1.1", "wheel", ] build-backend = "setuptools.build_meta" [tool.coverage.run] branch = true source = ["zope.event"] [tool.coverage.report] fail_under = 100 precision = 2 ignore_errors = true show_missing = true exclude_lines = [ "pragma: no cover", "pragma: nocover", "except ImportError:", "raise NotImplementedError", "if __name__ == '__main__':", "self.fail", "raise AssertionError", "raise unittest.Skip", ] [tool.coverage.html] directory = "parts/htmlcov" zope.event-6.0/setup.cfg000066400000000000000000000007661506074351300153120ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python [flake8] doctests = 1 [check-manifest] ignore = .editorconfig .meta.toml docs/_build/html/_sources/* docs/_build/doctest/* [isort] force_single_line = True combine_as_imports = True sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER known_third_party = docutils, pkg_resources, pytz known_zope = known_first_party = default_section = ZOPE line_length = 79 lines_after_imports = 2 zope.event-6.0/setup.py000066400000000000000000000052631506074351300152000ustar00rootroot00000000000000############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## # This package is developed by the Zope Toolkit project, documented here: # https://zopetoolkit.readthedocs.io/ # When developing and releasing this package, please follow the documented # Zope Toolkit policies as described by this documentation. ############################################################################## """Setup for zope.event package """ import os from setuptools import setup def read(*rnames): with open(os.path.join(os.path.dirname(__file__), *rnames)) as f: return f.read() setup( name='zope.event', version='6.0', url='https://github.com/zopefoundation/zope.event', license='ZPL-2.1', description='Very basic event publishing system', author='Zope Foundation and Contributors', author_email='zope-dev@zope.dev', long_description=( read('README.rst') + '\n' + read('CHANGES.rst') ), keywords="event framework dispatch subscribe publish", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: Jython", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Zope :: 3", "Topic :: Software Development :: Libraries :: Python Modules", ], include_package_data=True, python_requires='>=3.9', install_requires=['setuptools >= 75.8.2'], zip_safe=False, extras_require={ 'docs': [ 'Sphinx', ], 'test': [ 'zope.testrunner >= 6.4', ], }, ) zope.event-6.0/src/000077500000000000000000000000001506074351300142475ustar00rootroot00000000000000zope.event-6.0/src/zope/000077500000000000000000000000001506074351300152245ustar00rootroot00000000000000zope.event-6.0/src/zope/event/000077500000000000000000000000001506074351300163455ustar00rootroot00000000000000zope.event-6.0/src/zope/event/__init__.py000066400000000000000000000021661506074351300204630ustar00rootroot00000000000000############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """ Base event system implementation """ #: Applications may register for notification of events by appending a #: callable to the ``subscribers`` list. #: #: Each subscriber takes a single argument, which is the event object #: being published. #: #: Exceptions raised by subscribers will be propagated *without* running #: any remaining subscribers. subscribers = [] def notify(event): """ Notify all subscribers of ``event``. """ for subscriber in subscribers: subscriber(event) zope.event-6.0/src/zope/event/classhandler.py000066400000000000000000000034341506074351300213660ustar00rootroot00000000000000"""Class-based event handlers A light-weight event-handler framework based on event classes. Handlers are registered for event classes: >>> import zope.event.classhandler >>> class MyEvent(object): ... pass >>> def handler1(event): ... print("handler1 %r" % event.__class__.__name__) >>> zope.event.classhandler.handler(MyEvent, handler1) Descriptor syntax: >>> @zope.event.classhandler.handler(MyEvent) ... def handler2(event): ... print("handler2 %r" % event.__class__.__name__) >>> class MySubEvent(MyEvent): ... pass >>> @zope.event.classhandler.handler(MySubEvent) ... def handler3(event): ... print("handler3 %r" % event.__class__.__name__) Subscribers are called in class method-resolution order, so only new-style event classes are supported, and then by order of registry. >>> import zope.event >>> zope.event.notify(MySubEvent()) handler3 'MySubEvent' handler1 'MySubEvent' handler2 'MySubEvent' """ import zope.event __all__ = [ 'handler', ] registry = {} def handler(event_class, handler_=None, _decorator=False): """ Define an event handler for a (new-style) class. This can be called with a class and a handler, or with just a class and the result used as a handler decorator. """ if handler_ is None: return lambda func: handler(event_class, func, True) if not registry: zope.event.subscribers.append(dispatch) if event_class not in registry: registry[event_class] = [handler_] else: registry[event_class].append(handler_) if _decorator: return handler def dispatch(event): for event_class in event.__class__.__mro__: for handler in registry.get(event_class, ()): handler(event) zope.event-6.0/src/zope/event/tests.py000066400000000000000000000035171506074351300200670ustar00rootroot00000000000000############################################################################## # # Copyright (c) 2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """ Test the event system """ import doctest import unittest class Test_notify(unittest.TestCase): def setUp(self): from zope.event import subscribers self._old_subscribers = subscribers[:] subscribers[:] = [] def tearDown(self): from zope.event import subscribers subscribers[:] = self._old_subscribers def _callFUT(self, event): from zope.event import notify notify(event) def test_empty(self): event = object() self._callFUT(event) def test_not_empty(self): from zope.event import subscribers dummy = [] subscribers.append(dummy.append) event = object() self._callFUT(event) self.assertEqual(dummy, [event]) def setUpClassHandlers(test): import zope.event test.globs['old_subs'] = zope.event.subscribers def tearDownClassHandlers(test): import zope.event zope.event.subscribers = test.globs['old_subs'] def test_suite(): return unittest.TestSuite(( unittest.defaultTestLoader.loadTestsFromName(__name__), doctest.DocTestSuite( 'zope.event.classhandler', setUp=setUpClassHandlers, tearDown=tearDownClassHandlers) )) zope.event-6.0/tox.ini000066400000000000000000000035421506074351300147770ustar00rootroot00000000000000# Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python [tox] minversion = 3.18 envlist = release-check lint py39 py310 py311 py312 py313 pypy3 docs coverage [testenv] usedevelop = true package = wheel wheel_build_env = .pkg deps = setuptools == 78.1.1 commands = zope-testrunner --test-path=src {posargs:-vc} sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest extras = test docs [testenv:setuptools-latest] basepython = python3 deps = git+https://github.com/pypa/setuptools.git\#egg=setuptools [testenv:release-check] description = ensure that the distribution is ready to release basepython = python3 skip_install = true deps = setuptools == 78.1.1 wheel twine build check-manifest check-python-versions >= 0.20.0 wheel commands_pre = commands = check-manifest check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml python -m build --sdist --no-isolation twine check dist/* [testenv:lint] description = This env runs all linters configured in .pre-commit-config.yaml basepython = python3 skip_install = true deps = pre-commit commands_pre = commands = pre-commit run --all-files --show-diff-on-failure [testenv:docs] basepython = python3 skip_install = false commands_pre = commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest [testenv:coverage] basepython = python3 allowlist_externals = mkdir deps = coverage[toml] commands = mkdir -p {toxinidir}/parts/htmlcov coverage run -m zope.testrunner --test-path=src {posargs:-vc} coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest coverage html coverage report