|
25 | 25 | from pandas._libs.lib import no_default
|
26 | 26 | import pandas._libs.testing as _testing
|
27 | 27 | from pandas._typing import Dtype, FilePathOrBuffer, FrameOrSeries
|
28 |
| -from pandas.compat import _get_lzma_file, _import_lzma |
| 28 | +from pandas.compat import get_lzma_file, import_lzma |
29 | 29 |
|
30 | 30 | from pandas.core.dtypes.common import (
|
31 | 31 | is_bool,
|
|
70 | 70 | from pandas.io.common import urlopen
|
71 | 71 | from pandas.io.formats.printing import pprint_thing
|
72 | 72 |
|
73 |
| -lzma = _import_lzma() |
| 73 | +lzma = import_lzma() |
74 | 74 |
|
75 | 75 | _N = 30
|
76 | 76 | _K = 4
|
@@ -243,7 +243,7 @@ def decompress_file(path, compression):
|
243 | 243 | elif compression == "bz2":
|
244 | 244 | f = bz2.BZ2File(path, "rb")
|
245 | 245 | elif compression == "xz":
|
246 |
| - f = _get_lzma_file(lzma)(path, "rb") |
| 246 | + f = get_lzma_file(lzma)(path, "rb") |
247 | 247 | elif compression == "zip":
|
248 | 248 | zip_file = zipfile.ZipFile(path)
|
249 | 249 | zip_names = zip_file.namelist()
|
@@ -288,7 +288,7 @@ def write_to_compressed(compression, path, data, dest="test"):
|
288 | 288 | elif compression == "bz2":
|
289 | 289 | compress_method = bz2.BZ2File
|
290 | 290 | elif compression == "xz":
|
291 |
| - compress_method = _get_lzma_file(lzma) |
| 291 | + compress_method = get_lzma_file(lzma) |
292 | 292 | else:
|
293 | 293 | raise ValueError(f"Unrecognized compression type: {compression}")
|
294 | 294 |
|
|
0 commit comments