theskumar / theskumar/python-dotenv

Bug: python-dotenv doesn't load 1Password “mounted” .env files (looks like a FIFO / fd-backed file)

オープン
#598 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
8.9k
フォーク
581
PR マージ指標
30日以内にマージされた PR はありません

説明

I’ve been trying 1Password’s new environment feature which mounts a .env file to a destination path (I think it’s a pipe, file descriptor path, or some other non-regular file). This seems to be a Mac feature right now.

python-dotenv doesn’t seem to load anything from it, even though the path exists.

What I expected

load_dotenv() (or dotenv_values()) should read key/value pairs from the mounted .env file, same as a normal file. I'd expect something similar to Node's dotenv package, that when the file tries to be read, 1Password prompts you to allow access. Only then are the values available

What happened instead

The file path exists, but reading it gives an empty string (and python-dotenv ends up loading nothing).

Quick sanity check:

from pathlib import Path

p = Path(".env")
print("exists:", p.exists())
print("readable:", p.read_text(errors="replace"))

Output:

exists: True
readable:
Repro steps
  1. Use 1Password to mount / expose a .env file (however their new environment feature does it).
  2. Point the app at that .env path (eg in the project root as .env).
  3. Call load_dotenv() or dotenv_values().
  4. Observe that nothing is loaded.
Versions
  • OS: macOS 15.6
  • Python: 3.13
  • python-dotenv: 1.0.1
  • 1Password + CLI: 8.11.22

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Start by reproducing the mounted .env behavior with the named load_dotenv() and dotenv_values() entry points on macOS. Trace how they open and read the supplied path, then verify completion by confirming that key/value pairs from the 1Password-mounted file are loaded rather than an empty string.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。