FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Try to import Mapping and MutableMapping from collections.abc by 5j9 · Pull Request #403 · html5lib/html5lib-python · GitHub

Try to import Mapping and MutableMapping from collections.abc - #403

Merged
gsnedders merged 1 commit into
html5lib:masterfrom
5j9:master
Oct 1, 2018
Merged

Try to import Mapping and MutableMapping from collections.abc#403
gsnedders merged 1 commit into
html5lib:masterfrom
5j9:master

Conversation

5j9 commented Sep 23, 2018

Copy link
Copy Markdown
Contributor

Note that collections.abc has been added in Python 3.3.

Fixes #402

Note that collections.abc has been added in Python 3.3.

Fixes html5lib#402

codecov-io commented Sep 23, 2018
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #403 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
+ Coverage   90.76%   90.77%   +<.01%     
==========================================
  Files          50       50              
  Lines        6950     6956       +6     
  Branches     1328     1328              
==========================================
+ Hits         6308     6314       +6     
  Misses        483      483              
  Partials      159      159
Impacted Files Coverage Δ
html5lib/_trie/_base.py 61.53% <100%> (+5.01%) ⬆️
html5lib/treebuilders/dom.py 89.41% <100%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 950ea0e...322a2d5. Read the comment docs.

5j9 changed the title Try to import MutableMapping from collections.abc Try to import Mapping and MutableMapping from collections.abc Sep 23, 2018

gsnedders left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for fixing this!

Copy link
Copy Markdown

Would be great to have a release shipping this among the other improvements!

pllim commented Nov 8, 2019

Copy link
Copy Markdown

Still no release with this patch after a year? 😢

zsol commented Dec 20, 2019
edited
Loading

Copy link
Copy Markdown

Edit: apologies for the noise, there's already discussion happening about this in #419.

This is now breaking with Python 3.9:

❯ python
Python 3.9.0a2+ (heads/master:b0d4949, Dec 20 2019, 11:38:30)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import html5lib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/__init__.py", line 25, in <module>
    from .html5parser import HTMLParser, parse, parseFragment
  File "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/html5parser.py", line 8, in <module>
    from . import _tokenizer
  File "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_tokenizer.py", line 16, in <module>
    from ._trie import Trie
  File "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_trie/__init__.py", line 3, in <module>
    from .py import Trie as PyTrie
  File "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_trie/py.py", line 6, in <module>
    from ._base import Trie as ABCTrie
  File "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_trie/_base.py", line 3, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/collections/__init__.py)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeprecationWarning in collections import

6 participants


Back | FazBrowse Home | New Git URL