Skip to content

test_require is deprecated. #50

Open

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?

Activity

  1. kousu commented on Jul 9, 2020

    @kousu
    Author

    And if setuptools does lose all those "extraneous" features, this entire guide is going to need to be reworked. jaraco explicitly repeats that this is the goal

    PyPA is working hard to create decoupled tools that can specialize in a domain and do that thing well under possibly independent maintenance and enable competing tools to fill the same need perhaps in a more specialized way. The PyPA has made strides in this goal, but you're right that there are still gaps.

    This is what has given us pyproject.toml and all the other boilerplate files you're expected to have in a modern python project. Or, at least that PyPA expects? I don't know if people making code that's in use right now are actually paying attention or even aware that this is happening.

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

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