Skip to content

Commit e61f47a

Browse files
charlesdong1991jreback
authored andcommitted
CI: Fix jedi upgrades causes deprecation warning (pandas-dev#31323)
1 parent ca3bfcc commit e61f47a

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

pandas/tests/arrays/categorical/test_warnings.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ async def test_tab_complete_warning(self, ip):
1414

1515
code = "import pandas as pd; c = Categorical([])"
1616
await ip.run_code(code)
17-
with tm.assert_produces_warning(None):
17+
18+
# GH 31324 newer jedi version raises Deprecation warning
19+
import jedi
20+
21+
if jedi.__version__ < "0.16.0":
22+
warning = tm.assert_produces_warning(None)
23+
else:
24+
warning = tm.assert_produces_warning(
25+
DeprecationWarning, check_stacklevel=False
26+
)
27+
with warning:
1828
with provisionalcompleter("ignore"):
1929
list(ip.Completer.completions("c.", 1))

pandas/tests/indexes/test_base.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,17 @@ async def test_tab_complete_warning(self, ip):
24132413

24142414
code = "import pandas as pd; idx = pd.Index([1, 2])"
24152415
await ip.run_code(code)
2416-
with tm.assert_produces_warning(None):
2416+
2417+
# GH 31324 newer jedi version raises Deprecation warning
2418+
import jedi
2419+
2420+
if jedi.__version__ < "0.16.0":
2421+
warning = tm.assert_produces_warning(None)
2422+
else:
2423+
warning = tm.assert_produces_warning(
2424+
DeprecationWarning, check_stacklevel=False
2425+
)
2426+
with warning:
24172427
with provisionalcompleter("ignore"):
24182428
list(ip.Completer.completions("idx.", 4))
24192429

0 commit comments

Comments
 (0)