tools: fix Python 3 deprecation warning in test.py#30208
Closed
Hellzed wants to merge 2 commits intonodejs:masterfrom
Closed
tools: fix Python 3 deprecation warning in test.py#30208Hellzed wants to merge 2 commits intonodejs:masterfrom
Hellzed wants to merge 2 commits intonodejs:masterfrom
Conversation
addaleax
approved these changes
Nov 1, 2019
targos
approved these changes
Nov 1, 2019
Member
targos
left a comment
There was a problem hiding this comment.
Thanks a lot!
nit: indentation should be two spaces
Member
|
If you want GitHub to register your contribution, you need to add the email address used for the commit to your account (at https://github.com/settings/emails) |
Contributor
Author
fixed! |
devnexen
approved these changes
Nov 1, 2019
Collaborator
cclauss
pushed a commit
that referenced
this pull request
Nov 3, 2019
PR-URL: #30208 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Contributor
targos
pushed a commit
that referenced
this pull request
Nov 5, 2019
PR-URL: #30208 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
63 tasks
targos
pushed a commit
that referenced
this pull request
Nov 8, 2019
PR-URL: #30208 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 10, 2019
PR-URL: #30208 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 10, 2019
PR-URL: #30208 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
targos
pushed a commit
that referenced
this pull request
Nov 11, 2019
PR-URL: #30208 Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
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.
Since Python 3.4, the
impmodule is deprecated, causing a deprecation warning when runningtools/test.py.This fixes it by conditionally using
importlibinstead when runningtools/test.pywith Python 3.5+.Notes:
importlib.util.module_from_spec()isn't available. Python 3 < 3.5 reached EOL so this should not be an issue.importlib.machinery.FileFindershould match the the behaviour ofimp.find_module()and find any Python-recognised module file (liketestcfg.py).Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes