Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate warning box in docs #8600

Closed
wants to merge 54 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2dd1af7
deprecate_arguments and deprecate_function: add a deprecation note box
1ucian0 Aug 28, 2022
c77d833
Merge branch 'main' into deprecate_docstrings
1ucian0 Sep 4, 2022
82a1111
linting
1ucian0 Sep 4, 2022
8efdcf6
testing
1ucian0 Sep 4, 2022
51e7e72
testing docstrings
1ucian0 Sep 4, 2022
18bd25d
deprecate parameter in the parameter description
1ucian0 Sep 5, 2022
f24b3ea
Merge branch 'main' into deprecate_docstrings
1ucian0 Sep 6, 2022
4fc029c
deprecate_arguments
1ucian0 Sep 6, 2022
da68919
implementing all the deprecate_function
1ucian0 Sep 7, 2022
071fa5d
ups. testing
1ucian0 Sep 7, 2022
397e336
implement deprecate_arguments around
1ucian0 Sep 7, 2022
b873393
conflict and in-place
1ucian0 Sep 8, 2022
fbc2d74
ref to pep-0257
1ucian0 Sep 8, 2022
def73fc
deprecation message on top of Args
1ucian0 Sep 8, 2022
91c821d
avoiding being ate by Lev
1ucian0 Sep 8, 2022
c01fa65
Merge branch 'main' of github.com:Qiskit/qiskit-terra into deprecate_…
1ucian0 Sep 22, 2022
e5a22bc
docstring
1ucian0 Sep 22, 2022
ab7277a
docstring
1ucian0 Sep 22, 2022
e5feaf8
split tests
1ucian0 Sep 22, 2022
25c3a1e
Merge branch 'main' of github.com:Qiskit/qiskit-terra into deprecate_…
1ucian0 Sep 28, 2022
427a334
raise warning instead of exception
1ucian0 Sep 28, 2022
e67ce35
conflict solving
1ucian0 Oct 24, 2022
c9d4e38
lint
1ucian0 Oct 25, 2022
a7f0e0b
base_estimator
1ucian0 Oct 25, 2022
d48ef7c
Merge branch 'main' of github.com:Qiskit/qiskit-terra into deprecate_…
1ucian0 Oct 25, 2022
bdf623e
more merging conflicts
1ucian0 Oct 25, 2022
82b9cc2
turn into exception
1ucian0 Oct 25, 2022
b32cfc5
back to warning
1ucian0 Oct 25, 2022
033f49f
warnings.filterwarnings()
1ucian0 Oct 25, 2022
1f047e2
stacklevel=4
1ucian0 Oct 26, 2022
6a5b710
skip warning when a parameter is qobj
1ucian0 Oct 26, 2022
c7235cc
back to error
1ucian0 Oct 26, 2022
5baedd0
Merge branch 'main' of github.com:Qiskit/qiskit-terra into deprecate_…
1ucian0 Oct 26, 2022
25d1660
conf.py
1ucian0 Oct 26, 2022
39f28d2
adapt message
1ucian0 Oct 26, 2022
453cdfc
back to warning, to avoid braking integration tests
1ucian0 Oct 26, 2022
30175a1
Merge branch 'main' into deprecate_docstrings
1ucian0 Oct 31, 2022
624123b
Merge branch 'main' into deprecate_docstrings
1ucian0 Nov 12, 2022
3bb43f1
using regex
1ucian0 Nov 12, 2022
f4f54c8
fixing test
1ucian0 Nov 12, 2022
8f601ad
multi lines and empty
1ucian0 Nov 12, 2022
77c5c2f
type doc support
1ucian0 Nov 12, 2022
e73ae49
Merge branch 'main' into deprecate_docstrings
1ucian0 Nov 23, 2022
80f3def
Merge branch 'main' into deprecate_docstrings
1ucian0 Nov 30, 2022
172eef9
Merge branch 'main' into deprecate_docstrings
1ucian0 Jan 5, 2023
5503b05
Merge branch 'main' into deprecate_docstrings
1ucian0 Jan 9, 2023
44f3183
Merge branch 'main' into deprecate_docstrings
1ucian0 Jan 11, 2023
b98ebab
conflict solving
1ucian0 Jan 24, 2023
82aaba9
DeprecationWarning to PendingDeprecationWarning
1ucian0 Jan 24, 2023
97472d3
DeprecationWarning to PendingDeprecationWarning
1ucian0 Jan 25, 2023
3f005c8
Merge branch 'main' into deprecate_docstrings
1ucian0 Jan 25, 2023
5e8298f
DeprecationWarning to PendingDeprecationWarning
1ucian0 Jan 25, 2023
c94339c
Merge branch 'deprecate_docstrings' of github.com:1ucian0/qiskit-terr…
1ucian0 Jan 25, 2023
1fb35ec
DeprecationWarning to PendingDeprecationWarning
1ucian0 Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
split tests
1ucian0 committed Sep 22, 2022
commit e5feaf8552042b1853e696b3c8adc54ebbaec71f
14 changes: 9 additions & 5 deletions test/python/utils/test_deprecation.py
Original file line number Diff line number Diff line change
@@ -73,8 +73,8 @@ def bar_with_deprecated_arg(
return None


class TestDeprecation(QiskitTestCase):
"""Test deprecation decorators."""
class TestDeprecationRaise(QiskitTestCase):
"""Test deprecation decorators raise warning."""

def assertDeprecationWarning(self, warn, expected_msg):
"""Checks there only one exception and `expected_msg` is the message"""
@@ -107,7 +107,11 @@ def test_raise_deprecate_arguments(self):
)
self.assertEqual(output, 1)

def test_docstring_deprecate_function(self):

class TestDeprecationDocstring(QiskitTestCase):
"""Test deprecation decorators docstring modification for DummyClass."""

def test_dummyclass_deprecate_function(self):
"""Test deprecate_function docstring."""

dummy = DummyClass()
@@ -131,8 +135,8 @@ def test_docstring_deprecate_function(self):
"""
self.assertEqual(deprecated_docstring, expected)

def test_docstring_deprecate_arguments(self):
"""Test deprecate_arguments docstring."""
def test_dummayclass_deprecate_arguments(self):
"""Test deprecate_arguments docstring for DummyClass."""

dummy = DummyClass()
deprecated_docstring = dummy.bar_with_deprecated_arg.__doc__