Merged
Conversation
Fixes running `tox` outputs warnings:
- replaces the `imp` module by the `importlib` one
- simplifies downloader dropping `FancyURLopener`
The warnings were:
```
pythonforandroid/util.py:17
/home/andre/workspace/python-for-android/pythonforandroid/util.py:17:
DeprecationWarning: WgetDownloader style of invoking requests is deprecated. Use newer urlopen functions/methods
urlretrieve = WgetDownloader().retrieve
pythonforandroid/toolchain.py:84
/home/andre/workspace/python-for-android/pythonforandroid/toolchain.py:84:
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
```
AndreMiras
commented
Jun 3, 2020
| BuildInterruptingException) | ||
|
|
||
|
|
||
| def import_recipe(module, filename): |
Member
Author
There was a problem hiding this comment.
Moved to pythonforandroid/util.py and renamed to load_source
AndreMiras
commented
Jun 3, 2020
| version = ('Wget/1.17.1') | ||
|
|
||
|
|
||
| urlretrieve = WgetDownloader().retrieve |
Member
Author
There was a problem hiding this comment.
Fully replaced by simply from urllib.request import urlretrieve
AndreMiras
commented
Jun 3, 2020
Comment on lines
+85
to
+88
| else: | ||
| # Python 3.3 and 3.4: | ||
| from importlib.machinery import SourceFileLoader | ||
| return SourceFileLoader(module, filename).load_module() |
Member
Author
There was a problem hiding this comment.
I was tempted to completely ditch the Python 3.3/3.4 part, but didn't want to risk it in this one. Let's keep it for later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes running
toxoutputs warnings:impmodule by theimportliboneFancyURLopenerThe warnings were: