From 8d104c2d8005261ea2addb318386052b55363f02 Mon Sep 17 00:00:00 2001 From: Marko Ristin-Kaufmann Date: Sat, 8 Nov 2025 10:28:15 +0100 Subject: [PATCH] Release 2.7.2 * Fix child invariants checked in ``super().__init__`` (#301) * Support Python 3.13 (#309) * Add support for Python 3.12 (#308) This is a critical bugfix patch version. Previously, we determined the invariants based on the ``self`` passed to the function. However, in case of ``super().__init__``, the invariants that need to be checked after the call are those belonging to to the super class, not the current (child) class. This lead to erroneous invariant checks, where the invariants of the child class where checked after the super-init call in the parent class. --- CHANGELOG.rst | 14 ++++++++++++++ icontract/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7fbe0f7..5d04878 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,17 @@ +2.7.2 +===== +* Fix child invariants checked in ``super().__init__`` (#301) +* Support Python 3.13 (#309) +* Add support for Python 3.12 (#308) + +This is a critical bugfix patch version. Previously, we determined +the invariants based on the ``self`` passed to the function. However, +in case of ``super().__init__``, the invariants that need to be checked +after the call are those belonging to to the super class, not +the current (child) class. This lead to erroneous invariant checks, where +the invariants of the child class where checked after the super-init call +in the parent class. + 2.7.1 ===== * Fixed invariants leak between related classes (#297) diff --git a/icontract/__init__.py b/icontract/__init__.py index df3194e..6d0e2da 100644 --- a/icontract/__init__.py +++ b/icontract/__init__.py @@ -8,7 +8,7 @@ # imports in setup.py. # Don't forget to update the version in __init__.py and CHANGELOG.rst! -__version__ = "2.7.1" +__version__ = "2.7.2" __author__ = "Marko Ristin" __copyright__ = "Copyright 2019 Parquery AG" __license__ = "MIT" diff --git a/setup.py b/setup.py index 0bb1525..c750d23 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="icontract", # Don't forget to update the version in __init__.py and CHANGELOG.rst! - version="2.7.1", + version="2.7.2", description="Provide design-by-contract with informative violation messages.", long_description=long_description, url="https://github.com/Parquery/icontract",