Skip to content

FIX: use decorator to append read_frame/frame_query docstring (GH8315) #8988

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 1 commit into from
Dec 4, 2014
Merged
Changes from all commits
Commits
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
8 changes: 3 additions & 5 deletions pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pandas.core.common import isnull
from pandas.core.base import PandasObject
from pandas.tseries.tools import to_datetime
from pandas.util.decorators import Appender

from contextlib import contextmanager

Expand Down Expand Up @@ -1533,13 +1534,15 @@ def get_schema(frame, name, flavor='sqlite', keys=None, con=None):

# legacy names, with depreciation warnings and copied docs

@Appender(read_sql.__doc__, join='\n')
def read_frame(*args, **kwargs):
"""DEPRECATED - use read_sql
"""
warnings.warn("read_frame is deprecated, use read_sql", FutureWarning)
return read_sql(*args, **kwargs)


@Appender(read_sql.__doc__, join='\n')
def frame_query(*args, **kwargs):
"""DEPRECATED - use read_sql
"""
Expand Down Expand Up @@ -1587,8 +1590,3 @@ def write_frame(frame, name, con, flavor='sqlite', if_exists='fail', **kwargs):
index = kwargs.pop('index', False)
return to_sql(frame, name, con, flavor=flavor, if_exists=if_exists,
index=index, **kwargs)


# Append wrapped function docstrings
read_frame.__doc__ += read_sql.__doc__
frame_query.__doc__ += read_sql.__doc__