You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow magika 1.x — magika 0.6.x loads .env into os.environ at import #2719
markitdown pins magika~=0.6.1 (packages/markitdown/pyproject.toml). Every magika 0.6.x runs dotenv.load_dotenv(dotenv.find_dotenv()) in magika/__init__.py at import time. find_dotenv() walks up from magika's own site-packages directory, so import markitdown silently loads the first .env it finds above the virtualenv into os.environ.
For us this meant variables from an unrelated .env leaking into a running server process. A setting the operator removed on purpose can also come back this way.
magika removed the dotenv dependency in 1.0.2 (google/magika#1283, google/magika#1285). With the current pin, markitdown users cannot get that fix.
Could the pin be relaxed to magika>=0.6.1,<2? Happy to open a PR if that is welcome.
Workaround until then: set PYTHON_DOTENV_DISABLED=1 before importing markitdown.
Activity
afourney commentedon Oct 21, 2026
Thanks for the report and the suggested dependency range! We’ve merged #2722, which allows Magika 1.x. Closing this as resolved by that PR.
docs: 補齊 microsoft#2757 同題 PR 對照;附接續開發報告 2026-10-25
docs: 補齊 microsoft#2757 同題 PR 對照;附接續開發報告 2026-10-25