Skip to content

[FR] Disallow "requirements.txt" as a file: input for install_requires/dependencies #3793

Closed
@pradyunsg

Description

@pradyunsg

What's the problem this feature will solve?

This will avoid encouraging users to follow the mixing/bad-practice of reading a requirements.txt file into their setup.py file; to "deal with the duplication". We've known about this anti-pattern for over a decade and we shouldn't repeat the same mistake after spending a non-trivial amount of energy to get to a cleaner dependency specification model.

https://caremad.io/posts/2013/07/setup-vs-requirement/

Describe the solution you'd like

Disallow using *.txt filenames as a file: source for the dependencies when using pyproject.toml-based metadata, with the error pointing users to documentation about why this is a bad practice.

Alternative Solutions

Not doing anything, and continuing to make the situation with the misunderstanding around "duplicated information" spread more.

Additional context

No response

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions