Fix deprecation warning for collections#27
Open
shepherdjay wants to merge 1 commit intombr:masterfrom
Open
Conversation
|
The warning is an error in Python 3.10, could someone please merge this and make a new release? |
|
@shepherdjay I just noticed you also need to change the import or the module won't work: diff --git a/flask_nav/__init__.py b/flask_nav/__init__.py
index 7c25dfa..5826b9e 100644
--- a/flask_nav/__init__.py
+++ b/flask_nav/__init__.py
@@ -1,4 +1,4 @@
-import collections
+import collections.abc
from importlib import import_module
import re
@@ -46,7 +46,7 @@ class NavbarRenderingError(Exception):
pass
-class ElementRegistry(collections.MutableMapping):
+class ElementRegistry(collections.abc.MutableMapping):
def __init__(self):
self._elems = {}
|
Author
|
@sbraz - Updated - sorry did not see your earlier comment been in the middle of a move. |
cci-tyler-burg
approved these changes
Oct 24, 2022
|
Would it be possible to merge and release a new version? Ran into this issue as well and fixed it in analogous way locally. Would be very nice :). |
|
Yes, please merge this! |
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.
Resolves this error
Edit: Fixes #28