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

Use feature detection instead of version detection #104

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link

@cclauss cclauss commented Apr 12, 2018

@McSinyx
Copy link

McSinyx commented Apr 12, 2018

Hi there, should the block above follow the similar mechanism? i.e.

try:
    import unittest2 as unittest
except ImportError:
    import unittest

@cclauss
Copy link
Author

cclauss commented Apr 12, 2018

The try / except approach does not work for unittest and unittest2 because:

  • unittest is part of the standard library in both Python 2 and Python 3
  • unittest2 is pip install-able in both Python 2 and Python 3 (in quite complex ways!)

@McSinyx
Copy link

McSinyx commented Apr 13, 2018

Thank you for the explaination. I thought unittest2 is a std lib backported, turns out it's external. I'm so careless. Also somehow this repo have seemed to be abandoned for a while now, do you think we should tag @zoofood the original developer and @rawktron the Python guy at @ActiveState. Sorry I have already tagged you guys, but also any idea on #97?

@cclauss cclauss closed this Nov 24, 2019
@cclauss cclauss deleted the patch-1 branch November 24, 2019 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants