forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
qiskit.utils.wrap_method
for Python 3.11 (Qiskit#9310)
* Revert "[Test] Pin maximum python version in CI to <3.11.1 (Qiskit#9296)" This reverts commit 07e0a2f. * Do not treat __init_subclass__ as a special type method * Release note * Apply suggestions from code review Co-authored-by: Julien Gacon <[email protected]> * Use inspect.getattr_static to bypass descriptor call * Update release note * Update wrap_method test * Adjust wording on release note Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
95aacfc
commit 00b3442
Showing
4 changed files
with
18 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed handling of some ``classmethod``s by | ||
:func:`~qiskit.utils.wrap_method` in Python 3.11. Previously, in Python | ||
3.11, ``wrap_method`` would wrap the unbounded function associated with the | ||
``classmethod`` and then fail when invoked because the class object usually | ||
bound to the ``classmethod`` was not passed to the function. Starting in | ||
Python 3.11.1, this issue affected :class:`~qiskit.test.QiskitTestCase`, | ||
preventing it from being imported by other test code. Fixed `#9291 | ||
<https://github.com/Qiskit/qiskit-terra/issues/9291>`__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters