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

setup.py test is going to be deprecated #5534

Closed
jamesmyatt opened this issue Jul 1, 2019 · 7 comments

Comments

@jamesmyatt
Copy link

commented Jul 1, 2019

There are plans to deprecate setup.py test (pypa/setuptools#1684). Is it worth updating the section in "Good Integration Practices" to discourage using the setuptools integration (https://docs.pytest.org/en/latest/goodpractices.html#integrating-with-setuptools-python-setup-py-test-pytest-runner)?

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

Definitely, thanks for bringing this to attention.

We might even consider removing that section altogether I think, only keeping the pytest-runner section.

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

@jaraco what do you think?

@graingert

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

setting setup_requires in 'setup.py' is not good practice, it should be moved to pyproject.toml if used at all, see #3814

@jaraco

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

I agree we should discourage use of setup_requires and tests_require in favor of extras or requirements.txt or pyproject.toml.

We might even consider removing that section altogether I think, only keeping the pytest-runner section.

Yes, I'm in favor of removing the section altogether. I don't see any value in keeping a reference to pytest-runner. Instead, I recommend giving users guidance on how best to orchestrate (create environments, declare and install dependencies, etc) their tests (e.g. with tox).

graingert added a commit to graingert/pytest that referenced this issue Jul 3, 2019

remove documentation about setuptools integration Refs pytest-dev#5534
integrating with `python setup.py test` is not good practice!

nicoddemus added a commit that referenced this issue Jul 3, 2019

remove documentation about setuptools integration Refs #5534 Fi… (#5546)
remove documentation about setuptools integration Refs #5534 Fixes #3814
@jamesmyatt

This comment has been minimized.

Copy link
Author

commented Jul 5, 2019

I'd be tempted to include a recommendation to not integrate with setuptools, rather than just have the section disappear. Otherwise people won't understand why it's gone.

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

@jamesmyatt that's a good suggestion. Would you like to open a short PR with that? I suppose this can be done even directly from the GH interface. 👍

@nicoddemus nicoddemus closed this Jul 5, 2019

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

Closed by #5546

sqlalchemy-bot pushed a commit to sqlalchemy/mako that referenced this issue Aug 1, 2019

remove python setup.py test
Removed the "python setup.py test" feature in favor of a straight run of
"tox".   Per Pypa / pytest developers, "setup.py" commands are in general
headed towards deprecation in favor of tox.  The tox.ini script has been
updated such that running "tox" with no arguments will perform a single run
of the test suite against the default installed Python interpreter.

.. seealso::

pypa/setuptools#1684

pytest-dev/pytest#5534

Fixes: #303
Change-Id: I345fd46f8911a71c039adf2d51937175142db793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.