Skip to content

Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated #405

Closed
@labrys

Description

@labrys

It will stop working in Python 3.8.

Activity

serhiy-storchaka

serhiy-storchaka commented on Dec 20, 2018

@serhiy-storchaka

This is a blocker for CPython: python/cpython#10596.

tirkarthi

tirkarthi commented on Dec 20, 2018

@tirkarthi

Seems to be a duplicate of #402 ?

labrys

labrys commented on Dec 22, 2018

@labrys
Author

@tirkarthi Not a duplicate as the issue still exists after #402 was closed.
from collections import ... is still used in the following locations:

  • html5lib._tokenizer
  • html5lib.html5parser
  • html5lib.filters.alphabeticalattributes
  • html5lib.tests.test_alphabeticalattributes
  • html5lib.treewalkers.etree
tirkarthi

tirkarthi commented on Dec 22, 2018

@tirkarthi

The actual warning is about importing ABCs using from collections instead of collections.abc . OrderedDict and deque can still be imported from collections. from collections import ... is going away only for ABCs. The linked PR blocking CPython is about ABCs and a quick scan of the listed files tells me this is fixed in html5lib.

labrys

labrys commented on Dec 22, 2018

@labrys
Author

@tirkarthi you are correct... closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @labrys@serhiy-storchaka@tirkarthi

      Issue actions

        Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated · Issue #405 · html5lib/html5lib-python