Skip to content

Commit

Permalink
Merge pull request #961 from sphinx-contrib/deprecate-file-link-trans…
Browse files Browse the repository at this point in the history
…forms

flag file/link transforms as deprecated
  • Loading branch information
jdknight committed Apr 17, 2024
2 parents c24e898 + 4f5403b commit 1e1c328
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
42 changes: 18 additions & 24 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1819,18 +1819,6 @@ Advanced processing configuration
confluence_file_suffix = '.conf'
See also |confluence_file_transform|_.

.. |confluence_file_transform| replace:: ``confluence_file_transform``
.. _confluence_file_transform:

.. confval:: confluence_file_transform

A function to override the translation of a document name to a filename. The
provided function is used to perform translations for both Sphinx's
get_outdated_docs_ and write_doc_ methods. The default translation will be
the combination of "``docname`` + |confluence_file_suffix|_".

.. index:: Jira; Configuring Jira servers

.. _confluence_jira_servers:
Expand Down Expand Up @@ -1960,18 +1948,6 @@ Advanced processing configuration
confluence_link_suffix = '.conf'
See also |confluence_link_transform|_.

.. |confluence_link_transform| replace:: ``confluence_link_transform``
.. _confluence_link_transform:

.. confval:: confluence_link_transform

A function to override the translation of a document name to a (partial)
URI. The provided function is used to perform translations for both Sphinx's
get_relative_uri_ method. The default translation will be the combination of
"``docname`` + |confluence_link_suffix|_".

.. index:: Mentions; Configuration

.. _confluence_mentions:
Expand Down Expand Up @@ -2104,12 +2080,30 @@ Other options
Deprecated options
------------------

.. confval:: confluence_file_transform

.. versionchanged:: 2.6

A function to override the translation of a document name to a filename. The
provided function is used to perform translations for both Sphinx's
get_outdated_docs_ and write_doc_ methods. The default translation will be
the combination of "``docname`` + |confluence_file_suffix|_".

.. confval:: confluence_lang_transform

.. versionchanged:: 2.6

This option has been replaced by |confluence_lang_overrides|_.

.. confval:: confluence_link_transform

.. versionchanged:: 2.6

A function to override the translation of a document name to a (partial)
URI. The provided function is used to perform translations for both Sphinx's
get_relative_uri_ method. The default translation will be the combination of
"``docname`` + |confluence_link_suffix|_".

.. confval:: confluence_master_homepage

.. versionchanged:: 1.6
Expand Down
4 changes: 4 additions & 0 deletions sphinxcontrib/confluencebuilder/config/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
'to be removed in a future version',
'confluence_adv_writer_no_section_cap':
'to be removed in a future version',
'confluence_file_transform':
'capability to be dropped (please report if required)',
'confluence_link_transform':
'capability to be dropped (please report if required)',
'confluence_master_homepage':
'use "confluence_root_homepage" instead',
'confluence_max_doc_depth':
Expand Down
8 changes: 8 additions & 0 deletions tests/unit-tests/test_config_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ def test_config_check_file_suffix(self):
self._try_config()

def test_config_check_file_transform(self):
self.config['suppress_warnings'] = [
'confluence.deprecated',
]

def mock_transform(docname):
return docname + '.conf'

Expand Down Expand Up @@ -548,6 +552,10 @@ def test_config_check_link_suffix(self):
self._try_config()

def test_config_check_link_transform(self):
self.config['suppress_warnings'] = [
'confluence.deprecated',
]

def mock_transform(docname):
return docname + '.conf'

Expand Down

0 comments on commit 1e1c328

Please sign in to comment.