Fokko commented on code in PR #7782:
URL: https://github.com/apache/iceberg/pull/7782#discussion_r1252718066
##########
python/pyiceberg/types.py:
##########
@@ -34,27 +34,33 @@
import re
from typing import (
Any,
+ Callable,
ClassVar,
Dict,
Generator,
Literal,
Optional,
Tuple,
+ Type,
+ TypeVar,
)
-from pydantic import Field, PrivateAttr
-from pydantic.typing import AnyCallable
+from pydantic import (
+ Field,
+ PrivateAttr,
+ RootModel,
+ model_validator,
+)
from pyiceberg.typedef import IcebergBaseModel
from pyiceberg.utils.parsing import ParseNumberFromBrackets
-from pyiceberg.utils.singleton import Singleton
DECIMAL_REGEX = re.compile(r"decimal\((\d+),\s*(\d+)\)")
FIXED = "fixed"
FIXED_PARSER = ParseNumberFromBrackets(FIXED)
-class IcebergType(IcebergBaseModel, Singleton):
+class IcebergType(IcebergBaseModel):
Review Comment:
(I've removed this singleton temporarily to make sure that it didn't
interfere with Pydantic 2.0)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]