Skip to content

CI: Fix jedi deprecation warning for 0.17.0 on IPython #33566

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

Merged
merged 11 commits into from
Apr 15, 2020
13 changes: 12 additions & 1 deletion pandas/tests/frame/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,18 @@ async def test_tab_complete_warning(self, ip):

code = "import pandas as pd; df = pd.DataFrame()"
await ip.run_code(code)
with tm.assert_produces_warning(None):

# TODO: remove it when Ipython updates
# GH 33567, jedi version raises Deprecation warning in Ipython
import jedi

if jedi.__version__ < "0.17.0":
warning = tm.assert_produces_warning(None)
else:
warning = tm.assert_produces_warning(
DeprecationWarning, check_stacklevel=False
)
with warning:
with provisionalcompleter("ignore"):
list(ip.Completer.completions("df.", 1))

Expand Down
10 changes: 9 additions & 1 deletion pandas/tests/resample/test_resampler_grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ async def test_tab_complete_ipython6_warning(ip):
)
await ip.run_code(code)

with tm.assert_produces_warning(None):
# TODO: remove it when Ipython updates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the GH ref here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, added!

# GH 33567, jedi version raises Deprecation warning in Ipython
import jedi

if jedi.__version__ < "0.17.0":
warning = tm.assert_produces_warning(None)
else:
warning = tm.assert_produces_warning(DeprecationWarning, check_stacklevel=False)
with warning:
with provisionalcompleter("ignore"):
list(ip.Completer.completions("rs.", 1))

Expand Down
13 changes: 12 additions & 1 deletion pandas/tests/series/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,18 @@ async def test_tab_complete_warning(self, ip):

code = "import pandas as pd; s = pd.Series()"
await ip.run_code(code)
with tm.assert_produces_warning(None):

# TODO: remove it when Ipython updates
# GH 33567, jedi version raises Deprecation warning in Ipython
import jedi

if jedi.__version__ < "0.17.0":
warning = tm.assert_produces_warning(None)
else:
warning = tm.assert_produces_warning(
DeprecationWarning, check_stacklevel=False
)
with warning:
with provisionalcompleter("ignore"):
list(ip.Completer.completions("s.", 1))

Expand Down