Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove stale code for conditional import of Literal #2676

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions python/deltalake/_internal.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import sys
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union

if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal
from typing import Any, Dict, List, Literal, Mapping, Optional, Tuple, Union

import pyarrow
import pyarrow.fs as fs
Expand Down
16 changes: 5 additions & 11 deletions python/deltalake/writer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import sys
import uuid
from dataclasses import dataclass
from datetime import date, datetime
Expand All @@ -13,6 +12,7 @@
Iterable,
Iterator,
List,
Literal,
Mapping,
Optional,
Protocol,
Expand All @@ -22,21 +22,14 @@
)
from urllib.parse import unquote

from deltalake import Schema as DeltaSchema
from deltalake.fs import DeltaStorageHandler

from ._util import encode_partition_value

if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal

import pyarrow as pa
import pyarrow.dataset as ds
import pyarrow.fs as pa_fs
from pyarrow import RecordBatchReader

from deltalake import Schema as DeltaSchema
from deltalake.fs import DeltaStorageHandler

from ._internal import DeltaDataChecker as _DeltaDataChecker
from ._internal import batch_distinct
from ._internal import convert_to_deltalake as _convert_to_deltalake
Expand All @@ -45,6 +38,7 @@
)
from ._internal import write_new_deltalake as write_deltalake_pyarrow
from ._internal import write_to_deltalake as write_deltalake_rust
from ._util import encode_partition_value
from .exceptions import DeltaProtocolError, TableNotFoundError
from .schema import (
convert_pyarrow_dataset,
Expand Down
Loading