mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '4.3.x' into 4.x
This commit is contained in:
commit
441c2e306a
2
setup.py
2
setup.py
@ -43,7 +43,7 @@ extras_require = {
|
|||||||
'lint': [
|
'lint': [
|
||||||
'flake8>=3.5.0',
|
'flake8>=3.5.0',
|
||||||
'isort',
|
'isort',
|
||||||
'mypy>=0.930',
|
'mypy>=0.931',
|
||||||
'docutils-stubs',
|
'docutils-stubs',
|
||||||
"types-typed-ast",
|
"types-typed-ast",
|
||||||
"types-requests",
|
"types-requests",
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import os
|
import os
|
||||||
import warnings
|
import warnings
|
||||||
from os import path
|
from os import path
|
||||||
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, cast
|
from typing import TYPE_CHECKING, Any, Dict, List, Sequence, Tuple, cast
|
||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from docutils.nodes import Node, make_id, system_message
|
from docutils.nodes import Node, make_id, system_message
|
||||||
@ -68,7 +68,7 @@ class Figure(images.Figure):
|
|||||||
|
|
||||||
|
|
||||||
class Meta(MetaBase, SphinxDirective):
|
class Meta(MetaBase, SphinxDirective):
|
||||||
def run(self) -> List[Node]:
|
def run(self) -> Sequence[Node]:
|
||||||
result = super().run()
|
result = super().run()
|
||||||
for node in result:
|
for node in result:
|
||||||
# for docutils-0.17 or older. Since docutils-0.18, patching is no longer needed
|
# for docutils-0.17 or older. Since docutils-0.18, patching is no longer needed
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Locale utilities.
|
Locale utilities.
|
||||||
|
|
||||||
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -25,17 +25,17 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
# python-requests package in Debian jessie does not provide ``requests.packages.urllib3``.
|
# python-requests package in Debian jessie does not provide ``requests.packages.urllib3``.
|
||||||
# So try to import the exceptions from urllib3 package.
|
# So try to import the exceptions from urllib3 package.
|
||||||
from urllib3.exceptions import SSLError # type: ignore
|
from urllib3.exceptions import SSLError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
# for Debian-jessie
|
# for Debian-jessie
|
||||||
from urllib3.exceptions import InsecureRequestWarning # type: ignore
|
from urllib3.exceptions import InsecureRequestWarning
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# for requests < 2.4.0
|
# for requests < 2.4.0
|
||||||
InsecureRequestWarning = None # type: ignore
|
InsecureRequestWarning = None
|
||||||
|
|
||||||
|
|
||||||
useragent_header = [('User-Agent',
|
useragent_header = [('User-Agent',
|
||||||
|
Loading…
Reference in New Issue
Block a user