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

Feature/fix python requires imports #3876

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Oct 29, 2018

Changelog: BugFix: Fix conflicting multiple local imports for python_requires

Fix #3874

@ghost ghost assigned memsharded Oct 29, 2018
@ghost ghost added the stage: review label Oct 29, 2018
@jgsogo jgsogo added this to the 1.9 milestone Oct 29, 2018
@memsharded memsharded assigned lasote and unassigned memsharded Oct 29, 2018
@memsharded memsharded requested review from danimtb and jgsogo October 29, 2018 17:44
conans/test/integration/python_build_test.py Show resolved Hide resolved
@@ -228,7 +228,7 @@ def _parse_file(conan_file_path):
try:
module_id = str(uuid.uuid1())
current_dir = os.path.dirname(conan_file_path)
sys.path.append(current_dir)
sys.path.insert(0, current_dir)
Copy link
Contributor

Choose a reason for hiding this comment

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

It won't ever happen, but... I would put these three lines outside the try block to be sure that the finally block removes the inserted path (otherwise, if one of these lines raises, we are removing something else from the path list).

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, fixed.

Copy link
Contributor

@lasote lasote left a comment

Choose a reason for hiding this comment

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

It is ok but answer to the @jgsogo comments

@ghost ghost assigned memsharded Oct 30, 2018
Copy link
Contributor

@jgsogo jgsogo left a comment

Choose a reason for hiding this comment

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

👍

@memsharded memsharded merged commit 6f996d5 into conan-io:release/1.9.0 Oct 30, 2018
@ghost ghost removed the stage: review label Oct 30, 2018
@memsharded memsharded deleted the feature/fix_python_requires_imports branch October 30, 2018 09:57
grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018
…equires_imports

Feature/fix python requires imports
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.

4 participants