Define create_module()/exec_module() in VendorImporter#2517
Merged
Conversation
This was referenced Dec 30, 2020
Closed
Contributor
|
The "Automated Tests / test (3.6, ubuntu-latest)" fails. I don't know if it's related to the PR. I don't know pytest. I read that |
Contributor
Author
|
XFAIL means they failed and were expected to fail. |
Contributor
|
Ah, I think that the two tests that failed are:
|
3f1b70e to
542d24b
Compare
Contributor
Author
|
I've removed the bits that I didn't understand. This should do. |
Contributor
Author
|
In the current form, this fixes most of the failures in depending packages. Related #2493 remains unfixed (I had no idea how to fix it). |
vstinner
approved these changes
Jan 4, 2021
Contributor
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
I wrote a similar fix in the six module: benjaminp/six@e51553a
Contributor
Author
|
Together with #2523 this fixes the problems we saw in Fedora. |
sqlalchemy-bot
pushed a commit
to sqlalchemy/mako
that referenced
this pull request
Jan 14, 2021
Fixed Python deprecation issues related to module importing, as well as file access within the Lingua plugin, for deprecated APIs that began to emit warnings under Python 3.10. Pull request courtesy Petr Viktorin. This modernizes the code to avoid `DeprecationWarning` and `ResourceWarning` encountered in the test suite under Python 3.10a4: - [load_module](https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module) is deprecated - Some files weren't being closed This changes the semantics of the `compat.load_module` function: on Python 3.5+, the module is no longer inserted in `sys.modules`. All non-test calls did `del sys.modules[self.module_id]` right after the call, anyway. On older Python, the module is inserted and then deleted. (Some additional `DeprecationWarning` come from Setuptools: pypa/setuptools#2517) Closes: #328 Pull-request: #328 Pull-request-sha: 87c1d09 Change-Id: I9cb3772f6812ef14297792344caf2f9aa5337adf
The-Compiler
added a commit
to qutebrowser/qutebrowser
that referenced
this pull request
Apr 7, 2021
pypa/setuptools#2517 pypa/setuptools#2523 (something in tox/virtualenv probably uses an older setuptools...) benjaminp/six#352 (not released yet)
The-Compiler
added a commit
to The-Compiler/pytest
that referenced
this pull request
Apr 14, 2021
The-Compiler
added a commit
to The-Compiler/pytest
that referenced
this pull request
May 4, 2021
artdogma
added a commit
to artdogma/pymako
that referenced
this pull request
Aug 27, 2025
Fixed Python deprecation issues related to module importing, as well as file access within the Lingua plugin, for deprecated APIs that began to emit warnings under Python 3.10. Pull request courtesy Petr Viktorin. This modernizes the code to avoid `DeprecationWarning` and `ResourceWarning` encountered in the test suite under Python 3.10a4: - [load_module](https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module) is deprecated - Some files weren't being closed This changes the semantics of the `compat.load_module` function: on Python 3.5+, the module is no longer inserted in `sys.modules`. All non-test calls did `del sys.modules[self.module_id]` right after the call, anyway. On older Python, the module is inserted and then deleted. (Some additional `DeprecationWarning` come from Setuptools: pypa/setuptools#2517) Closes: #328 Pull-request: sqlalchemy/mako#328 Pull-request-sha: 87c1d09e5f39de7b19e749568c437928580f7553 Change-Id: I9cb3772f6812ef14297792344caf2f9aa5337adf
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.
Summary of changes
Fixes #2481
Pull Request Checklist
changelog.d/.(See documentation for details) -- TODO