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

Question on requirements (distribution packaging) #179

Closed
dmsimard opened this issue May 1, 2017 · 20 comments
Closed

Question on requirements (distribution packaging) #179

dmsimard opened this issue May 1, 2017 · 20 comments

Comments

@dmsimard
Copy link

dmsimard commented May 1, 2017

Hi,

I'm working on packaging pyfakefs for Fedora and CentOS (EPEL) right now.

The requirements are very static currently:

mox3==0.10.0
pytest==2.8.0
wheel==0.26.0

Is there a possibility of testing minimum and maximum versions and modifying the requirements accordingly ?
mox3 is up to 0.21.0 now, pytest up to 3.0.7 and wheel 0.30.

We have varying versions available in RHEL-based derivatives of those already but I'm mostly interested if, for example, there are known bad versions.
Perhaps this could work ? Just an example.

mox3>=0.10.0
pytest>=2.8.0,<3.0.0
wheel>=0.26.0

Otherwise, there's been 30+ commits since the last tagged release, maybe we could tag a new release if we choose to adjust the requirements.

Thanks a lot for this library, it's saved my life :)

@jmcgeheeiv
Copy link
Contributor

jmcgeheeiv commented May 1, 2017

Well, it looks like we've hit the big time now.

I added the mox3 dependency, and I think that your suggestion of mox3>=0.10.0 should work just fine.

@mrbean-bremen, do you know about pytest or wheel?

Obviously a release is in order after we make these changes.

@mrbean-bremen
Copy link
Member

There was a problem with pytest < 2.8.6 with pyfakefs and doctest, so I think pytest>=2.8.6 would be better (@jmcgeheeiv - I just noticed that the README also mentions 2.8.0 instead of 2.8.6).
I don't know where the wheel dependency is coming from - isn't it only needed for packaging?

@mrbean-bremen
Copy link
Member

Ah, and this has been tested with pytest 3, so pytest<3.0.0 won't be needed IMHO.

@dmsimard
Copy link
Author

dmsimard commented May 1, 2017

Wheel comes from this commit and it doesn't really seem used throughout the project.

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 1, 2017

It actually comes from this earlier commit - @jmcgeheeiv, can you please check if this is really needed?

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 1, 2017

About mox3 - I have been using version 0.18.0 before, and just did a quick test with 0.21.0, which works without problems. So no problems expected here with the changed requirements. So:

mox3>=0.10.0
pytest>=2.8.6

shall be sufficient, as far as I can see.

@dmsimard
Copy link
Author

dmsimard commented May 1, 2017

FWIW I've done a RPM build without wheel and it works for me (quick sanity check):
http://paste.openstack.org/raw/608542/

It pulled mox3 0.17 and pytest 3.0.7 which are the latest available on Fedora right now.

@mrbean-bremen
Copy link
Member

Ah well, this should be sufficient then - thanks!
@jmcgeheeiv - will you make a new release with the changed requirements, so that we have a consistent version, and Fedora gets the latest and greatest pyfakefs? ;)

@dmsimard
Copy link
Author

dmsimard commented May 1, 2017

I'll submit the package to Fedora with 3.1, we can update to 3.2 when it comes out -- it's not a problem. Thanks for your help !

@mrbean-bremen
Copy link
Member

Thanks for your work!

@jmcgeheeiv
Copy link
Contributor

jmcgeheeiv commented May 1, 2017

I added the wheel requirement. However, I added it rather naively. I mildly recall that it was needed, but maybe not. I would trust your empirical experience over my recollection of the past.

So, can we get a final spec for the requirements? I will go and update that 2.8.0 typo in the README right now.

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 1, 2017

Yes - I think we can go with this (see above):

mox3>=0.10.0
pytest>=2.8.6

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue May 5, 2017
- added links to CHANGES.md for convenience
- made some links in README.md absolute to work in Pypi description
- adapted requirements as discussed in pytest-dev#179
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue May 5, 2017
- added links to CHANGES.md for convenience
- made some links in README.md absolute to work in Pypi description
- adapted requirements as discussed in pytest-dev#179
jmcgeheeiv pushed a commit that referenced this issue May 8, 2017
* Minor documentation changes

- added links to CHANGES.md for convenience
- made some links in README.md absolute to work in Pypi description
- adapted requirements as discussed in #179

* Cleaned up autodoc

- added some introduction (taken from README)
- cleaned up index
- fixed minor indentation problems in docstrings
@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 8, 2017

@jmcgeheeiv - I just did a quick test using mock instead of mox3, and it seems to work fine, but for Python 2 this means a dependency on the mock package (for Python 3 it's built in).
Is there any reason to prefer mox3 over mock or vice verse? I checked the 2 issues with mock you had in #48, and one was a simple bug (#46), and the other one (#43) was unrelated.

@jmcgeheeiv
Copy link
Contributor

jmcgeheeiv commented May 8, 2017

Actually the killer problem was something else. It is described in this mock issue. It looks like a fix to unittest is inching its way toward inclusion in Python 3.6, but the problem remains in all the earlier versions.

@mrbean-bremen, how did you do your "quick test"?

@mrbean-bremen
Copy link
Member

Mostly I just used your changes you did then. I have to admit that I ran only the tests in all_tests - just noticed that the pytest plugin test fails for Python 3. I will make a branch with the changes.

@mrbean-bremen
Copy link
Member

https://github.com/mrbean-bremen/pyfakefs/commits/use-mock
Strangely enough, the pytest plugin test fails for all Python 3 versions except Python 3.5.
I may have a look at this tomorrow - just out of interest.

@dmsimard
Copy link
Author

dmsimard commented May 9, 2017

For what it's worth, I'm from the OpenStack community which maintains mox3 ( https://github.com/openstack/mox3 ) and they are looking to drop support for it and replace it by Mock right now.

It is one of the goals for the current development cycle:
image

It would probably be better if you could move away from Mox3 in favor of Mock.

@mrbean-bremen
Copy link
Member

I created a new issue (#182) for the mox3 replacement.
@dmsimard - you may close the current issue if you are done.

@dmsimard
Copy link
Author

dmsimard commented May 9, 2017

Yup, the requirements are now up to date with a proper minimum version.
Can you tag a new release once mock is replaced ?

@dmsimard dmsimard closed this as completed May 9, 2017
@mrbean-bremen
Copy link
Member

Sure!

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

3 participants