Skip to content

Commit 1e59b4c

Browse files
authored
COMPAT: don't force clipboard routines to be imported in main pandas started (pandas-dev#16294)
closes pandas-dev#16288
1 parent 4bed864 commit 1e59b4c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

doc/source/whatsnew/v0.20.2.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Indexing
4848
I/O
4949
^^^
5050

51-
51+
- Bug that would force importing of the clipboard routines unecessarily, potentially causing an import error on startup (:issue:`16288`)
5252

5353

5454
Plotting

pandas/core/generic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1382,8 +1382,8 @@ def to_clipboard(self, excel=None, sep=None, **kwargs):
13821382
- Windows: none
13831383
- OS X: none
13841384
"""
1385-
from pandas.io.clipboard import clipboard
1386-
clipboard.to_clipboard(self, excel=excel, sep=sep, **kwargs)
1385+
from pandas.io import clipboards
1386+
clipboards.to_clipboard(self, excel=excel, sep=sep, **kwargs)
13871387

13881388
def to_xarray(self):
13891389
"""

pandas/io/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# flake8: noqa
66

77
from pandas.io.parsers import read_csv, read_table, read_fwf
8-
from pandas.io.clipboard.clipboard import read_clipboard
8+
from pandas.io.clipboards import read_clipboard
99
from pandas.io.excel import ExcelFile, ExcelWriter, read_excel
1010
from pandas.io.pytables import HDFStore, get_store, read_hdf
1111
from pandas.io.json import read_json
File renamed without changes.

0 commit comments

Comments
 (0)