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

Make mock only optional dependency #3965

Closed
mcepl opened this issue Sep 10, 2018 · 8 comments
Closed

Make mock only optional dependency #3965

mcepl opened this issue Sep 10, 2018 · 8 comments
Labels
status: help wanted developers would like help from experts on this topic

Comments

@mcepl
Copy link

mcepl commented Sep 10, 2018

When packaging pytest in Linux distributions (and I guess it matters for other packaging systems as well, e.g., MacPorts or Homebrew), especially for packages which are deep in the tree of dependencies, it is useful to remove all unnecessary dependencies. That's a case of mock, which is since Python 3.3 available in the standard library as unittest.mock.

This patch makes the mock only optional dependency of pytest.

@RonnyPfannschmidt RonnyPfannschmidt added the status: help wanted developers would like help from experts on this topic label Sep 11, 2018
@RonnyPfannschmidt
Copy link
Member

why not just go ahead and make a pr of this

@mcepl
Copy link
Author

mcepl commented Sep 11, 2018

Because I don't want to keep around clones with hundreds of silly Python projects I fix (I am a maintainer of Python for a large Linux distro).

@RonnyPfannschmidt
Copy link
Member

good luck with that

blueyed added a commit to blueyed/pytest that referenced this issue Sep 11, 2018
@blueyed
Copy link
Contributor

blueyed commented Sep 11, 2018

Thanks for the patch, I've created #3967 (let me know if you want to take credit for it!).

I think it is fair to not having to create PRs: this is usually easy for a contributor that has it checked out already, and it allows to fine-tune e.g. the tox.ini like I did now.

blueyed added a commit to blueyed/pytest that referenced this issue Sep 11, 2018
@mcepl
Copy link
Author

mcepl commented Sep 11, 2018

Thanks for PR. Yeah, I don't care that much about attribution, it is not really a great feat of computer engineering after all.

blueyed added a commit to blueyed/pytest that referenced this issue Sep 11, 2018
Fixes pytest-dev#3965.

Has to work around tox-dev/tox#706.

No coverage for pluggymaster builds is OK though anyway.
@blueyed
Copy link
Contributor

blueyed commented Sep 11, 2018

@mcepl
Are you referring to pytest itself?
@RonnyPfannschmidt might agree with you here, but it is still the best testing framework for Python currently, and maybe you might help out more in the future to improve it as a Python maintainer for a distribution.
But from the previous comment also it sounds more like it is your day/paid job only unfortunetatly.

@blueyed
Copy link
Contributor

blueyed commented Sep 11, 2018

Just a side note: given the specialities with tox etc that showed itself up in the PR I can totally understand that a simple patch is far from getting this finished correctly, and therefore it is very valid to just report issues and provide patches. @RonnyPfannschmidt @nicoddemus (who downvoted the comment)

@mcepl
Copy link
Author

mcepl commented Sep 12, 2018

@mcepl
Are you referring to pytest itself?

No, to my patch. Although I have some gripes with pytest (which are irrelevant here), I believe it is currently the most developed and interesting project in the Python testing arena. Of course, it certainly is a great feat of computer engineering.

blueyed added a commit to blueyed/pytest that referenced this issue Sep 12, 2018
Fixes pytest-dev#3965.

Has to work around tox-dev/tox#706.

No coverage for pluggymaster builds is OK though anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted developers would like help from experts on this topic
Projects
None yet
Development

No branches or pull requests

3 participants