Use UTC times consistently
まだ誰も着手していません。
評価
調査の方向性
まず pins/versions.py の 77-78 行付近と 104 行目を読み、datetime の扱いをリンク先の pins-r 実装と比較してください。Python pins が作成時刻のタイムスタンプをどこで書き込み、解析しているかを確認し、その結果生じる UTC の挙動を文書化してください。完了時には、関連するパスを一貫してカバーし、提案されている Ruff DTZ ルールに対応してください。
索引モデルが issue の本文から書いたものです。
説明
Regarding this comment:
https://github.com/rstudio/pins-python/blob/d215a8cd6cf958be0f4fc41c6e90e21c907b4655/pins/versions.py#L77-L78
As far as I can tell, R pins will write the created datetime as a UTC time:
https://github.com/rstudio/pins-r/blob/de47c3141d97020e9f4a6a2e93d5823bc649105b/R/meta.R#L50
And the functions it uses to parse datetimes also specify UTC (although the two parse_ functions indeed strip it out).
https://github.com/rstudio/pins-r/blob/de47c3141d97020e9f4a6a2e93d5823bc649105b/R/meta.R#L55-L68
I haven't looked into this too deeply though.
As far as I can tell, Python pins will just use the local datetime, e.g.
https://github.com/rstudio/pins-python/blob/d215a8cd6cf958be0f4fc41c6e90e21c907b4655/pins/versions.py#L104
I suggest that this behaviour is changed (this is arguably a breaking change, arguably a bugfix) to use UTC consistently everywhere. To that end, the DTZ rules in ruff could be helpful to enable.
In any case, I think it would be worth documenting this behaviour in more detail.
- 主要言語
- Python
- スター
- 59
- フォーク
- 11
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rstudio/pins-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rstudio/pins-python#367 ·
-
.maint
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rstudio/pins-python#280 ·
-
testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rstudio/pins-python#196 ·
-
.enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
rstudio/pins-python#363 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
rstudio/pins-python#354 ·
rstudio/pins-python の issue をすべて見る
似ている issue
-
docs(contributing): the two things that silently block a PR対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンavailable documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 95/100
Nixitov/Riptide-Native#944 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
JTHCode/secretguard#24 ·
メンテナーはふだん 1 日以内に返信
-
area: middleware documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 ·
メンテナーはふだん 1 日以内に返信