Feature: Stream bytes out on copy_from_container
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 67/100
調査の方向性
まず copy_file_from_container() の Python 実装とそのテストを読んでください。issue には具体的なファイル名が記載されていません。現在の Path ベースのコピーがどのように実装されているか、また近くの API がストリームをどのように公開しているかを確認してください。一時ファイルに書き込まずに呼び出し側がコピーしたバイト列を収集でき、その新しい動作をテストでカバーできたら完了です。
索引モデルが issue の本文から書いたものです。
説明
What are you trying to do?
In Testcontainers Java, there's a handy override for copyFileFromContainer() that let's you pass a function to collect the output stream. This seems to be primarily exist so you can stream the bytes out without writing them to disk.
In Testcontainers Go, CopyFileFromContainer() returns an io.ReadCloser directly which is super nice.
It would be handy if there was a way to do this in the python version, which currently only supports passing a Path and writing to that path.
Why should it be done this way?
I don't want to use a temporary file on disk.
Other references:
https://golang.testcontainers.org/features/files_and_mounts/
- 主要言語
- Python
- スター
- 2.3k
- フォーク
- 397
- 平均マージ
- 8日 16時間
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-python のほかの issue
-
Bug: HttpWaitStrategy ignores response predicates for accepted HTTP error statuses対応中かも @PranavMulakala が 41 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
Bug: LogMessageWaitStrategy: a container that exits before its message raises without its logs, and __enter__ then removes the container対応中かも @granzer69 が 42 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
testcontainers/testcontainers-python#1086 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
testcontainers/testcontainers-python#578 · コメント 5 件 ·
-
Bug: Reaper is force-removed at interpreter exit since 4.15.0, session containers are never reaped対応中かも @pantafive が 42 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
testcontainers/testcontainers-python の issue をすべて見る
似ている issue
-
bug feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Qiskit/qiskit-obp#156 ·
-
action-item enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
getcommunityone/open-navigator#1658 ·
メンテナーはふだん 1 日以内に返信
-
review-panel severity:low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kristovatlas/coin-accounting#636 ·
メンテナーはふだん 1 日以内に返信