-
Notifications
You must be signed in to change notification settings - Fork 50
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
Python 2.6 compatibility #29
Conversation
This is great! Had stopped testing against Python 2.6 because of hypothesis because it looked like too much work to make it compatible... I'm pretty impressed. I will take a deeper look and make a new release in a hopefully a few days. |
Ha yeah I was thinking it would be a small change. The actual commit for py26 compatibility was: but then I didn't see the point of that without tox. It was a good experience and I was very happy to be able to contribute to natsort :). |
I rewrote history on this commit: To use sys.version_info. I think the tests just need to be rerun again for it to pass. |
- Moved compatibility support to compat module. - Skip hypothesis tests if using Python 2.6. - Skip locale tests for de_DE on platforms that do not support it.
The mock and pathlib modules were not being appended to the test requires.
I really like the idea of the compat folder. Most of my files probably belong in there, so I think I will make that change before release. However, I will move the py26.py file that you added to the "test_natsort" folder, since this file will introduce a dependency on hypothesis and mock for all users even if they are not testing, which I do not want to do. |
This pull request was merged into the develop branch in commit fcda77a. |
Hey Seth, I was just going to followup on your feedback but I see you have already updated. Your changes look really great. Thanks for letting me contribute! |
Hello,
This pull requests adds support for Python 2.6 and Tox. I thought this would be a simple exercise but since hypothesis does not support 2.6:
http://www.drmaciver.com/2015/05/if-you-want-python-2-6-support-pay-me/
getting the tests required a bit more effort than I was anticipating :). Since hypothesis uses decorators the tests couldn't just be skipped the decorators also had to be mocked out. I also ran into a issue where the de_DE locale wasn't available on all versions so those are also skipped sometimes.
The motivation for this was to get these pull requests to pass:
https://github.com/timothycrosley/isort/pulls
Just let me know if you have any questions or comments.
Thanks!,