Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Add support for Python 3.12+ where six.moves is not available.#587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
zajacg wants to merge1 commit intohtml5lib:master
base:master
Choose a base branch
Loading
fromzajacg:six-moves-module-not-found-error
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletionhtml5lib/_inputstream.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
from __future__ import absolute_import, division, unicode_literals

from six import text_type
from six.moves import http_client, urllib

try:
from six.moves import http_client, urllib
except ModuleNotFoundError:
# Support for Python 3.12+ where six.moves is not available.
import http.client as http_client
import urllib

import codecs
import re
Expand Down
6 changes: 5 additions & 1 deletionhtml5lib/filters/sanitizer.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,11 @@
import warnings
from xml.sax.saxutils import escape, unescape

from six.moves import urllib_parse as urlparse
try:
from six.moves import urllib_parse as urlparse
except ModuleNotFoundError:
# Support for Python 3.12+ where six.moves is not available.
import urllib.parse as urlparse

from . import base
from ..constants import namespaces, prefixes
Expand Down
8 changes: 7 additions & 1 deletionhtml5lib/tests/test_stream.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,13 @@
import pytest

import six
from six.moves import http_client, urllib

try:
from six.moves import http_client, urllib
except ModuleNotFoundError:
# Support for Python 3.12+ where six.moves is not available.
import http.client as http_client
import urllib

from html5lib._inputstream import (BufferedStream, HTMLInputStream,
HTMLUnicodeInputStream, HTMLBinaryInputStream)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp