Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore pip freeze after pip install #2772

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/tox/tox_env/python/pip/pip_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def installed(self) -> list[str]:
cmd=cmd.args,
stdin=StdinSource.OFF,
run_id="freeze",
show=self._env.options.verbosity > DEFAULT_VERBOSITY,
show=True,
# show=self._env.options.verbosity > DEFAULT_VERBOSITY,
)
result.assert_success()
return result.out.splitlines()
Expand Down
3 changes: 3 additions & 0 deletions src/tox/tox_env/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def _setup_with_env(self) -> None:
else:
self._setup_pkg()

def _done_with_setup(self) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this, considering https://github.com/tox-dev/tox/blob/main/src/tox/tox_env/python/api.py#L216. Shouldn't we be reusing that call?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is python specific so I don't see why it would leave under the generic runner and not the python scope.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in the CI we can pass this --display-dependencies argument and locally it's also possible to pass this argument if the user has any reason to do it, but by default it will not change anything.

I'd argue in the CI envs we should do this without the user passing any flags. And that was my threshold of acceptability in the issue. Locally the user can still use the flag, if they want.

self.installer.installed()

def _register_package_conf(self) -> bool:
"""If this returns True package_env and package_tox_env_type configurations must be defined"""
self.core.add_config(
Expand Down