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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: python setup.py test is deprecated #71897

Closed
FRidh opened this issue Oct 24, 2019 · 2 comments
Closed

Python: python setup.py test is deprecated #71897

FRidh opened this issue Oct 24, 2019 · 2 comments
Milestone

Comments

@FRidh
Copy link
Member

FRidh commented Oct 24, 2019

Describe the bug
The test command of setuptools has been deprecated. Packages should stop using it, we should stop using it as a default checkPhase.

Additional context
The command is currently used as the default checkPhase. It was not uncommon that we had to set a custom checkPhase, typically pytest or nosetests. Now that the command is being deprecated/removed, we can expect more variation in commands to be used. Upstream does encourage the use of tox, although I think we should generally avoid it because it's a relatively heavy. (OK, not very heavy, but because it has Python deps we can't use it for core packages because of the DAG)

Related

@FRidh FRidh added this to the 20.03 milestone Oct 24, 2019
@disassembler disassembler modified the milestones: 20.03, 20.09 Feb 5, 2020
@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 4, 2020
@FRidh FRidh modified the milestones: 20.09, 21.03 Nov 1, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 1, 2020
@NixOS NixOS deleted a comment from stale bot Nov 1, 2020
@wamserma
Copy link
Member

From what I've seen (very subjective), most packages are moving to either tox or pytest (without tox). The choice should be detectable with a few checks in the default checkPhase. For all others we could omit a warning requesting customization of the checkPhase.

@jonringer
Copy link
Contributor

jonringer commented Apr 22, 2024

the "setup.py test" command is only ran today if format = "setuptools"; is set, which is no longer the default since #254136.

I think we can close this, but I'll defer to @FRidh 's judgement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants