@@ -130,7 +130,7 @@ def tquery(sql, con, cur=None, params=None, flavor='sqlite'):
130
130
"""
131
131
warnings .warn (
132
132
"tquery is depreciated, and will be removed in future versions" ,
133
- DeprecationWarning )
133
+ FutureWarning )
134
134
135
135
pandas_sql = pandasSQL_builder (con , flavor = flavor )
136
136
args = _convert_params (sql , params )
@@ -163,7 +163,7 @@ def uquery(sql, con, cur=None, params=None, engine=None, flavor='sqlite'):
163
163
"""
164
164
warnings .warn (
165
165
"uquery is depreciated, and will be removed in future versions" ,
166
- DeprecationWarning )
166
+ FutureWarning )
167
167
pandas_sql = pandasSQL_builder (con , flavor = flavor )
168
168
args = _convert_params (sql , params )
169
169
return pandas_sql .uquery (* args )
@@ -212,7 +212,7 @@ def read_sql_table(table_name, con, meta=None, index_col=None,
212
212
--------
213
213
read_sql_query : Read SQL query into a DataFrame.
214
214
read_sql
215
-
215
+
216
216
217
217
"""
218
218
pandas_sql = PandasSQLAlchemy (con , meta = meta )
@@ -322,8 +322,8 @@ def read_sql(sql, con, index_col=None, flavor='sqlite', coerce_float=True,
322
322
Notes
323
323
-----
324
324
This function is a convenience wrapper around ``read_sql_table`` and
325
- ``read_sql_query`` (and for backward compatibility) and will delegate
326
- to the specific function depending on the provided input (database
325
+ ``read_sql_query`` (and for backward compatibility) and will delegate
326
+ to the specific function depending on the provided input (database
327
327
table name or sql query).
328
328
329
329
See also
@@ -423,13 +423,12 @@ def pandasSQL_builder(con, flavor=None, meta=None):
423
423
if isinstance (con , sqlalchemy .engine .Engine ):
424
424
return PandasSQLAlchemy (con , meta = meta )
425
425
else :
426
- warnings .warn (
427
- """Not an SQLAlchemy engine,
428
- attempting to use as legacy DBAPI connection""" )
426
+ warnings .warn ("Not an SQLAlchemy engine, "
427
+ "attempting to use as legacy DBAPI connection" )
429
428
if flavor is None :
430
429
raise ValueError (
431
- """ PandasSQL must be created with an SQLAlchemy engine
432
- or a DBAPI2 connection and SQL flavour"" " )
430
+ "PandasSQL must be created with an SQLAlchemy engine "
431
+ " or a DBAPI2 connection and SQL flavor " )
433
432
else :
434
433
return PandasSQLLegacy (con , flavor )
435
434
@@ -1006,7 +1005,7 @@ def to_sql(self, frame, name, if_exists='fail', index=True,
1006
1005
fail: If table exists, do nothing.
1007
1006
replace: If table exists, drop it, recreate it, and insert data.
1008
1007
append: If table exists, insert data. Create if does not exist.
1009
-
1008
+
1010
1009
"""
1011
1010
table = PandasSQLTableLegacy (
1012
1011
name , self , frame = frame , index = index , if_exists = if_exists ,
@@ -1041,20 +1040,20 @@ def get_schema(frame, name, con, flavor='sqlite'):
1041
1040
name: name of SQL table
1042
1041
con: an open SQL database connection object
1043
1042
engine: an SQLAlchemy engine - replaces connection and flavor
1044
- flavor: {'sqlite', 'mysql', 'postgres' }, default 'sqlite'
1043
+ flavor: {'sqlite', 'mysql'}, default 'sqlite'
1045
1044
1046
1045
"""
1047
- warnings .warn (
1048
- "get_schema is depreciated" , DeprecationWarning )
1046
+ warnings .warn ("get_schema is depreciated" , FutureWarning )
1047
+
1049
1048
pandas_sql = pandasSQL_builder (con = con , flavor = flavor )
1050
1049
return pandas_sql ._create_sql_schema (frame , name )
1051
1050
1052
1051
1052
+
1053
1053
def read_frame (* args , ** kwargs ):
1054
1054
"""DEPRECIATED - use read_sql
1055
1055
"""
1056
- warnings .warn (
1057
- "read_frame is depreciated, use read_sql" , DeprecationWarning )
1056
+ warnings .warn ("read_frame is depreciated, use read_sql" , FutureWarning )
1058
1057
return read_sql (* args , ** kwargs )
1059
1058
1060
1059
@@ -1092,7 +1091,7 @@ def write_frame(frame, name, con, flavor='sqlite', if_exists='fail', **kwargs):
1092
1091
pandas.DataFrame.to_sql
1093
1092
1094
1093
"""
1095
- warnings .warn ("write_frame is depreciated, use to_sql" , DeprecationWarning )
1094
+ warnings .warn ("write_frame is depreciated, use to_sql" , FutureWarning )
1096
1095
1097
1096
# for backwards compatibility, set index=False when not specified
1098
1097
index = kwargs .pop ('index' , False )
0 commit comments