8000 EncodingBytes.__new__ needs to call bytes.__new__, not str.__new__ · wisniman/html5lib-python@0a9de87 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a9de87

Browse files
author
Mark Pilgrim
committed
EncodingBytes.__new__ needs to call bytes.__new__, not str.__new__
1 parent 55caa34 commit 0a9de87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html5lib/inputstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class EncodingBytes(bytes):
455455
If the position is ever greater than the string length then an exception is
456456
raised"""
457457
def __new__(self, value):
458-
return str.__new__(self, value)
458+
return bytes.__new__(self, value)
459459

460460
def __init__(self, value):
461461
self._position = -1

0 commit comments

Comments
 (0)
0