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

Deprecating legacy plot API #669

Closed
wants to merge 10 commits into from
Closed
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [Doc] Document --persist-replace in API section (#539)
* [Fix] Fixed CI issue by updating `invalid_connection_string_duckdb` in `test_magic.py` (#631)
* [Fix] Refactored `ResultSet` to lazy loading (#470)
* [Fix] Showed depcrecation warnings message for plot API ([#513](https://github.com/ploomber/jupysql/issues/513))
tl3119 marked this conversation as resolved.
Show resolved Hide resolved

## 0.7.9 (2023-06-19)

Expand Down
21 changes: 21 additions & 0 deletions src/sql/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ def pie(self, key_word_sep=" ", title=None, **kwargs):
Any additional keyword arguments will be passed
through to ``matplotlib.pylab.pie``.
"""
warnings.warn(
(
".pie() will be removed in a future version,"
"please use %sqlplot bar. If you need help migrating,"
tl3119 marked this conversation as resolved.
Show resolved Hide resolved
"send us a message: https://ploomber.io/community"
)
tl3119 marked this conversation as resolved.
Show resolved Hide resolved
)
self.guess_pie_columns(xlabel_sep=key_word_sep)
import matplotlib.pylab as plt

Expand Down Expand Up @@ -261,6 +268,13 @@ def plot(self, title=None, **kwargs):
Any additional keyword arguments will be passed
through to ``matplotlib.pylab.plot``.
"""
warnings.warn(
(
".plot() will be removed in a future version."
"If you need help migrating, send us a message: "
"https://ploomber.io/community"
)
)
import matplotlib.pylab as plt

self.guess_plot_columns()
Expand Down Expand Up @@ -302,6 +316,13 @@ def bar(self, key_word_sep=" ", title=None, **kwargs):
Any additional keyword arguments will be passed
through to ``matplotlib.pylab.bar``.
"""
warnings.warn(
(
".bar() will be removed in a future version,"
"please use %sqlplot bar. If you need help migrating,"
"send us a message: https://ploomber.io/community"
)
)
import matplotlib.pylab as plt

ax = plt.gca()
Expand Down
Loading