Skip to content

Commit 196cad6

Browse files
author
Tim Mitchell
committed
Remove SingleDispatchABC from py3.6 onwards
1 parent 6645eff commit 196cad6

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

methoddispatch/methoddispatch36.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from weakref import WeakKeyDictionary
77
import warnings
88

9-
__all__ = ['singledispatch', 'register', 'SingleDispatch', 'SingleDispatchABC']
9+
__all__ = ['singledispatch', 'register', 'SingleDispatch']
1010

1111

1212
################################################################################

test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
import unittest
33

44
import methoddispatch
5-
from methoddispatch import singledispatch, SingleDispatch, SingleDispatchABC
5+
from methoddispatch import singledispatch, SingleDispatch
6+
try:
7+
from methoddispatch import SingleDispatchABC
8+
except ImportError:
9+
SingleDispatchABC = SingleDispatch
10+
611
import abc
712
import doctest
813
import six

0 commit comments

Comments
 (0)