-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes "plugin not supported" errors with python 3.8. PR #21539.
- Loading branch information
Showing
3 changed files
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#VERSION: 1.47 | ||
#VERSION: 1.48 | ||
|
||
# Author: | ||
# Christophe DUMEZ ([email protected]) | ||
|
@@ -39,8 +39,7 @@ | |
import urllib.error | ||
import urllib.parse | ||
import urllib.request | ||
from collections.abc import Mapping | ||
from typing import Any, Dict, Optional | ||
from typing import Any, Dict, Mapping, Match, Optional | ||
|
||
|
||
def getBrowserUserAgent() -> str: | ||
|
@@ -75,7 +74,7 @@ def getBrowserUserAgent() -> str: | |
def htmlentitydecode(s: str) -> str: | ||
# First convert alpha entities (such as é) | ||
# (Inspired from http://mail.python.org/pipermail/python-list/2007-June/443813.html) | ||
def entity2char(m: re.Match[str]) -> str: | ||
def entity2char(m: Match[str]) -> str: | ||
entity = m.group(1) | ||
if entity in html.entities.name2codepoint: | ||
return chr(html.entities.name2codepoint[entity]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters