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

Move from types_extensions to types #1586

Merged
merged 1 commit into from
Jan 28, 2025
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
12 changes: 1 addition & 11 deletions pyiceberg/partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,7 @@
from dataclasses import dataclass
from datetime import date, datetime, time
from functools import cached_property, singledispatch
from typing import (
Any,
Dict,
Generic,
List,
Optional,
Tuple,
TypeVar,
Union,
)
from typing import Annotated, Any, Dict, Generic, List, Optional, Tuple, TypeVar, Union
from urllib.parse import quote_plus

from pydantic import (
Expand All @@ -40,7 +31,6 @@
WithJsonSchema,
model_validator,
)
from typing_extensions import Annotated

from pyiceberg.schema import Schema
from pyiceberg.transforms import (
Expand Down
10 changes: 1 addition & 9 deletions pyiceberg/table/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,10 @@
import datetime
import uuid
from copy import copy
from typing import (
Any,
Dict,
List,
Literal,
Optional,
Union,
)
from typing import Annotated, Any, Dict, List, Literal, Optional, Union

from pydantic import Field, field_serializer, field_validator, model_validator
from pydantic import ValidationError as PydanticValidationError
from typing_extensions import Annotated

from pyiceberg.exceptions import ValidationError
from pyiceberg.partitioning import PARTITION_FIELD_ID_START, PartitionSpec, assign_fresh_partition_spec_ids
Expand Down
3 changes: 1 addition & 2 deletions pyiceberg/table/refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
# specific language governing permissions and limitations
# under the License.
from enum import Enum
from typing import Optional
from typing import Annotated, Optional

from pydantic import Field, model_validator
from typing_extensions import Annotated

from pyiceberg.exceptions import ValidationError
from pyiceberg.typedef import IcebergBaseModel
Expand Down
10 changes: 1 addition & 9 deletions pyiceberg/table/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@
# under the License.
# pylint: disable=keyword-arg-before-vararg
from enum import Enum
from typing import (
Any,
Callable,
Dict,
List,
Optional,
Union,
)
from typing import Annotated, Any, Callable, Dict, List, Optional, Union

from pydantic import (
BeforeValidator,
Expand All @@ -32,7 +25,6 @@
WithJsonSchema,
model_validator,
)
from typing_extensions import Annotated

from pyiceberg.schema import Schema
from pyiceberg.transforms import IdentityTransform, Transform, parse_transform
Expand Down
3 changes: 1 addition & 2 deletions pyiceberg/table/update/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
from abc import ABC, abstractmethod
from datetime import datetime
from functools import singledispatch
from typing import TYPE_CHECKING, Any, Dict, Generic, List, Literal, Optional, Tuple, TypeVar, Union, cast
from typing import TYPE_CHECKING, Annotated, Any, Dict, Generic, List, Literal, Optional, Tuple, TypeVar, Union, cast

from pydantic import Field, field_validator, model_validator
from typing_extensions import Annotated

from pyiceberg.exceptions import CommitFailedException
from pyiceberg.partitioning import PARTITION_FIELD_ID_START, PartitionSpec
Expand Down
3 changes: 1 addition & 2 deletions tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# pylint: disable=eval-used,protected-access,redefined-outer-name
from datetime import date
from decimal import Decimal
from typing import Any, Callable, Optional, Union
from typing import Annotated, Any, Callable, Optional, Union
from uuid import UUID

import mmh3 as mmh3
Expand All @@ -30,7 +30,6 @@
RootModel,
WithJsonSchema,
)
from typing_extensions import Annotated

from pyiceberg.expressions import (
AlwaysFalse,
Expand Down