Side effects on locale and timezone when importing `extractcode.libarchive2` as library
まだ誰も着手していません。
評価
調査の方向性
src/extractcode/libarchive2.py の 135-143 行を調査し、モジュールを抽出に使用したときのタイムゾーンとロケールの変更を再現してください。使用前後の呼び出し元のロケールとタイムゾーンを対象とするユニットテストのカバレッジを追加し、その後、ライブラリの使用によってそれらがグローバルに変更されなくなったことをテストで示せることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Importing extractcode.libarchive2 has unexpected side effects on the caller, especially when used as a library inside a larger project.
In my specific case, the base application is running with the Europe/Berlin timezone, as this is my local time. After having executed some extraction code involving the aforementioned module, my timezone is set to UTC. This only became obvious because my logging showed that processing the archive finished nearly two hours before starting the process.
The reason is https://github.com/aboutcode-org/extractcode/blob/db9dd083239302220b996bcf9c1914cd5c3ff016/src/extractcode/libarchive2.py#L135-L143 In my opinion, libraries should not change such stuff globally without any warning.
Edit: It seems like these aspects are not covered by unit tests as well, which makes evaluating alternatives or removing these lines harder.
- 主要言語
- Python
- スター
- 39
- フォーク
- 23
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aboutcode-org/extractcode のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
aboutcode-org/extractcode#77 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
aboutcode-org/extractcode#75 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
aboutcode-org/extractcode#73 · リアクション 4 件 ·
-
QA Failure for vmimage extractor (vmimage.py): libguestfs configuration on Ubuntu対応中かも @ArkaprabhaChakraborty が 643 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
aboutcode-org/extractcode#69 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
aboutcode-org/extractcode#66 ·
aboutcode-org/extractcode の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pytest-dev/pytest-html#1085 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
pollen-robotics/reachy_mini#1527 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
A seed and its negative give the same run, so realizations of a negative seed repeat each otherオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信