File tree 3 files changed +19
-3
lines changed
3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import absolute_import , division , unicode_literals
2
2
3
3
from 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
5
11
6
12
import codecs
7
13
import re
Original file line number Diff line number Diff line change 12
12
import warnings
13
13
from xml .sax .saxutils import escape , unescape
14
14
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
16
20
17
21
from . import base
18
22
from ..constants import namespaces , prefixes
Original file line number Diff line number Diff line change 9
9
import pytest
10
10
11
11
import 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
13
19
14
20
from html5lib ._inputstream import (BufferedStream , HTMLInputStream ,
15
21
HTMLUnicodeInputStream , HTMLBinaryInputStream )
You can’t perform that action at this time.
0 commit comments