MultiMapping 5.1__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.
@@ -0,0 +1,28 @@
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
3
+ minimum_pre_commit_version: '3.6'
4
+ repos:
5
+ - repo: https://github.com/pycqa/isort
6
+ rev: "7.0.0"
7
+ hooks:
8
+ - id: isort
9
+ - repo: https://github.com/hhatto/autopep8
10
+ rev: "v2.3.2"
11
+ hooks:
12
+ - id: autopep8
13
+ args: [--in-place, --aggressive, --aggressive]
14
+ - repo: https://github.com/asottile/pyupgrade
15
+ rev: v3.21.2
16
+ hooks:
17
+ - id: pyupgrade
18
+ args: [--py310-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.3.0"
25
+ hooks:
26
+ - id: flake8
27
+ additional_dependencies:
28
+ - flake8-debugger == 4.1.2
@@ -0,0 +1,51 @@
1
+ Changelog
2
+ =========
3
+
4
+ 5.1 (2026-01-23)
5
+ ----------------
6
+
7
+ - Move package metadata from setup.py to pyproject.toml.
8
+
9
+ - Add support for Python 3.12, 3.13, 3.14.
10
+
11
+ - Drop support for Python 3.7, 3.8, 3.9.
12
+
13
+
14
+ 5.0 (2023-02-09)
15
+ ----------------
16
+
17
+ - Drop support for Python 2.7, 3.4, 3.5, 3.6.
18
+
19
+ - Add support for Python 3.8, 3.9, 3.10, 3.11.
20
+
21
+
22
+ 4.1 (2018-10-05)
23
+ ----------------
24
+
25
+ - Add support for Python 3.7.
26
+
27
+ 4.0 (2017-05-17)
28
+ ----------------
29
+
30
+ - Add `__contains__` support.
31
+
32
+ - Remove the Python 2-only C extension.
33
+
34
+ 3.1 (2017-04-26)
35
+ ----------------
36
+
37
+ - Add support for Python 3.6, drop support for Python 2.6.
38
+
39
+ 3.0 (2016-04-03)
40
+ ----------------
41
+
42
+ - Update compatibility to Python 3.4/3.5.
43
+
44
+ - Add a pure-Python implementation used for Python 3 and Pypy.
45
+
46
+ - Rewrote tests as unit tests.
47
+
48
+ 2.13.0 (2010-03-30)
49
+ -------------------
50
+
51
+ - Released as separate package.
@@ -0,0 +1,23 @@
1
+ <!--
2
+ Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
3
+ https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
4
+ -->
5
+ # Contributing to zopefoundation projects
6
+
7
+ The projects under the zopefoundation GitHub organization are open source and
8
+ welcome contributions in different forms:
9
+
10
+ * bug reports
11
+ * code improvements and bug fixes
12
+ * documentation improvements
13
+ * pull request reviews
14
+
15
+ For any changes in the repository besides trivial typo fixes you are required
16
+ to sign the contributor agreement. See
17
+ https://www.zope.dev/developer/becoming-a-committer.html for details.
18
+
19
+ Please visit our [Developer
20
+ Guidelines](https://www.zope.dev/developer/guidelines.html) if you'd like to
21
+ contribute code changes and our [guidelines for reporting
22
+ bugs](https://www.zope.dev/developer/reporting-bugs.html) if you want to file a
23
+ bug report.
@@ -0,0 +1 @@
1
+ Zope Foundation and Contributors
@@ -0,0 +1,44 @@
1
+ Zope Public License (ZPL) Version 2.1
2
+
3
+ A copyright notice accompanies this license document that identifies the
4
+ copyright holders.
5
+
6
+ This license has been certified as open source. It has also been designated as
7
+ GPL compatible by the Free Software Foundation (FSF).
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions are met:
11
+
12
+ 1. Redistributions in source code must retain the accompanying copyright
13
+ notice, this list of conditions, and the following disclaimer.
14
+
15
+ 2. Redistributions in binary form must reproduce the accompanying copyright
16
+ notice, this list of conditions, and the following disclaimer in the
17
+ documentation and/or other materials provided with the distribution.
18
+
19
+ 3. Names of the copyright holders must not be used to endorse or promote
20
+ products derived from this software without prior written permission from the
21
+ copyright holders.
22
+
23
+ 4. The right to distribute this software or to use it for any purpose does not
24
+ give you the right to use Servicemarks (sm) or Trademarks (tm) of the
25
+ copyright
26
+ holders. Use of them is covered by separate agreement with the copyright
27
+ holders.
28
+
29
+ 5. If any files are modified, you must cause the modified files to carry
30
+ prominent notices stating that you changed the files and the date of any
31
+ change.
32
+
33
+ Disclaimer
34
+
35
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
36
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
38
+ EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
39
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
40
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
41
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
42
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
43
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
44
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,10 @@
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
3
+ include *.md
4
+ include *.rst
5
+ include *.txt
6
+ include buildout.cfg
7
+ include tox.ini
8
+ include .pre-commit-config.yaml
9
+
10
+ recursive-include src *.py
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: MultiMapping
3
+ Version: 5.1
4
+ Summary: Special MultiMapping objects used in Zope.
5
+ Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
+ Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
7
+ License: ZPL-2.1
8
+ Project-URL: Source, https://github.com/zopefoundation/MultiMapping
9
+ Project-URL: Issues, https://github.com/zopefoundation/MultiMapping/issues
10
+ Project-URL: Changelog, https://github.com/zopefoundation/MultiMapping/blob/master/CHANGES.txt
11
+ Classifier: Development Status :: 6 - Mature
12
+ Classifier: Environment :: Web Environment
13
+ Classifier: Framework :: Zope :: 5
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: Implementation :: CPython
23
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/x-rst
26
+ License-File: LICENSE.txt
27
+ Requires-Dist: ExtensionClass
28
+ Dynamic: license-file
29
+
30
+ Overview
31
+ ========
32
+
33
+ MultiMapping provides special objects used in some Zope internals like ZRDB.
34
+
35
+ Changelog
36
+ =========
37
+
38
+ 5.1 (2026-01-23)
39
+ ----------------
40
+
41
+ - Move package metadata from setup.py to pyproject.toml.
42
+
43
+ - Add support for Python 3.12, 3.13, 3.14.
44
+
45
+ - Drop support for Python 3.7, 3.8, 3.9.
46
+
47
+
48
+ 5.0 (2023-02-09)
49
+ ----------------
50
+
51
+ - Drop support for Python 2.7, 3.4, 3.5, 3.6.
52
+
53
+ - Add support for Python 3.8, 3.9, 3.10, 3.11.
54
+
55
+
56
+ 4.1 (2018-10-05)
57
+ ----------------
58
+
59
+ - Add support for Python 3.7.
60
+
61
+ 4.0 (2017-05-17)
62
+ ----------------
63
+
64
+ - Add `__contains__` support.
65
+
66
+ - Remove the Python 2-only C extension.
67
+
68
+ 3.1 (2017-04-26)
69
+ ----------------
70
+
71
+ - Add support for Python 3.6, drop support for Python 2.6.
72
+
73
+ 3.0 (2016-04-03)
74
+ ----------------
75
+
76
+ - Update compatibility to Python 3.4/3.5.
77
+
78
+ - Add a pure-Python implementation used for Python 3 and Pypy.
79
+
80
+ - Rewrote tests as unit tests.
81
+
82
+ 2.13.0 (2010-03-30)
83
+ -------------------
84
+
85
+ - Released as separate package.
@@ -0,0 +1,4 @@
1
+ Overview
2
+ ========
3
+
4
+ MultiMapping provides special objects used in some Zope internals like ZRDB.
@@ -0,0 +1,12 @@
1
+ [buildout]
2
+ develop = .
3
+ parts = interpreter test
4
+
5
+ [interpreter]
6
+ recipe = zc.recipe.egg
7
+ interpreter = python
8
+ eggs = MultiMapping
9
+
10
+ [test]
11
+ recipe = zc.recipe.testrunner
12
+ eggs = MultiMapping
@@ -0,0 +1,71 @@
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
3
+ [build-system]
4
+ requires = [
5
+ "setuptools >= 78.1.1,< 81",
6
+ "wheel",
7
+ ]
8
+ build-backend = "setuptools.build_meta"
9
+
10
+
11
+ [project]
12
+ name = "MultiMapping"
13
+ version = "5.1"
14
+ description = "Special MultiMapping objects used in Zope."
15
+ license = {text = "ZPL-2.1"}
16
+ classifiers = [
17
+ "Development Status :: 6 - Mature",
18
+ "Environment :: Web Environment",
19
+ "Framework :: Zope :: 5",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Programming Language :: Python :: 3.14",
28
+ "Programming Language :: Python :: Implementation :: CPython",
29
+ "Programming Language :: Python :: Implementation :: PyPy",
30
+ ]
31
+ dynamic = ["readme"]
32
+ requires-python = ">=3.10"
33
+ authors = [
34
+ {name = "Zope Foundation and contributors",email = "zope-dev@zope.dev"},
35
+ ]
36
+ maintainers = [
37
+ {name = "Plone Foundation and contributors",email = "zope-dev@zope.dev"},
38
+ ]
39
+ dependencies = ["ExtensionClass"]
40
+
41
+ [project.urls]
42
+ Source = "https://github.com/zopefoundation/MultiMapping"
43
+ Issues = "https://github.com/zopefoundation/MultiMapping/issues"
44
+ Changelog = "https://github.com/zopefoundation/MultiMapping/blob/master/CHANGES.txt"
45
+
46
+ [tool.coverage.run]
47
+ branch = true
48
+ source = ["MultiMapping"]
49
+
50
+ [tool.coverage.report]
51
+ fail_under = 100
52
+ precision = 2
53
+ ignore_errors = true
54
+ show_missing = true
55
+ exclude_lines = [
56
+ "pragma: no cover",
57
+ "pragma: nocover",
58
+ "except ImportError:",
59
+ "raise NotImplementedError",
60
+ "if __name__ == '__main__':",
61
+ "self.fail",
62
+ "raise AssertionError",
63
+ "raise unittest.Skip",
64
+ ]
65
+
66
+ [tool.coverage.html]
67
+ directory = "parts/htmlcov"
68
+
69
+ [tool.setuptools.dynamic]
70
+ readme = {file = ["README.rst", "CHANGES.rst"]}
71
+
@@ -0,0 +1,23 @@
1
+ [flake8]
2
+ doctests = 1
3
+
4
+ [check-manifest]
5
+ ignore =
6
+ .editorconfig
7
+ .meta.toml
8
+
9
+ [isort]
10
+ force_single_line = True
11
+ combine_as_imports = True
12
+ sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
13
+ known_third_party = docutils, pkg_resources, pytz
14
+ known_zope =
15
+ known_first_party =
16
+ default_section = ZOPE
17
+ line_length = 79
18
+ lines_after_imports = 2
19
+
20
+ [egg_info]
21
+ tag_build =
22
+ tag_date = 0
23
+
@@ -0,0 +1,21 @@
1
+ ##############################################################################
2
+ #
3
+ # Copyright (c) 2010 Zope Foundation and Contributors.
4
+ # All Rights Reserved.
5
+ #
6
+ # This software is subject to the provisions of the Zope Public License,
7
+ # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
+ # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
+ # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
+ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
+ # FOR A PARTICULAR PURPOSE.
12
+ #
13
+ ##############################################################################
14
+
15
+ from setuptools import setup
16
+
17
+
18
+ version = "6.0.dev0"
19
+
20
+ # See pyproject.toml for package metadata
21
+ setup()
@@ -0,0 +1,44 @@
1
+ from ExtensionClass import Base
2
+
3
+
4
+ class MultiMapping(Base):
5
+ __slots__ = ('__dicts__',)
6
+
7
+ def __init__(self, *args):
8
+ self.__dicts__ = list(args)
9
+
10
+ def __getitem__(self, key):
11
+ for d in self.__dicts__[::-1]:
12
+ try:
13
+ return d[key]
14
+ except (KeyError, AttributeError):
15
+ # XXX How do we get an AttributeError?
16
+ pass
17
+ raise KeyError(key)
18
+
19
+ def get(self, key, default=None):
20
+ try:
21
+ return self[key]
22
+ except KeyError:
23
+ return default
24
+
25
+ def __contains__(self, key):
26
+ try:
27
+ self[key]
28
+ except KeyError:
29
+ return False
30
+ return True
31
+
32
+ has_key = __contains__ # NOQA
33
+
34
+ def push(self, d):
35
+ self.__dicts__.append(d)
36
+
37
+ def pop(self, n=-1):
38
+ return self.__dicts__.pop(n)
39
+
40
+ def __len__(self):
41
+ return sum(len(d) for d in self.__dicts__)
42
+
43
+
44
+ pyMultiMapping = MultiMapping
@@ -0,0 +1,77 @@
1
+ ##############################################################################
2
+ #
3
+ # Copyright (c) 2003 Zope Foundation and Contributors.
4
+ # All Rights Reserved.
5
+ #
6
+ # This software is subject to the provisions of the Zope Public License,
7
+ # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
+ # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
+ # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
+ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
+ # FOR A PARTICULAR PURPOSE.
12
+ #
13
+ ##############################################################################
14
+
15
+ import unittest
16
+
17
+
18
+ class TestMultiMapping(unittest.TestCase):
19
+
20
+ def _getTargetClass(self):
21
+ from MultiMapping import MultiMapping
22
+ return MultiMapping
23
+
24
+ def _makeOne(self):
25
+ return self._getTargetClass()()
26
+
27
+ def test_push(self):
28
+ m = self._makeOne()
29
+ m.push({'spam': 1, 'eggs': 2})
30
+ self.assertEqual(m['spam'], 1)
31
+ self.assertEqual(m['eggs'], 2)
32
+
33
+ def test_push_multiple(self):
34
+ m = self._makeOne()
35
+ m.push({'spam': 1, 'eggs': 2})
36
+ m.push({'spam': 3})
37
+ self.assertEqual(m['spam'], 3)
38
+ self.assertEqual(m['eggs'], 2)
39
+
40
+ def test_pop(self):
41
+ m = self._makeOne()
42
+ m.push({'spam': 1, 'eggs': 2})
43
+ m.push({'spam': 3})
44
+ self.assertEqual(m.pop(), {'spam': 3})
45
+ self.assertEqual(m.pop(), {'spam': 1, 'eggs': 2})
46
+ self.assertRaises(IndexError, m.pop)
47
+
48
+ def test_getitem_not_found(self):
49
+ m = self._makeOne()
50
+ self.assertRaises(KeyError, m.__getitem__, 'ham')
51
+
52
+ def test_get(self):
53
+ m = self._makeOne()
54
+ m.push({'spam': 1})
55
+ self.assertEqual(m.get('spam'), 1)
56
+ self.assertEqual(m.get('eggs'), None)
57
+
58
+ def test_contains(self):
59
+ m = self._makeOne()
60
+ m.push({'spam': 1})
61
+ self.assertIn('spam', m)
62
+ self.assertNotIn('eggs', m)
63
+
64
+ def test_has_key(self):
65
+ m = self._makeOne()
66
+ m.push({'spam': 1})
67
+ self.assertTrue(m.has_key('spam')) # NOQA
68
+ self.assertFalse(m.has_key('eggs')) # NOQA
69
+
70
+ def test_len(self):
71
+ m = self._makeOne()
72
+ m.push({'spam': 1})
73
+ self.assertEqual(len(m), 1)
74
+
75
+ def test_is_extension_class(self):
76
+ from ExtensionClass import Base
77
+ self.assertIsInstance(self._makeOne(), Base)
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: MultiMapping
3
+ Version: 5.1
4
+ Summary: Special MultiMapping objects used in Zope.
5
+ Author-email: Zope Foundation and contributors <zope-dev@zope.dev>
6
+ Maintainer-email: Plone Foundation and contributors <zope-dev@zope.dev>
7
+ License: ZPL-2.1
8
+ Project-URL: Source, https://github.com/zopefoundation/MultiMapping
9
+ Project-URL: Issues, https://github.com/zopefoundation/MultiMapping/issues
10
+ Project-URL: Changelog, https://github.com/zopefoundation/MultiMapping/blob/master/CHANGES.txt
11
+ Classifier: Development Status :: 6 - Mature
12
+ Classifier: Environment :: Web Environment
13
+ Classifier: Framework :: Zope :: 5
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: Implementation :: CPython
23
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/x-rst
26
+ License-File: LICENSE.txt
27
+ Requires-Dist: ExtensionClass
28
+ Dynamic: license-file
29
+
30
+ Overview
31
+ ========
32
+
33
+ MultiMapping provides special objects used in some Zope internals like ZRDB.
34
+
35
+ Changelog
36
+ =========
37
+
38
+ 5.1 (2026-01-23)
39
+ ----------------
40
+
41
+ - Move package metadata from setup.py to pyproject.toml.
42
+
43
+ - Add support for Python 3.12, 3.13, 3.14.
44
+
45
+ - Drop support for Python 3.7, 3.8, 3.9.
46
+
47
+
48
+ 5.0 (2023-02-09)
49
+ ----------------
50
+
51
+ - Drop support for Python 2.7, 3.4, 3.5, 3.6.
52
+
53
+ - Add support for Python 3.8, 3.9, 3.10, 3.11.
54
+
55
+
56
+ 4.1 (2018-10-05)
57
+ ----------------
58
+
59
+ - Add support for Python 3.7.
60
+
61
+ 4.0 (2017-05-17)
62
+ ----------------
63
+
64
+ - Add `__contains__` support.
65
+
66
+ - Remove the Python 2-only C extension.
67
+
68
+ 3.1 (2017-04-26)
69
+ ----------------
70
+
71
+ - Add support for Python 3.6, drop support for Python 2.6.
72
+
73
+ 3.0 (2016-04-03)
74
+ ----------------
75
+
76
+ - Update compatibility to Python 3.4/3.5.
77
+
78
+ - Add a pure-Python implementation used for Python 3 and Pypy.
79
+
80
+ - Rewrote tests as unit tests.
81
+
82
+ 2.13.0 (2010-03-30)
83
+ -------------------
84
+
85
+ - Released as separate package.
@@ -0,0 +1,19 @@
1
+ .pre-commit-config.yaml
2
+ CHANGES.rst
3
+ CONTRIBUTING.md
4
+ COPYRIGHT.txt
5
+ LICENSE.txt
6
+ MANIFEST.in
7
+ README.rst
8
+ buildout.cfg
9
+ pyproject.toml
10
+ setup.cfg
11
+ setup.py
12
+ tox.ini
13
+ src/MultiMapping/__init__.py
14
+ src/MultiMapping/tests.py
15
+ src/MultiMapping.egg-info/PKG-INFO
16
+ src/MultiMapping.egg-info/SOURCES.txt
17
+ src/MultiMapping.egg-info/dependency_links.txt
18
+ src/MultiMapping.egg-info/requires.txt
19
+ src/MultiMapping.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ ExtensionClass
@@ -0,0 +1 @@
1
+ MultiMapping
@@ -0,0 +1,74 @@
1
+ # Generated with zope.meta (https://zopemeta.readthedocs.io/) from:
2
+ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/pure-python
3
+ [tox]
4
+ minversion = 3.18
5
+ envlist =
6
+ release-check
7
+ lint
8
+ py310
9
+ py311
10
+ py312
11
+ py313
12
+ py314
13
+ pypy3
14
+ coverage
15
+
16
+ [testenv]
17
+ usedevelop = true
18
+ package = wheel
19
+ wheel_build_env = .pkg
20
+ deps =
21
+ setuptools >= 78.1.1,< 81
22
+ zope.testrunner
23
+ commands =
24
+ zope-testrunner --test-path=src {posargs:-vc}
25
+ extras =
26
+ test
27
+
28
+ [testenv:setuptools-latest]
29
+ basepython = python3
30
+ deps =
31
+ git+https://github.com/pypa/setuptools.git\#egg=setuptools
32
+ zope.testrunner
33
+
34
+ [testenv:release-check]
35
+ description = ensure that the distribution is ready to release
36
+ basepython = python3
37
+ skip_install = true
38
+ deps =
39
+ setuptools >= 78.1.1,< 81
40
+ wheel
41
+ twine
42
+ build
43
+ check-manifest
44
+ check-python-versions >= 0.20.0
45
+ wheel
46
+ commands_pre =
47
+ commands =
48
+ check-manifest
49
+ check-python-versions --only pyproject.toml,setup.py,tox.ini,.github/workflows/tests.yml
50
+ python -m build --sdist --no-isolation
51
+ twine check dist/*
52
+
53
+ [testenv:lint]
54
+ description = This env runs all linters configured in .pre-commit-config.yaml
55
+ basepython = python3
56
+ skip_install = true
57
+ deps =
58
+ pre-commit
59
+ commands_pre =
60
+ commands =
61
+ pre-commit run --all-files --show-diff-on-failure
62
+
63
+ [testenv:coverage]
64
+ basepython = python3
65
+ allowlist_externals =
66
+ mkdir
67
+ deps =
68
+ coverage[toml]
69
+ zope.testrunner
70
+ commands =
71
+ mkdir -p {toxinidir}/parts/htmlcov
72
+ coverage run -m zope.testrunner --test-path=src {posargs:-vc}
73
+ coverage html
74
+ coverage report