pure-interface 8.3.0__tar.gz → 8.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {pure_interface-8.3.0 → pure_interface-8.4.0}/PKG-INFO +1 -1
  2. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/__init__.py +1 -1
  3. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/interface.py +2 -0
  4. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface.egg-info/PKG-INFO +1 -1
  5. {pure_interface-8.3.0 → pure_interface-8.4.0}/pyproject.toml +2 -2
  6. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_no_content_checks.py +6 -0
  7. {pure_interface-8.3.0 → pure_interface-8.4.0}/LICENSE +0 -0
  8. {pure_interface-8.3.0 → pure_interface-8.4.0}/README.rst +0 -0
  9. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/_sub_interface.py +0 -0
  10. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/adaption.py +0 -0
  11. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/delegation.py +0 -0
  12. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/errors.py +0 -0
  13. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/mypy_plugin.py +0 -0
  14. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface/py.typed +0 -0
  15. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface.egg-info/SOURCES.txt +0 -0
  16. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface.egg-info/dependency_links.txt +0 -0
  17. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface.egg-info/requires.txt +0 -0
  18. {pure_interface-8.3.0 → pure_interface-8.4.0}/pure_interface.egg-info/top_level.txt +0 -0
  19. {pure_interface-8.3.0 → pure_interface-8.4.0}/setup.cfg +0 -0
  20. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_adapt_args_anno.py +0 -0
  21. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_adapt_args_no_anno.py +0 -0
  22. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_adapt_call.py +0 -0
  23. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_adaption.py +0 -0
  24. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_dataclass_support.py +0 -0
  25. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_delegate.py +0 -0
  26. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_func_sigs3.py +0 -0
  27. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_func_sigs_po.py +0 -0
  28. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_function_sigs.py +0 -0
  29. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_generic_support.py +0 -0
  30. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_implementation_checks.py +0 -0
  31. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_inheritance.py +0 -0
  32. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_isinstance.py +0 -0
  33. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_meta_classes.py +0 -0
  34. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_module_funcs.py +0 -0
  35. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_singledispatch.py +0 -0
  36. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_sub_interfaces.py +0 -0
  37. {pure_interface-8.3.0 → pure_interface-8.4.0}/tests/test_tracker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pure-interface
3
- Version: 8.3.0
3
+ Version: 8.4.0
4
4
  Summary: A Python interface library that disallows function body content on interfaces and supports adaption.
5
5
  Author-email: Tim Mitchell <tim.mitchell@seequent.com>
6
6
  License-Expression: MIT
@@ -19,4 +19,4 @@ from .interface import (
19
19
  type_is_interface,
20
20
  )
21
21
 
22
- __version__ = "8.3.0" # Don't change this manually - run `bump-my-version bump [major|minor|patch]` instead
22
+ __version__ = "8.4.0" # Don't change this manually - run `bump-my-version bump [major|minor|patch]` instead
@@ -168,6 +168,8 @@ def _type_is_interface(cls: type) -> bool:
168
168
  """Return True if cls is a pure interface or an empty ABC class"""
169
169
  if cls is object:
170
170
  return False
171
+ if cls.__module__ == "collections.abc":
172
+ return True
171
173
  if hasattr(cls, "_pi"):
172
174
  return cls._pi.type_is_interface
173
175
  if cls is Generic:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pure-interface
3
- Version: 8.3.0
3
+ Version: 8.4.0
4
4
  Summary: A Python interface library that disallows function body content on interfaces and supports adaption.
5
5
  Author-email: Tim Mitchell <tim.mitchell@seequent.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pure-interface"
3
- version = "8.3.0"
3
+ version = "8.4.0"
4
4
  description = "A Python interface library that disallows function body content on interfaces and supports adaption."
5
5
  keywords = ["interface", "protocol", "adaption", "structural", "dataclass"]
6
6
  authors = [
@@ -43,7 +43,7 @@ line-length = 120
43
43
  profile = "black"
44
44
 
45
45
  [tool.bumpversion]
46
- current_version = "8.3.0"
46
+ current_version = "8.4.0"
47
47
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
48
48
  serialize = ["{major}.{minor}.{patch}"]
49
49
  search = "{current_version}"
@@ -3,6 +3,7 @@
3
3
  # --------------------------------------------------------------------------------------------
4
4
 
5
5
  import abc
6
+ import collections.abc
6
7
  import unittest
7
8
 
8
9
  import pure_interface
@@ -106,3 +107,8 @@ class TestNoContentChecks(unittest.TestCase):
106
107
  @property
107
108
  def height(self):
108
109
  return self
110
+
111
+ def test_std_lib_abc_passes(self):
112
+
113
+ class ITest(collections.abc.Sized, pure_interface.Interface):
114
+ pass
File without changes
File without changes