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 Oct 29, 2018
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
Member

@jgsogo jgsogo Oct 29, 2018

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

@memsharded memsharded Oct 30, 2018

Agree, fixed.

lasote
lasote approved these changes Oct 30, 2018
Copy link
Contributor

@lasote lasote left a comment

It is ok but answer to the @jgsogo comments

@ghost ghost assigned memsharded Oct 30, 2018
jgsogo
jgsogo approved these changes Oct 30, 2018
Copy link
Member

@jgsogo jgsogo left a comment

👍

@memsharded memsharded merged commit 6f996d5 into conan-io:release/1.9.0 Oct 30, 2018
1 of 2 checks passed
@ghost ghost removed the stage: review label Oct 30, 2018
@memsharded memsharded deleted the feature/fix_python_requires_imports branch Oct 30, 2018
grisumbras pushed a commit to grisumbras/conan that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants