Skip to content

Commit

Permalink
chore: relax chrono pin to 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
houqp committed Sep 17, 2023
1 parent 9169e23 commit c60dcc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ serde_json = "1"

# "stdlib"
bytes = { version = "1" }
chrono = { version = "=0.4.30", default-features = false, features = ["clock"] }
chrono = { version = "0.4", default-features = false, features = ["clock"] }
regex = { version = "1" }
thiserror = { version = "1" }
url = { version = "2" }
Expand Down
14 changes: 12 additions & 2 deletions python/src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ impl DeltaFileSystemHandler {
Ok(meta) => {
let kwargs = HashMap::from([
("size", meta.size as i64),
("mtime_ns", meta.last_modified.timestamp_nanos()),
(
"mtime_ns",
meta.last_modified.timestamp_nanos_opt().ok_or(
PyValueError::new_err("last modified datetime out of range"),
)?,
),
]);
infos.push(to_file_info(
meta.location.as_ref(),
Expand Down Expand Up @@ -212,7 +217,12 @@ impl DeltaFileSystemHandler {
.map(|meta| {
let kwargs = HashMap::from([
("size", meta.size as i64),
("mtime_ns", meta.last_modified.timestamp_nanos()),
(
"mtime_ns",
meta.last_modified.timestamp_nanos_opt().ok_or(
PyValueError::new_err("last modified datetime out of range"),
)?,
),
]);
to_file_info(
meta.location.to_string(),
Expand Down

0 comments on commit c60dcc8

Please sign in to comment.