Skip to content

test_require is deprecated.Β #50

@kousu

Description

@kousu

https://github.com/storborg/python-packaging/blob/35daf9938a63f7deb4b25cb1c5c65578c73f28e4/testing.rst recommends

setup(
    ...
    test_suite='nose.collector',
    tests_require=['nose'],
)
...
$ python setup.py test

If you actually try this, you'll get

WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.

(from pypa/setuptools#1878). There's a long thread (pypa/setuptools#931) where the PyPA devs talk about their plan to drop setup.py test entirely, apparently in favour of expecting you to tox instead. Except the tox maintainer told me that tox isn't really meant to be used that way.

Anyway, in the middle of all this confusion pypa/setuptools#1684 (comment) claims

I don't think we've ever tried to disguise this. For several years now we have been actively warning people not to invoke setup.py directly at every opportunity, and we've been quite explicit that the end goal is for setuptools to lose as many of its extraneous features as possible and become a standard build tool.

but I'd never seen any of those warnings. You, as one of the top hits for "python packaging" was also unaware. So I don't really know whose advice to trust. What do you think should be recommended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions