summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES21
-rw-r--r--doc/conf.py6
-rw-r--r--sphinx/__init__.py6
-rw-r--r--sphinx/ext/extlinks.py18
4 files changed, 37 insertions, 14 deletions
diff --git a/CHANGES b/CHANGES
index 33b41a5c6..0d3ffd27c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,24 @@
+Release 5.0.0 (in development)
+==============================
+
+Dependencies
+------------
+
+Incompatible changes
+--------------------
+
+Deprecated
+----------
+
+Features added
+--------------
+
+Bugs fixed
+----------
+
+Testing
+--------
+
Release 4.1.0 (in development)
==============================
diff --git a/doc/conf.py b/doc/conf.py
index add9e8d61..eae4b3b68 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -81,11 +81,11 @@ autodoc_member_order = 'groupwise'
autosummary_generate = False
todo_include_todos = True
extlinks = {'duref': ('https://docutils.sourceforge.io/docs/ref/rst/'
- 'restructuredtext.html#%s', ''),
+ 'restructuredtext.html#%s', '%s'),
'durole': ('https://docutils.sourceforge.io/docs/ref/rst/'
- 'roles.html#%s', ''),
+ 'roles.html#%s', '%s'),
'dudir': ('https://docutils.sourceforge.io/docs/ref/rst/'
- 'directives.html#%s', '')}
+ 'directives.html#%s', '%s')}
man_pages = [
('contents', 'sphinx-all', 'Sphinx documentation generator system manual',
diff --git a/sphinx/__init__.py b/sphinx/__init__.py
index a1de1402b..b8865f4e1 100644
--- a/sphinx/__init__.py
+++ b/sphinx/__init__.py
@@ -27,8 +27,8 @@ if 'PYTHONWARNINGS' not in os.environ:
warnings.filterwarnings('ignore', "'U' mode is deprecated",
DeprecationWarning, module='docutils.io')
-__version__ = '4.1.0'
-__released__ = '4.1.0' # used when Sphinx builds its own docs
+__version__ = '5.0.0+'
+__released__ = '5.0.0' # used when Sphinx builds its own docs
#: Version info for better programmatic use.
#:
@@ -38,7 +38,7 @@ __released__ = '4.1.0' # used when Sphinx builds its own docs
#:
#: .. versionadded:: 1.2
#: Before version 1.2, check the string ``sphinx.__version__``.
-version_info = (4, 1, 0, 'final', 0)
+version_info = (5, 0, 0, 'final', 0)
package_dir = path.abspath(path.dirname(__file__))
diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py
index 0af335686..df9f96e92 100644
--- a/sphinx/ext/extlinks.py
+++ b/sphinx/ext/extlinks.py
@@ -25,7 +25,6 @@
:license: BSD, see LICENSE for details.
"""
-import warnings
from typing import Any, Dict, List, Tuple
from docutils import nodes, utils
@@ -34,10 +33,13 @@ from docutils.parsers.rst.states import Inliner
import sphinx
from sphinx.application import Sphinx
-from sphinx.deprecation import RemovedInSphinx60Warning
+from sphinx.locale import __
+from sphinx.util import logging
from sphinx.util.nodes import split_explicit_title
from sphinx.util.typing import RoleFunction
+logger = logging.getLogger(__name__)
+
def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction:
# Check whether we have base_url and caption strings have an '%s' for
@@ -48,17 +50,17 @@ def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction:
try:
base_url % 'dummy'
except (TypeError, ValueError):
- warnings.warn('extlinks: Sphinx-6.0 will require base URL to '
- 'contain exactly one \'%s\' and all other \'%\' need '
- 'to be escaped as \'%%\'.', RemovedInSphinx60Warning)
+ logger.warn(__('extlinks: Sphinx-6.0 will require base URL to '
+ 'contain exactly one \'%s\' and all other \'%\' need '
+ 'to be escaped as \'%%\'.')) # RemovedInSphinx60Warning
base_url = base_url.replace('%', '%%') + '%s'
if caption is not None:
try:
caption % 'dummy'
except (TypeError, ValueError):
- warnings.warn('extlinks: Sphinx-6.0 will require a caption string to '
- 'contain exactly one \'%s\' and all other \'%\' need '
- 'to be escaped as \'%%\'.', RemovedInSphinx60Warning)
+ logger.warning(__('extlinks: Sphinx-6.0 will require a caption string to '
+ 'contain exactly one \'%s\' and all other \'%\' need '
+ 'to be escaped as \'%%\'.')) # RemovedInSphinx60Warning
caption = caption.replace('%', '%%') + '%s'
def role(typ: str, rawtext: str, text: str, lineno: int,