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

Ignores Python 2 import_recipe() warnings #1789

Conversation

AndreMiras
Copy link
Member

Python 2 raises warnings on imp.load_source() when the module name contains dots. Ignoring this warning makes p4a output/logs more readable.
Note that for some reason the regression test will only catch the regression if ran isolated, e.g. via:

tox -e py27 -- tests/test_recipe.py::TestRecipe::test_import_recipe

@AndreMiras AndreMiras requested review from inclement and a user April 6, 2019 23:15
Python 2 raises warnings on `imp.load_source()` when the module name
contains dots. Ignoring this warning makes p4a output/logs more
readable.
Also refactors to make the code more readable.
Note that for some reason the regression test will only catch the
regression if ran isolated, e.g. via:
```sh
tox -e py27 -- tests/test_recipe.py::TestRecipe::test_import_recipe
```
@AndreMiras AndreMiras force-pushed the feature/filter_python2_import_recipe_warnings branch from 91a22ee to 7b21c46 Compare April 7, 2019 12:20
@inclement inclement merged commit 1b36096 into kivy:master Apr 7, 2019
@inclement
Copy link
Member

Thanks!

@ghost
Copy link

ghost commented Apr 7, 2019

@AndreMiras nice work ❤️ for what it's worth, I get the mixed concerns but I'm also having the impression it's better to refactor it while you add something rather than not at all (which seems to be a bigger problem with a project of this size, just the nature of the economics) - so I think it's reasonable to put that in

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