Skip to content

Commit 6a6c656

Browse files
committed
Revert subclassing of future.types from newobject
We don't have a compelling need for this yet and it interferes with e.g. long(newstr(u'123')) on Py2
1 parent 6d8a26f commit 6a6c656

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

future/types/newbytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __instancecheck__(cls, instance):
2929
return issubclass(instance.__class__, cls)
3030

3131

32-
class newbytes(with_metaclass(BaseNewBytes, _builtin_bytes, newobject)):
32+
class newbytes(with_metaclass(BaseNewBytes, _builtin_bytes)):
3333
"""
3434
A backport of the Python 3 bytes object to Py2
3535
"""

future/types/newdict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __instancecheck__(cls, instance):
3434
return issubclass(instance.__class__, cls)
3535

3636

37-
class newdict(with_metaclass(BaseNewDict, _builtin_dict, newobject)):
37+
class newdict(with_metaclass(BaseNewDict, _builtin_dict)):
3838
"""
3939
A backport of the Python 3 dict object to Py2
4040
"""

future/types/newint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __instancecheck__(cls, instance):
2828
return issubclass(instance.__class__, cls)
2929

3030

31-
class newint(with_metaclass(BaseNewInt, long, newobject)):
31+
class newint(with_metaclass(BaseNewInt, long)):
3232
"""
3333
A backport of the Python 3 int object to Py2
3434
"""

future/types/newlist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __instancecheck__(cls, instance):
3131
return issubclass(instance.__class__, cls)
3232

3333

34-
class newlist(with_metaclass(BaseNewList, _builtin_list, newobject)):
34+
class newlist(with_metaclass(BaseNewList, _builtin_list)):
3535
"""
3636
A backport of the Python 3 list object to Py2
3737
"""

future/types/newstr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __instancecheck__(cls, instance):
6161
return issubclass(instance.__class__, cls)
6262

6363

64-
class newstr(with_metaclass(BaseNewStr, unicode, newobject)):
64+
class newstr(with_metaclass(BaseNewStr, unicode)):
6565
"""
6666
A backport of the Python 3 str object to Py2
6767
"""

0 commit comments

Comments
 (0)