|
3 | 3 | import copy |
4 | 4 | import csv |
5 | 5 | import multiprocessing as mp |
| 6 | +from multiprocessing.connection import Connection as MultiprocessingConnection |
6 | 7 | from ast import literal_eval |
7 | 8 | from datetime import date, datetime |
8 | 9 | from decimal import Decimal |
@@ -270,7 +271,7 @@ def _read_csv_once(session_primitives: "SessionPrimitives", bucket_name: str, ke |
270 | 271 | return dataframe |
271 | 272 |
|
272 | 273 | @staticmethod |
273 | | - def _read_csv_once_remote(send_pipe: mp.connection.Connection, session_primitives: "SessionPrimitives", |
| 274 | + def _read_csv_once_remote(send_pipe: MultiprocessingConnection, session_primitives: "SessionPrimitives", |
274 | 275 | bucket_name: str, key_path: str, **pd_additional_kwargs): |
275 | 276 | df: pd.DataFrame = Pandas._read_csv_once(session_primitives=session_primitives, |
276 | 277 | bucket_name=bucket_name, |
@@ -884,7 +885,7 @@ def _cast_pandas(dataframe: pd.DataFrame, cast_columns: Dict[str, str]) -> pd.Da |
884 | 885 | return dataframe |
885 | 886 |
|
886 | 887 | @staticmethod |
887 | | - def _data_to_s3_dataset_writer_remote(send_pipe, |
| 888 | + def _data_to_s3_dataset_writer_remote(send_pipe: MultiprocessingConnection, |
888 | 889 | dataframe: pd.DataFrame, |
889 | 890 | path: str, |
890 | 891 | partition_cols, |
@@ -1295,7 +1296,7 @@ def read_parquet(self, |
1295 | 1296 | return df |
1296 | 1297 |
|
1297 | 1298 | @staticmethod |
1298 | | - def _read_parquet_paths_remote(send_pipe: mp.connection.Connection, |
| 1299 | + def _read_parquet_paths_remote(send_pipe: MultiprocessingConnection, |
1299 | 1300 | session_primitives: "SessionPrimitives", |
1300 | 1301 | path: Union[str, List[str]], |
1301 | 1302 | columns: Optional[List[str]] = None, |
@@ -1781,7 +1782,7 @@ def _read_fwf(session_primitives: "SessionPrimitives", bucket_name: str, key_pat |
1781 | 1782 | return dataframe |
1782 | 1783 |
|
1783 | 1784 | @staticmethod |
1784 | | - def _read_fwf_remote(send_pipe: mp.connection.Connection, session_primitives: "SessionPrimitives", bucket_name: str, |
| 1785 | + def _read_fwf_remote(send_pipe: MultiprocessingConnection, session_primitives: "SessionPrimitives", bucket_name: str, |
1785 | 1786 | key_path: str, **pd_additional_kwargs): |
1786 | 1787 | df: pd.DataFrame = Pandas._read_fwf(session_primitives=session_primitives, |
1787 | 1788 | bucket_name=bucket_name, |
|
0 commit comments