Skip to content

Possible race condition when using AuditSpinner #739

Open
@i386x

Description

@i386x

Bug description

With --progress-spinner being on, either spinner text or memory-stored logs appears on the terminal, but not both.

Examples:

  • spinner message, no logs:
    py310: commands[0]> python -m pip_audit -S .
    - Collecting inputs
    py310: exit 1 (0.51 seconds) /home/jkucera/development/upstream/vutils-validator> python -m pip_audit -S . pid=47412
    
  • no spinner message, logs:
    py310: commands[0]> python -m pip_audit -S .
    ERROR:pip_audit._cli:pyproject file pyproject.toml does not contain `project` section
    py310: exit 1 (0.51 seconds) /home/jkucera/development/upstream/vutils-validator> python -m pip_audit -S . pid=47276
    

As a workaround, --progress-spinner need to be set to off:

py310: commands[0]> python -m pip_audit --progress-spinner off -S .
ERROR:pip_audit._cli:pyproject file pyproject.toml does not contain `project` section
py310: exit 1 (0.50 seconds) /home/jkucera/development/upstream/vutils-validator> python -m pip_audit --progress-spinner off -S . pid=47455

Reproduction steps

  1. Add python -m pip_audit -S . to your tox.ini file.
  2. Remove [project] section from your pyproject.toml file.
  3. Run tox multiple times and watch its behavior.

Expected behavior

Both spinner and logs should be displayed on the terminal.

Screenshots and logs

See examples above.

Platform information

  • OS name and version: Fedora Linux 37 (Workstation Edition)
  • pip-audit version (pip-audit -V): pip-audit 2.7.1
  • Python version (python -V or python3 -V): Python 3.10.12
  • pip version (pip -V or pip3 -V): pip 23.2.1
  • tox version: 3.28.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions