oop-ext 2.4.0__tar.gz → 2.4.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.
Files changed (84) hide show
  1. {oop_ext-2.4.0 → oop_ext-2.4.1}/.github/workflows/deploy.yml +12 -0
  2. {oop_ext-2.4.0 → oop_ext-2.4.1}/CHANGELOG.rst +7 -0
  3. {oop_ext-2.4.0 → oop_ext-2.4.1}/PKG-INFO +6 -9
  4. {oop_ext-2.4.0 → oop_ext-2.4.1}/README.rst +1 -11
  5. oop_ext-2.4.1/RELEASING.rst +62 -0
  6. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/interface/_interface.py +4 -0
  7. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/interface/_tests/test_interface.py +20 -0
  8. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/PKG-INFO +6 -9
  9. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/SOURCES.txt +1 -0
  10. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/scm_file_list.json +1 -0
  11. {oop_ext-2.4.0 → oop_ext-2.4.1}/.codecov.yml +0 -0
  12. {oop_ext-2.4.0 → oop_ext-2.4.1}/.editorconfig +0 -0
  13. {oop_ext-2.4.0 → oop_ext-2.4.1}/.gitattributes +0 -0
  14. {oop_ext-2.4.0 → oop_ext-2.4.1}/.github/dependabot.yml +0 -0
  15. {oop_ext-2.4.0 → oop_ext-2.4.1}/.github/workflows/test.yml +0 -0
  16. {oop_ext-2.4.0 → oop_ext-2.4.1}/.gitignore +0 -0
  17. {oop_ext-2.4.0 → oop_ext-2.4.1}/.isort.cfg +0 -0
  18. {oop_ext-2.4.0 → oop_ext-2.4.1}/.pre-commit-config.yaml +0 -0
  19. {oop_ext-2.4.0 → oop_ext-2.4.1}/.project +0 -0
  20. {oop_ext-2.4.0 → oop_ext-2.4.1}/.pydevproject +0 -0
  21. {oop_ext-2.4.0 → oop_ext-2.4.1}/.readthedocs.yml +0 -0
  22. {oop_ext-2.4.0 → oop_ext-2.4.1}/CONTRIBUTING.rst +0 -0
  23. {oop_ext-2.4.0 → oop_ext-2.4.1}/LICENSE +0 -0
  24. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/api.rst +0 -0
  25. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/callbacks.rst +0 -0
  26. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/changelog.rst +0 -0
  27. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/conf.py +0 -0
  28. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/contributing.rst +0 -0
  29. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/img/logo.png +0 -0
  30. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/index.rst +0 -0
  31. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/installation.rst +0 -0
  32. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/interfaces.rst +0 -0
  33. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/readme.rst +0 -0
  34. {oop_ext-2.4.0 → oop_ext-2.4.1}/docs/requirements.txt +0 -0
  35. {oop_ext-2.4.0 → oop_ext-2.4.1}/environment.devenv.yml +0 -0
  36. {oop_ext-2.4.0 → oop_ext-2.4.1}/mypy.ini +0 -0
  37. {oop_ext-2.4.0 → oop_ext-2.4.1}/pyproject.toml +0 -0
  38. {oop_ext-2.4.0 → oop_ext-2.4.1}/setup.cfg +0 -0
  39. {oop_ext-2.4.0 → oop_ext-2.4.1}/setup.py +0 -0
  40. {oop_ext-2.4.0 → oop_ext-2.4.1}/sonar-project.properties +0 -0
  41. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/__init__.py +0 -0
  42. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/_type_checker_fixture.py +0 -0
  43. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/conftest.py +0 -0
  44. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/__init__.py +0 -0
  45. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/__init__.py +0 -0
  46. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_cached_method.py +0 -0
  47. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_decorators.py +0 -0
  48. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_immutable.py +0 -0
  49. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_is_frozen.py +0 -0
  50. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_odict.py +0 -0
  51. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_singleton.py +0 -0
  52. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_types.py +0 -0
  53. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/_tests/test_weak_ref.py +0 -0
  54. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/cached_method.py +0 -0
  55. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/__init__.py +0 -0
  56. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_callback.py +0 -0
  57. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_callbacks.py +0 -0
  58. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_priority_callback.py +0 -0
  59. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_shortcuts.py +0 -0
  60. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_tests/__init__.py +0 -0
  61. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_tests/test_callback.py +0 -0
  62. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_tests/test_priority_callback.py +0 -0
  63. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_tests/test_single_call_callback.py +0 -0
  64. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_tests/test_typed_callback.py +0 -0
  65. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/_typed_callback.py +0 -0
  66. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/callback/single_call_callback.py +0 -0
  67. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/compat.py +0 -0
  68. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/decorators.py +0 -0
  69. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/exceptions.py +0 -0
  70. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/immutable.py +0 -0
  71. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/is_frozen.py +0 -0
  72. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/odict.py +0 -0
  73. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/singleton.py +0 -0
  74. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/types_.py +0 -0
  75. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/foundation/weak_ref.py +0 -0
  76. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/interface/__init__.py +0 -0
  77. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/interface/_adaptable_interface.py +0 -0
  78. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/interface/_tests/__init__.py +0 -0
  79. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext/py.typed +0 -0
  80. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/dependency_links.txt +0 -0
  81. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/not-zip-safe +0 -0
  82. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/requires.txt +0 -0
  83. {oop_ext-2.4.0 → oop_ext-2.4.1}/src/oop_ext.egg-info/top_level.txt +0 -0
  84. {oop_ext-2.4.0 → oop_ext-2.4.1}/tox.ini +0 -0
@@ -35,6 +35,7 @@ jobs:
35
35
  permissions:
36
36
  id-token: write # For PyPI trusted publishers.
37
37
  contents: write # For tag and release notes.
38
+ pull-requests: write # For merging the release PR.
38
39
 
39
40
  steps:
40
41
  - uses: actions/checkout@v7
@@ -56,3 +57,14 @@ jobs:
56
57
  files: dist/*
57
58
  tag_name: v${{ github.event.inputs.version }}
58
59
  target_commitish: ${{ github.sha }}
60
+
61
+ - name: Merge Release PR
62
+ if: startsWith(github.ref_name, 'release-')
63
+ env:
64
+ GH_TOKEN: ${{ github.token }}
65
+ # Only merges if the PR head is still the commit that was just released.
66
+ run: >-
67
+ gh pr merge ${{ github.ref_name }}
68
+ --repo ${{ github.repository }}
69
+ --merge
70
+ --match-head-commit ${{ github.sha }}
@@ -1,3 +1,10 @@
1
+ 2.4.1
2
+ -----
3
+
4
+ **Release**: 2026-11-30
5
+
6
+ * Fixed interfaces with class-level annotations requiring implementations to have an ``__annotate_func__`` method on Python 3.14+.
7
+
1
8
  2.4.0
2
9
  -----
3
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oop-ext
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: OOP Extensions is a set of utilities for object oriented programming not found on Python's standard library.
5
5
  Home-page: http://github.com/ESSS/oop-ext
6
6
  Author: ESSS
@@ -166,19 +166,16 @@ contribution to oop_ext, see the `contributing guidelines`_.
166
166
 
167
167
  Release
168
168
  -------
169
- A reminder for the maintainers on how to make a new release.
170
169
 
171
- Note that the VERSION should follow the semantic versioning as ``X.Y.Z`` (e.g. ``v1.0.5``).
170
+ See the `release instructions <https://github.com/ESSS/oop-ext/blob/master/RELEASING.rst>`__.
172
171
 
173
- 1. Create a ``release-VERSION`` branch from ``upstream/master``.
174
- 2. Update ``CHANGELOG.rst``.
175
- 3. Push the branch to ``upstream``.
176
- 4. Once all tests pass, start the ``deploy`` workflow manually or via::
177
172
 
178
- gh workflow run deploy.yml --repo ESSS/oop-ext --ref release-VERSION -f version=VERSION
173
+ 2.4.1
174
+ -----
179
175
 
180
- 5. Merge the PR.
176
+ **Release**: 2026-11-30
181
177
 
178
+ * Fixed interfaces with class-level annotations requiring implementations to have an ``__annotate_func__`` method on Python 3.14+.
182
179
 
183
180
  2.4.0
184
181
  -----
@@ -119,15 +119,5 @@ contribution to oop_ext, see the `contributing guidelines`_.
119
119
 
120
120
  Release
121
121
  -------
122
- A reminder for the maintainers on how to make a new release.
123
122
 
124
- Note that the VERSION should follow the semantic versioning as ``X.Y.Z`` (e.g. ``v1.0.5``).
125
-
126
- 1. Create a ``release-VERSION`` branch from ``upstream/master``.
127
- 2. Update ``CHANGELOG.rst``.
128
- 3. Push the branch to ``upstream``.
129
- 4. Once all tests pass, start the ``deploy`` workflow manually or via::
130
-
131
- gh workflow run deploy.yml --repo ESSS/oop-ext --ref release-VERSION -f version=VERSION
132
-
133
- 5. Merge the PR.
123
+ See the `release instructions <https://github.com/ESSS/oop-ext/blob/master/RELEASING.rst>`__.
@@ -0,0 +1,62 @@
1
+ =========
2
+ Releasing
3
+ =========
4
+
5
+ A reminder for the maintainers on how to make a new release.
6
+
7
+ Releases are published by the ``deploy`` workflow, which builds the package, uploads it to
8
+ `PyPI <https://pypi.org/project/oop-ext/>`__, creates the ``vVERSION`` tag and GitHub release, and
9
+ finally merges the release PR.
10
+
11
+ Choosing the version
12
+ --------------------
13
+
14
+ ``VERSION`` follows `semantic versioning <https://semver.org>`__ as ``X.Y.Z`` (e.g. ``2.4.0``),
15
+ without the ``v`` prefix used by the tags:
16
+
17
+ * **Patch** (``Z``): bug fixes only.
18
+ * **Minor** (``Y``): new features, or dropping support for a Python version.
19
+ * **Major** (``X``): breaking API changes.
20
+
21
+ Steps
22
+ -----
23
+
24
+ 1. Create a ``release-VERSION`` branch from an up-to-date ``master``. The ``release-`` prefix is
25
+ required: it is how the ``deploy`` workflow finds the PR to merge.
26
+
27
+ 2. In ``CHANGELOG.rst``, rename the ``UNRELEASED`` section to the version and add the release
28
+ date, keeping the title underline as long as the title:
29
+
30
+ .. code-block:: rst
31
+
32
+ 2.4.0
33
+ -----
34
+
35
+ **Release**: 2026-11-30
36
+
37
+ 3. Commit as ``Release VERSION``, push the branch, and open a PR against ``master``.
38
+
39
+ 4. Get the PR **approved** and wait for all checks to pass. ``master`` requires an approving
40
+ review, and the ``deploy`` workflow cannot merge the PR without it.
41
+
42
+ 5. Start the ``deploy`` workflow from the release branch, manually or via::
43
+
44
+ gh workflow run deploy.yml --repo ESSS/oop-ext --ref release-VERSION -f version=VERSION
45
+
46
+ This cannot be undone: PyPI never accepts the same version twice, even after deleting it.
47
+ The tag and release point at the head of the release branch, and the PR is merged only if
48
+ its head is still that same commit, so do not push to the branch while the workflow runs.
49
+
50
+ 6. Check the result::
51
+
52
+ gh run watch --repo ESSS/oop-ext --exit-status
53
+ gh release view vVERSION --repo ESSS/oop-ext
54
+
55
+ PyPI should list the new version, and the GitHub release should have the wheel, the source
56
+ archive and their attestations attached.
57
+
58
+ If only the final merge step failed (e.g. the PR was not approved), the release itself is
59
+ already published: just merge the PR by hand.
60
+
61
+ 7. Update the ``oop-ext`` requirement in downstream projects (e.g. ``barril``) if they need
62
+ anything from the new release.
@@ -633,6 +633,8 @@ class CacheInterfaceAttrs:
633
633
  INTERFACE_OWN_METHODS = {
634
634
  i for i in dir(Interface) if inspect.isfunction(getattr(Interface, i))
635
635
  }
636
+ # Generated by Python 3.14+ in classes with annotations (PEP 649), not interface methods.
637
+ PYTHON_GENERATED_ATTRS = {"__annotate__", "__annotate_func__"}
636
638
  FUTURE_OBJECT_ATTRS = (
637
639
  "next",
638
640
  "__long__",
@@ -682,6 +684,8 @@ class CacheInterfaceAttrs:
682
684
  # functions like `__new__`, which are part of `Interface` class implementation and not part
683
685
  # expected interface.
684
686
  for attr in all_attrs:
687
+ if attr in self.PYTHON_GENERATED_ATTRS:
688
+ continue
685
689
  # If name inherited from `Interface`, check if isn't in list of reserved names
686
690
  if attr not in interface_vars:
687
691
  if attr in self.INTERFACE_OWN_METHODS:
@@ -1100,3 +1100,23 @@ def testInterfaceCachesDoNotKeepClassesAlive() -> None:
1100
1100
  gc.collect()
1101
1101
  assert class_ref() is None
1102
1102
  assert payload_ref() is None
1103
+
1104
+
1105
+ def testInterfaceWithAnnotations() -> None:
1106
+ """
1107
+ Python 3.14 generates an `__annotate_func__` function in classes with annotations, which
1108
+ must not be required from implementations.
1109
+ """
1110
+
1111
+ class IFoo(interface.Interface):
1112
+ x: int
1113
+
1114
+ def Foo(self) -> None:
1115
+ """"""
1116
+
1117
+ @ImplementsInterface(IFoo)
1118
+ class Foo:
1119
+ def Foo(self) -> None:
1120
+ pass
1121
+
1122
+ assert IsImplementation(Foo, IFoo)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oop-ext
3
- Version: 2.4.0
3
+ Version: 2.4.1
4
4
  Summary: OOP Extensions is a set of utilities for object oriented programming not found on Python's standard library.
5
5
  Home-page: http://github.com/ESSS/oop-ext
6
6
  Author: ESSS
@@ -166,19 +166,16 @@ contribution to oop_ext, see the `contributing guidelines`_.
166
166
 
167
167
  Release
168
168
  -------
169
- A reminder for the maintainers on how to make a new release.
170
169
 
171
- Note that the VERSION should follow the semantic versioning as ``X.Y.Z`` (e.g. ``v1.0.5``).
170
+ See the `release instructions <https://github.com/ESSS/oop-ext/blob/master/RELEASING.rst>`__.
172
171
 
173
- 1. Create a ``release-VERSION`` branch from ``upstream/master``.
174
- 2. Update ``CHANGELOG.rst``.
175
- 3. Push the branch to ``upstream``.
176
- 4. Once all tests pass, start the ``deploy`` workflow manually or via::
177
172
 
178
- gh workflow run deploy.yml --repo ESSS/oop-ext --ref release-VERSION -f version=VERSION
173
+ 2.4.1
174
+ -----
179
175
 
180
- 5. Merge the PR.
176
+ **Release**: 2026-11-30
181
177
 
178
+ * Fixed interfaces with class-level annotations requiring implementations to have an ``__annotate_func__`` method on Python 3.14+.
182
179
 
183
180
  2.4.0
184
181
  -----
@@ -11,6 +11,7 @@ CHANGELOG.rst
11
11
  CONTRIBUTING.rst
12
12
  LICENSE
13
13
  README.rst
14
+ RELEASING.rst
14
15
  environment.devenv.yml
15
16
  mypy.ini
16
17
  pyproject.toml
@@ -16,6 +16,7 @@
16
16
  "CONTRIBUTING.rst",
17
17
  "LICENSE",
18
18
  "README.rst",
19
+ "RELEASING.rst",
19
20
  "docs/api.rst",
20
21
  "docs/callbacks.rst",
21
22
  "docs/changelog.rst",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes