Skip to content

Consistent logic for dependencies resolution#486

Closed
cgtx wants to merge 2 commits into
apache:trunkfrom
cgtx:dependency_logic
Closed

Consistent logic for dependencies resolution#486
cgtx wants to merge 2 commits into
apache:trunkfrom
cgtx:dependency_logic

Conversation

@cgtx
Copy link
Copy Markdown
Contributor

@cgtx cgtx commented Mar 13, 2015

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.

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.
@Kami
Copy link
Copy Markdown
Member

Kami commented Mar 13, 2015

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.

Comment thread setup.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cgtx
Copy link
Copy Markdown
Contributor Author

cgtx commented Mar 14, 2015

@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 PY2_pre_279.

@Kami
Copy link
Copy Markdown
Member

Kami commented Mar 14, 2015

@ctx Yeah, I'm fine that name.

…This makes the unittest2_required check a little more sane.
@cgtx
Copy link
Copy Markdown
Contributor Author

cgtx commented Mar 14, 2015

@Kami Variables have been renamed. I also inverted post_PY27 into PY2_pre_27. This makes the unittest2_required check a little more sane.

Comment thread setup.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work with Python version <= 2.6 where sys.version_info is a tuple. I will fix it when merging the patch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix in 88e3c82

@asfgit asfgit closed this in 8ba4cd7 Mar 14, 2015
@Kami
Copy link
Copy Markdown
Member

Kami commented Mar 14, 2015

Merged into trunk. Thanks.

@cgtx cgtx deleted the dependency_logic branch March 15, 2015 02:46
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.

3 participants