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

Revert to using mox.stubout instead of mock.patch #48

Closed
jmcgeheeiv opened this issue May 17, 2015 · 3 comments
Closed

Revert to using mox.stubout instead of mock.patch #48

jmcgeheeiv opened this issue May 17, 2015 · 3 comments

Comments

@jmcgeheeiv
Copy link
Contributor

A few months ago, in pyfakefs.pyfakefs_unittest._Patcher I replaced mox with unittest.mock. mox worked fine, but mock seemed like a more reliable dependency:

  • mox is seemingly abandoned while mock is now part of the standard library
  • mox does not support Python 3
  • The OpenStack people created mox3 to support Python 3, but it is marked with the omimous comment, "Use at your own risk". Moreover, OpenStack stopped using mox3.

Now we are seeing all kinds of trouble caused by mock module bug 250:

pyfakefs used only one small part of mox, mox.stubout. I do not care to depend on unmaintained mox, (or to take on maintenance of the mox3 module as a whole), so I am considering salvaging just the part of mox3 that pyfakefs needs:

  1. Take just mox3.stubout.py and its test from mox3
  2. Add it to pyfakefs as pyfakefs.stubout
  3. Revert to using pyfakefs.stubout as I used mox.stubout in earlier versions, eliminating the dependency on both mock and mox

Please tell me what you think of this plan.

@tomviner
Copy link
Contributor

Given the issues we're seeing, this sounds like the best option.

@robintw
Copy link

robintw commented Aug 30, 2015

This sounds like a very good way forward.

(In the meantime, is there anything I can do myself to fix this? I'm really struggling with fake_filesystem_unittest.py at the moment)

@jmcgeheeiv
Copy link
Contributor Author

Robin, which issue it it that you are facing?

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

4 participants