Import Mapping from collections.abc#98
Merged
davidism merged 1 commit intopallets:masterfrom Jun 27, 2018
The-Compiler:collections
Merged
Import Mapping from collections.abc#98davidism merged 1 commit intopallets:masterfrom The-Compiler:collections
davidism merged 1 commit intopallets:masterfrom
The-Compiler:collections
Conversation
In Python 3.7, importing ABCs directly from the `collections` module shows a warning (and in Python 3.8 it will stop working) - see python/cpython@c66f9f8 This fixes the following `DeprecationWarning`: >>> import warnings >>> warnings.simplefilter('default') >>> import markupsafe .../markupsafe/__init__.py:12: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Mapping
The-Compiler
added a commit
to qutebrowser/qutebrowser
that referenced
this pull request
Jun 27, 2018
Contributor
Author
|
I just noticed I forgot to update the changelog - something like this might be appropriate? diff --git a/CHANGES.rst b/CHANGES.rst
index 463ed38..831f8bc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -11,8 +11,11 @@ Unreleased
- ``escape`` wraps ``__html__`` result in ``Markup``, consistent with
documented behavior. (`#69`_)
+- Fixed deprecation warning on Python 3.7 by importing from ``collections.abc``
+ instead of ``collections`` (`#98`_)
.. _#69: https://github.com/pallets/markupsafe/pull/69
+.. _#98: https://github.com/pallets/markupsafe/pull/98
Version 1.0 |
Member
|
This isn't the type of change we typically add to the changelog. |
Closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In Python 3.7, importing ABCs directly from the
collectionsmodule shows awarning (and in Python 3.8 it will stop working) - see
python/cpython@c66f9f8
This fixes the following
DeprecationWarning: