I believe the new feature introduced in #199 is not functional.
All my CI jobs that uses pytest-env==1.5.0 are now failing with the same error:
Example: https://github.com/OpenSpeleo/pytool_compass_lib/actions/runs/22228879656/job/64303299098
Run uv run python --version
uv run python --version
uv run pytest
shell: /usr/bin/bash -e {0}
env:
UV_PYTHON_INSTALL_DIR: /home/runner/work/_temp/uv-python-dir
UV_PYTHON: 3.13
UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
ARTIFACT_ENCRYPTION_KEY: ***
Python 3.13.12
Traceback (most recent call last):
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/bin/pytest", line 10, in <module>
sys.exit(console_main())
~~~~~~~~~~~~^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 223, in console_main
code = main()
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 193, in main
config = _prepareconfig(new_args, plugins)
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 361, in _prepareconfig
config: Config = pluginmanager.hook.pytest_cmdline_parse(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
pluginmanager=pluginmanager, args=args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 512, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall
raise exception
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
teardown.throw(exception)
~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/helpconfig.py", line 124, in pytest_cmdline_parse
config = yield
^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1186, in pytest_cmdline_parse
self.parse(args)
~~~~~~~~~~^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1539, in parse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 417, in load_setuptools_entrypoints
self.register(plugin, name=ep.name)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 522, in register
plugin_name = super().register(plugin, name)
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 169, in register
hook._maybe_apply_history(hookimpl)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 580, in _maybe_apply_history
res = self._hookexec(self.name, [method], kwargs, False)
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall
raise exception
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pytest_env/plugin.py", line 30, in pytest_addoption
parser.addoption(
~~~~~~~~~~~~~~~~^
"--envfile",
^^^^^^^^^^^^
...<3 lines>...
help="path to .env file to load (prefix with + to extend config files, otherwise replaces them)",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/argparsing.py", line 123, in addoption
self._anonymous.addoption(*opts, **attrs)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/argparsing.py", line 429, in addoption
raise ValueError(f"option names {conflict} already added")
ValueError: option names {'--envfile'} already added
Error: Process completed with exit code 1.
I'm clearly not the one registering --envfile so I suppose an interaction between pytest-env and pytest-dotenv (a new dependency).
Once fixed - I recommend yanking 1.5.0 as it's a breaking chance and not functional.
Thanks a lot for the work.
I believe the new feature introduced in #199 is not functional.
All my CI jobs that uses
pytest-env==1.5.0are now failing with the same error:Example: https://github.com/OpenSpeleo/pytool_compass_lib/actions/runs/22228879656/job/64303299098
Run uv run python --version uv run python --version uv run pytest shell: /usr/bin/bash -e {0} env: UV_PYTHON_INSTALL_DIR: /home/runner/work/_temp/uv-python-dir UV_PYTHON: 3.13 UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache ARTIFACT_ENCRYPTION_KEY: *** Python 3.13.12 Traceback (most recent call last): File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/bin/pytest", line 10, in <module> sys.exit(console_main()) ~~~~~~~~~~~~^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 223, in console_main code = main() File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 193, in main config = _prepareconfig(new_args, plugins) File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 361, in _prepareconfig config: Config = pluginmanager.hook.pytest_cmdline_parse( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ pluginmanager=pluginmanager, args=args ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 512, in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall raise exception File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall teardown.throw(exception) ~~~~~~~~~~~~~~^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/helpconfig.py", line 124, in pytest_cmdline_parse config = yield ^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall res = hook_impl.function(*args) File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1186, in pytest_cmdline_parse self.parse(args) ~~~~~~~~~~^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1539, in parse self.pluginmanager.load_setuptools_entrypoints("pytest11") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 417, in load_setuptools_entrypoints self.register(plugin, name=ep.name) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 522, in register plugin_name = super().register(plugin, name) File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 169, in register hook._maybe_apply_history(hookimpl) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 580, in _maybe_apply_history res = self._hookexec(self.name, [method], kwargs, False) File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 167, in _multicall raise exception File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 121, in _multicall res = hook_impl.function(*args) File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/pytest_env/plugin.py", line 30, in pytest_addoption parser.addoption( ~~~~~~~~~~~~~~~~^ "--envfile", ^^^^^^^^^^^^ ...<3 lines>... help="path to .env file to load (prefix with + to extend config files, otherwise replaces them)", ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/argparsing.py", line 123, in addoption self._anonymous.addoption(*opts, **attrs) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/home/runner/work/pytool_compass_lib/pytool_compass_lib/.venv/lib/python3.13/site-packages/_pytest/config/argparsing.py", line 429, in addoption raise ValueError(f"option names {conflict} already added") ValueError: option names {'--envfile'} already added Error: Process completed with exit code 1.I'm clearly not the one registering
--envfileso I suppose an interaction betweenpytest-envandpytest-dotenv(a new dependency).Once fixed - I recommend yanking
1.5.0as it's a breaking chance and not functional.Thanks a lot for the work.