Consistent logic for dependencies resolution#486
Conversation
Different versions of Python have different dependencies. These differences are parsed in various ways. This pull request establishes a consistent method for setting dependencies per version. In addition, the code from `backports.ssl_match_hostname` has been merged into the standard library in Python 2.7.9. The condition for adding that dependency now takes into account that fact. https://www.python.org/downloads/release/python-279/ > The entirety of Python 3.4's ssl module has been backported for Python 2.7.9. > See PEP 466 for justification.
|
I intentionally avoided Python 2.7.9 check to avoid additional complexity. Additional complexity mostly results because we can't use re-use libcloud.utils.py3 here because of the import issues. In any case, now that you have re-factored the code a bit I'm fine with additional check. Thanks. |
There was a problem hiding this comment.
I was confused for a second since I thought pre_PY32 means any version before 3.2 so this check wouldn't work, but it really means any Python 3 version which is smaller than 3.2.
Should probably rename the variables to make this more obvious.
|
@Kami Fair point, but I don't have a clue what variable name to use. What do you suggest? The best I can come up with is something like |
|
@ctx Yeah, I'm fine that name. |
…This makes the unittest2_required check a little more sane.
|
@Kami Variables have been renamed. I also inverted post_PY27 into PY2_pre_27. This makes the unittest2_required check a little more sane. |
There was a problem hiding this comment.
This won't work with Python version <= 2.6 where sys.version_info is a tuple. I will fix it when merging the patch.
|
Merged into trunk. Thanks. |
Different versions of Python have different dependencies. These differences
are parsed in various ways. This pull request establishes a consistent method
for setting dependencies per version.
In addition, the code from
backports.ssl_match_hostnamehas been merged intothe standard library in Python 2.7.9. The condition for adding that dependency
now takes into account that fact.
https://www.python.org/downloads/release/python-279/