8000 Fix deprecation warning · awesome-python/html5lib-python@8dc5873 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8dc5873

Browse files
committed
Fix deprecation warning
1 parent 1ac258a commit 8dc5873

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/html5lib/inputstream.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,10 @@ class EncodingBytes(str):
444444
"""String-like object with an assosiated position and various extra methods
445445
If the position is ever greater than the string length then an exception is
446446
raised"""
447+
def __new__(self, value):
448+
return str.__new__(self, value)
449+
447450
def __init__(self, value):
448-
str.__init__(self, value)
449451
self._position=-1
450452

451453
def __iter__(self):

0 commit comments

Comments
 (0)
0