Skip to content

Commit 638f8b0

Browse files
jrebackTomAugspurger
authored andcommitted
COMPAT: don't force clipboard routines to be imported in main pandas started (#16294)
closes #16288 (cherry picked from commit 1e59b4c)
1 parent a1a7858 commit 638f8b0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

doc/source/whatsnew/v0.20.2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Indexing
5050
I/O
5151
^^^
5252

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

5555

5656
Plotting

pandas/core/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,8 +1387,8 @@ def to_clipboard(self, excel=None, sep=None, **kwargs):
13871387
- Windows: none
13881388
- OS X: none
13891389
"""
1390-
from pandas.io.clipboard import clipboard
1391-
clipboard.to_clipboard(self, excel=excel, sep=sep, **kwargs)
1390+
from pandas.io import clipboards
1391+
clipboards.to_clipboard(self, excel=excel, sep=sep, **kwargs)
13921392

13931393
def to_xarray(self):
13941394
"""

pandas/io/api.py

Lines changed: 1 addition & 1 deletion
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)