Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions pyiceberg/table/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from concurrent.futures import Future
from copy import copy
from dataclasses import dataclass
from datetime import datetime
from datetime import datetime, timezone
from enum import Enum
from functools import cached_property, singledispatch
from itertools import chain
Expand Down Expand Up @@ -3915,7 +3915,7 @@ def snapshots(self) -> "pa.Table":
additional_properties = None

snapshots.append({
"committed_at": datetime.utcfromtimestamp(snapshot.timestamp_ms / 1000.0),
"committed_at": datetime.fromtimestamp(snapshot.timestamp_ms / 1000.0, tz=timezone.utc),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"snapshot_id": snapshot.snapshot_id,
"parent_id": snapshot.parent_snapshot_id,
"operation": str(operation),
Expand Down Expand Up @@ -4306,7 +4306,7 @@ def history(self) -> "pa.Table":
snapshot = metadata.snapshot_by_id(snapshot_entry.snapshot_id)

history.append({
"made_current_at": datetime.utcfromtimestamp(snapshot_entry.timestamp_ms / 1000.0),
"made_current_at": datetime.fromtimestamp(snapshot_entry.timestamp_ms / 1000.0, tz=timezone.utc),
"snapshot_id": snapshot_entry.snapshot_id,
"parent_id": snapshot.parent_snapshot_id if snapshot else None,
"is_current_ancestor": snapshot_entry.snapshot_id in ancestors_ids,
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,6 @@ filterwarnings = [
"ignore:unclosed <socket.socket",
# Remove this in a future release of PySpark.
"ignore:distutils Version classes are deprecated. Use packaging.version instead.",
"ignore:datetime.datetime.utcnow\\(\\) is deprecated and scheduled for removal in a future version.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, not sure where this went, theres no references in the codebase
https://github.com/search?q=repo%3Aapache%2Ficeberg-python%20utcnow&type=code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be used in one of the dependency packages, but we don't need to filter the warning in that case

"ignore:datetime.datetime.utcfromtimestamp\\(\\) is deprecated and scheduled for removal in a future version.",
]

[tool.black]
Expand Down