Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Fix collections.abc deprecation #474

Merged
merged 1 commit into from
Jan 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/python/twitter/common/collections/orderedset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
# modifications
#

import collections
try:
# Python 3 moved MutableSet to collections.abc
from collections.abc import MutableSet
except ImportError:
from collections import MutableSet


class OrderedSet(collections.MutableSet):
class OrderedSet(MutableSet):
KEY, PREV, NEXT = range(3)

def __init__(self, iterable=None):
Expand Down