Sphinx 7.4.2__py3-none-any.whl → 7.4.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Sphinx might be problematic. Click here for more details.

sphinx/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """The Sphinx documentation toolchain."""
2
2
 
3
- __version__ = '7.4.2'
3
+ __version__ = '7.4.4'
4
4
  __display_version__ = __version__ # used for command line version
5
5
 
6
6
  # Keep this file executable as-is in Python 3!
@@ -27,7 +27,7 @@ warnings.filterwarnings(
27
27
  #:
28
28
  #: .. versionadded:: 1.2
29
29
  #: Before version 1.2, check the string ``sphinx.__version__``.
30
- version_info = (7, 4, 2, 'final', 0)
30
+ version_info = (7, 4, 4, 'final', 0)
31
31
 
32
32
  package_dir = os.path.abspath(os.path.dirname(__file__))
33
33
 
sphinx/config.py CHANGED
@@ -582,13 +582,17 @@ def convert_source_suffix(app: Sphinx, config: Config) -> None:
582
582
  # The default filetype is determined on later step.
583
583
  # By default, it is considered as restructuredtext.
584
584
  config.source_suffix = {source_suffix: 'restructuredtext'}
585
+ logger.info(__("Converting `source_suffix = %r` to `source_suffix = %r`."),
586
+ source_suffix, config.source_suffix)
585
587
  elif isinstance(source_suffix, (list, tuple)):
586
588
  # if list, considers as all of them are default filetype
587
589
  config.source_suffix = dict.fromkeys(source_suffix, 'restructuredtext')
590
+ logger.info(__("Converting `source_suffix = %r` to `source_suffix = %r`."),
591
+ source_suffix, config.source_suffix)
588
592
  elif not isinstance(source_suffix, dict):
589
- logger.warning(__("The config value `source_suffix' expects "
590
- "a string, list of strings, or dictionary. "
591
- "But `%r' is given." % source_suffix))
593
+ msg = __("The config value `source_suffix' expects a dictionary,"
594
+ "a string, or a list of strings. Got `%r' instead (type %s).")
595
+ raise ConfigError(msg % (source_suffix, type(source_suffix)))
592
596
 
593
597
 
594
598
  def convert_highlight_options(app: Sphinx, config: Config) -> None:
sphinx/registry.py CHANGED
@@ -504,10 +504,14 @@ def merge_source_suffix(app: Sphinx, config: Config) -> None:
504
504
  for suffix, filetype in app.registry.source_suffix.items():
505
505
  if suffix not in app.config.source_suffix: # NoQA: SIM114
506
506
  app.config.source_suffix[suffix] = filetype
507
- elif app.config.source_suffix[suffix] is None:
508
- # filetype is not specified (default filetype).
507
+ elif app.config.source_suffix[suffix] == 'restructuredtext':
508
+ # The filetype is not specified (default filetype).
509
509
  # So it overrides default filetype by extensions setting.
510
510
  app.config.source_suffix[suffix] = filetype
511
+ elif app.config.source_suffix[suffix] is None:
512
+ msg = __('`None` is not a valid filetype for %r.') % suffix
513
+ logger.warning(msg)
514
+ app.config.source_suffix[suffix] = filetype
511
515
 
512
516
  # copy config.source_suffix to registry
513
517
  app.registry.source_suffix = app.config.source_suffix
sphinx/util/inventory.py CHANGED
@@ -126,7 +126,8 @@ class InventoryFile:
126
126
  invdata: Inventory = {}
127
127
  projname = stream.readline().rstrip()[11:]
128
128
  version = stream.readline().rstrip()[11:]
129
- potential_ambiguities = set()
129
+ # definition -> priority, location, display name
130
+ potential_ambiguities: dict[str, tuple[str, str, str]] = {}
130
131
  actual_ambiguities = set()
131
132
  line = stream.readline()
132
133
  if 'zlib' not in line:
@@ -155,10 +156,16 @@ class InventoryFile:
155
156
  # * 'term': https://github.com/sphinx-doc/sphinx/issues/9291
156
157
  # * 'label': https://github.com/sphinx-doc/sphinx/issues/12008
157
158
  definition = f"{type}:{name}"
158
- if definition.lower() in potential_ambiguities:
159
- actual_ambiguities.add(definition)
159
+ content = prio, location, dispname
160
+ lowercase_definition = definition.lower()
161
+ if lowercase_definition in potential_ambiguities:
162
+ if potential_ambiguities[lowercase_definition] != content:
163
+ actual_ambiguities.add(definition)
164
+ else:
165
+ logger.debug(__("inventory <%s> contains duplicate definitions of %s"),
166
+ uri, definition, type='intersphinx', subtype='external')
160
167
  else:
161
- potential_ambiguities.add(definition.lower())
168
+ potential_ambiguities[lowercase_definition] = content
162
169
  if location.endswith('$'):
163
170
  location = location[:-1] + name
164
171
  location = join(uri, location)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Sphinx
3
- Version: 7.4.2
3
+ Version: 7.4.4
4
4
  Summary: Python documentation generator
5
5
  Author-email: Georg Brandl <georg@python.org>
6
6
  Requires-Python: >=3.9
@@ -1,8 +1,8 @@
1
- sphinx/__init__.py,sha256=lDK1jQBltbq6fbBeFLlrGp62wnx3ipLhR8LBPyXErR0,1690
1
+ sphinx/__init__.py,sha256=rQisav1KDhuasqIZKggouqZKK_GxVoyJwW-MUUIH2MM,1690
2
2
  sphinx/__main__.py,sha256=wIifwXlZHdi4gtQmkJ6KF0BsflvD9o0Wd5nARTdJc8A,127
3
3
  sphinx/addnodes.py,sha256=EQTIi9Zta6DaNa-2WGE3l9AVjdp7WzwwrfwRnax8vXE,18707
4
4
  sphinx/application.py,sha256=5QXM7tYRt1s4q00GHPtAK2EIxu6G_UkzMB3MOKOkuUI,57793
5
- sphinx/config.py,sha256=us4U_j4FbDKTOZ0q3xqS2kEonC1yvlaMLLSERKgzmQc,30879
5
+ sphinx/config.py,sha256=8q1CB3Yr4LXrYqOyiw_OUxLsTaWjihONrOyLnNQ3_9g,31179
6
6
  sphinx/deprecation.py,sha256=ABIo1t4mSwCTT2uxpUKNcwQHb3X6qur_tziCWzIhqtE,2437
7
7
  sphinx/errors.py,sha256=mFyE7P1fmnVTeYtpP3wv8oXrKyTw1H0WcE46VypUPd0,3412
8
8
  sphinx/events.py,sha256=zb0K0Mq2a_MRr6lwLaD8ODhUnASd16vmYI8rKc_g-KY,4383
@@ -14,7 +14,7 @@ sphinx/parsers.py,sha256=86Yn9xUBWWe8FxvDf1_BlEzqvSDZ8AMFeYJCbx7AtMQ,3179
14
14
  sphinx/project.py,sha256=t8mzAJgG6nvYFbm94VMik4PuCd3YAN4lux9-EZV981M,4389
15
15
  sphinx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  sphinx/pygments_styles.py,sha256=0RJn6WC7rPnQu7BDqrqb0gkJcb3elRfizGVBW9bcmRE,2861
17
- sphinx/registry.py,sha256=LCWv2mDKNiN6IaE5tgUeWzmff9SFN7UWYwEN3QxbK4Q,22593
17
+ sphinx/registry.py,sha256=RQoHNd0VaHEFD3fGBbELJlNuVsEhTDi0jqNnBdO8eyY,22826
18
18
  sphinx/roles.py,sha256=mTnbo0R6w5V9wlOmx2BU4P0MnpSj0csE9zeEdqT06zs,16966
19
19
  sphinx/theming.py,sha256=M9fQgECyQevHffOUZFR9MVHg0IHWv18TDSx8UVvTP_U,20312
20
20
  sphinx/versioning.py,sha256=IlROZblXuBBJGLgQkcuCiWa4DNDm3iNUrvHmzayASps,6240
@@ -561,7 +561,7 @@ sphinx/util/i18n.py,sha256=K5smw0FQ3Hkr4Bp17o2BQRMK-8s76edJPsdWgLT5AFM,10542
561
561
  sphinx/util/images.py,sha256=Y5Oy1M_BD6HRsUyWFQ2DvvCL4VDOFHDPZxtYnO8QEfM,3701
562
562
  sphinx/util/index_entries.py,sha256=wEa55m_tez3UFNFEVuIesEQKWavANQ2O-l86k1If0sY,986
563
563
  sphinx/util/inspect.py,sha256=BdltEA-0lZKhCcCa3DmS7kIV7Xf5KZS6d8VKf6uLNMI,33077
564
- sphinx/util/inventory.py,sha256=qaOeDG0HbuD1EKcD1l3fnLtY3ohENEFrixoUBT6tzBU,7467
564
+ sphinx/util/inventory.py,sha256=qjbSlk51LQY2gXZW_d8i3-pyUewisaFpj955jf2IFz0,7973
565
565
  sphinx/util/logging.py,sha256=WokXNrpfjX7kekEE6N59MitS23DzdCpyEw0GTiQovug,20542
566
566
  sphinx/util/matching.py,sha256=pywT5EKjUUJ-PX4H6mm-LA3f37AvYfxwEpraHHrhVsI,5368
567
567
  sphinx/util/math.py,sha256=GuBqbvunQfOE2JpxjFsUoWwujDhWaYELczJIyNGzLhE,1984
@@ -584,8 +584,8 @@ sphinx/writers/manpage.py,sha256=iLoC4i81W52dTl8Kpug65CV1M7cCz1buGgsN7FhazYo,162
584
584
  sphinx/writers/texinfo.py,sha256=UU3Zrt-zBgdwYgqj4BJFNthggzMr_Gllx2ewBeWrkcI,53451
585
585
  sphinx/writers/text.py,sha256=HEiYXsWXO9QVOazg2V3D0ehGTnK38dAtYP9v0rst684,42964
586
586
  sphinx/writers/xml.py,sha256=NyDl82hCFSRiHrCZV6vBfn4AsAyXH6khtSJEfhOX8a0,1502
587
- sphinx-7.4.2.dist-info/entry_points.txt,sha256=KU_c9jqXj7yyZylSz11XRIXG3gAZApQa0d5DmcfyA7M,188
588
- sphinx-7.4.2.dist-info/LICENSE.rst,sha256=HdZPUFcmQaLySBc9fKvRC5aOUNkxL9Gz5py0p6XGDk4,3135
589
- sphinx-7.4.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
590
- sphinx-7.4.2.dist-info/METADATA,sha256=FR4tZh9yXkMubBSP2JCgiwF_EG6fMmBxZkJ8qHYQonQ,6113
591
- sphinx-7.4.2.dist-info/RECORD,,
587
+ sphinx-7.4.4.dist-info/entry_points.txt,sha256=KU_c9jqXj7yyZylSz11XRIXG3gAZApQa0d5DmcfyA7M,188
588
+ sphinx-7.4.4.dist-info/LICENSE.rst,sha256=HdZPUFcmQaLySBc9fKvRC5aOUNkxL9Gz5py0p6XGDk4,3135
589
+ sphinx-7.4.4.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
590
+ sphinx-7.4.4.dist-info/METADATA,sha256=PSou9ENgREao62zCI8w7DVwEM19axj7bP3FBqVVawDU,6113
591
+ sphinx-7.4.4.dist-info/RECORD,,
File without changes