Skip to content

Commit 8af5625

Browse files
CI: Fix jedi deprecation warning for 0.17.0 on IPython (#33566)
* remove \n from docstring * fix issue 17038 * revert change * revert change * fix jedi ci * linting and add gh
1 parent 114e33a commit 8af5625

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

pandas/tests/frame/test_api.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,18 @@ async def test_tab_complete_warning(self, ip):
529529

530530
code = "import pandas as pd; df = pd.DataFrame()"
531531
await ip.run_code(code)
532-
with tm.assert_produces_warning(None):
532+
533+
# TODO: remove it when Ipython updates
534+
# GH 33567, jedi version raises Deprecation warning in Ipython
535+
import jedi
536+
537+
if jedi.__version__ < "0.17.0":
538+
warning = tm.assert_produces_warning(None)
539+
else:
540+
warning = tm.assert_produces_warning(
541+
DeprecationWarning, check_stacklevel=False
542+
)
543+
with warning:
533544
with provisionalcompleter("ignore"):
534545
list(ip.Completer.completions("df.", 1))
535546

pandas/tests/resample/test_resampler_grouper.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ async def test_tab_complete_ipython6_warning(ip):
2828
)
2929
await ip.run_code(code)
3030

31-
with tm.assert_produces_warning(None):
31+
# TODO: remove it when Ipython updates
32+
# GH 33567, jedi version raises Deprecation warning in Ipython
33+
import jedi
34+
35+
if jedi.__version__ < "0.17.0":
36+
warning = tm.assert_produces_warning(None)
37+
else:
38+
warning = tm.assert_produces_warning(DeprecationWarning, check_stacklevel=False)
39+
with warning:
3240
with provisionalcompleter("ignore"):
3341
list(ip.Completer.completions("rs.", 1))
3442

pandas/tests/series/test_api.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,18 @@ async def test_tab_complete_warning(self, ip):
491491

492492
code = "import pandas as pd; s = pd.Series()"
493493
await ip.run_code(code)
494-
with tm.assert_produces_warning(None):
494+
495+
# TODO: remove it when Ipython updates
496+
# GH 33567, jedi version raises Deprecation warning in Ipython
497+
import jedi
498+
499+
if jedi.__version__ < "0.17.0":
500+
warning = tm.assert_produces_warning(None)
501+
else:
502+
warning = tm.assert_produces_warning(
503+
DeprecationWarning, check_stacklevel=False
504+
)
505+
with warning:
495506
with provisionalcompleter("ignore"):
496507
list(ip.Completer.completions("s.", 1))
497508

0 commit comments

Comments
 (0)