File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 11from __future__ import absolute_import , division , unicode_literals
22
33from six import text_type
4- from six .moves import http_client , urllib
4+
5+ try :
6+ from six .moves import http_client , urllib
7+ except ModuleNotFoundError :
8+ # Support for Python 3.12+ where six.moves is not available.
9+ import http .client as http_client
10+ import urllib
511
612import codecs
713import re
Original file line number Diff line number Diff line change 1212import warnings
1313from xml .sax .saxutils import escape , unescape
1414
15- from six .moves import urllib_parse as urlparse
15+ try :
16+ from six .moves import urllib_parse as urlparse
17+ except ModuleNotFoundError :
18+ # Support for Python 3.12+ where six.moves is not available.
19+ import urllib .parse as urlparse
1620
1721from . import base
1822from ..constants import namespaces , prefixes
Original file line number Diff line number Diff line change 99import pytest
1010
1111import six
12- from six .moves import http_client , urllib
12+
13+ try :
14+ from six .moves import http_client , urllib
15+ except ModuleNotFoundError :
16+ # Support for Python 3.12+ where six.moves is not available.
17+ import http .client as http_client
18+ import urllib
1319
1420from html5lib ._inputstream import (BufferedStream , HTMLInputStream ,
1521 HTMLUnicodeInputStream , HTMLBinaryInputStream )
You can’t perform that action at this time.
0 commit comments