Skip to content

[pytest/dependencies] pytest is declared as a runtime install dependency #623

Description

@dancasey-ie

Describe the bug
pytest is listed in install_requires (setup.py line 53) and in requirements.txt (line 7), so it is installed into every environment that installs brightwind — including production/runtime deployments. pytest is a test-time tool only; it is not imported anywhere in the package at runtime.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a clean virtual environment.
  2. Run pip install brightwind.
  3. Run pip list | grep -i pytest.
  4. pytest (plus its transitive deps pluggy, iniconfig, etc.) is present.

Expected behavior
Installing brightwind for use (not development) should not pull in pytest. Test-only tooling should live in an optional extra (e.g. dev/test) or a separate requirements-dev.txt.

Additional context
Downstream impact: the BrightHub brightwind-lib-service AWS Lambda image currently bundles pytest 9.1.1 purely as a transitive of brightwind.
Suggested fix: remove pytest from install_requires and requirements.txt, and add extras_require={'dev': ['pytest>=4.1.0']}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions