Sphinx 7.3.5__py3-none-any.whl → 7.3.6__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.3.5'
3
+ __version__ = '7.3.6'
4
4
  __display_version__ = __version__ # used for command line version
5
5
 
6
6
  # Keep this file executable as-is in Python 3!
@@ -28,7 +28,7 @@ warnings.filterwarnings(
28
28
  #:
29
29
  #: .. versionadded:: 1.2
30
30
  #: Before version 1.2, check the string ``sphinx.__version__``.
31
- version_info = (7, 3, 5, 'final', 0)
31
+ version_info = (7, 3, 6, 'final', 0)
32
32
 
33
33
  package_dir = path.abspath(path.dirname(__file__))
34
34
 
sphinx/config.py CHANGED
@@ -51,30 +51,28 @@ class ConfigValue(NamedTuple):
51
51
  rebuild: _ConfigRebuild
52
52
 
53
53
 
54
- def is_serializable(obj: object, *, _recursive_guard: frozenset[int] = frozenset()) -> bool:
55
- """Check if object is serializable or not."""
54
+ def is_serializable(obj: object, *, _seen: frozenset[int] = frozenset()) -> bool:
55
+ """Check if an object is serializable or not."""
56
56
  if isinstance(obj, UNSERIALIZABLE_TYPES):
57
57
  return False
58
58
 
59
59
  # use id() to handle un-hashable objects
60
- if id(obj) in _recursive_guard:
60
+ if id(obj) in _seen:
61
61
  return True
62
62
 
63
63
  if isinstance(obj, dict):
64
- guard = _recursive_guard | {id(obj)}
65
- for key, value in obj.items():
66
- if (
67
- not is_serializable(key, _recursive_guard=guard)
68
- or not is_serializable(value, _recursive_guard=guard)
69
- ):
70
- return False
64
+ seen = _seen | {id(obj)}
65
+ return all(
66
+ is_serializable(key, _seen=seen) and is_serializable(value, _seen=seen)
67
+ for key, value in obj.items()
68
+ )
71
69
  elif isinstance(obj, (list, tuple, set, frozenset)):
72
- guard = _recursive_guard | {id(obj)}
73
- return all(is_serializable(item, _recursive_guard=guard) for item in obj)
70
+ seen = _seen | {id(obj)}
71
+ return all(is_serializable(item, _seen=seen) for item in obj)
74
72
 
75
73
  # if an issue occurs for a non-serializable type, pickle will complain
76
- # since the object is likely coming from a third-party extension (we
77
- # natively expect 'simple' types and not weird ones)
74
+ # since the object is likely coming from a third-party extension
75
+ # (we natively expect 'simple' types and not weird ones)
78
76
  return True
79
77
 
80
78
 
@@ -473,7 +471,8 @@ class Config:
473
471
  # will always mark the config value as changed,
474
472
  # and thus always invalidate the cache and perform a rebuild.
475
473
  logger.warning(
476
- __('cannot cache unpickable configuration value: %r'),
474
+ __('cannot cache unpickable configuration value: %r '
475
+ '(because it contains a function, class, or module object)'),
477
476
  name,
478
477
  type='config',
479
478
  subtype='cache',
@@ -44,6 +44,59 @@ if TYPE_CHECKING:
44
44
  from sphinx.environment import BuildEnvironment
45
45
  from sphinx.util.typing import ExtensionMetadata, OptionSpec
46
46
 
47
+ # re-export objects for backwards compatibility
48
+ # xref https://github.com/sphinx-doc/sphinx/issues/12295
49
+ from sphinx.domains.c._ast import ( # NoQA: F401
50
+ ASTAlignofExpr,
51
+ ASTArray,
52
+ ASTAssignmentExpr,
53
+ ASTBase,
54
+ ASTBinOpExpr,
55
+ ASTBooleanLiteral,
56
+ ASTBracedInitList,
57
+ ASTCastExpr,
58
+ ASTCharLiteral,
59
+ ASTDeclarator,
60
+ ASTDeclaratorNameBitField,
61
+ ASTDeclaratorNameParam,
62
+ ASTDeclaratorParen,
63
+ ASTDeclaratorPtr,
64
+ ASTDeclSpecs,
65
+ ASTDeclSpecsSimple,
66
+ ASTEnum,
67
+ ASTEnumerator,
68
+ ASTExpression,
69
+ ASTFallbackExpr,
70
+ ASTFunctionParameter,
71
+ ASTIdExpression,
72
+ ASTInitializer,
73
+ ASTLiteral,
74
+ ASTMacro,
75
+ ASTMacroParameter,
76
+ ASTNumberLiteral,
77
+ ASTParameters,
78
+ ASTParenExpr,
79
+ ASTParenExprList,
80
+ ASTPostfixArray,
81
+ ASTPostfixCallExpr,
82
+ ASTPostfixDec,
83
+ ASTPostfixExpr,
84
+ ASTPostfixInc,
85
+ ASTPostfixMemberOfPointer,
86
+ ASTPostfixOp,
87
+ ASTSizeofExpr,
88
+ ASTSizeofType,
89
+ ASTStringLiteral,
90
+ ASTStruct,
91
+ ASTTrailingTypeSpec,
92
+ ASTTrailingTypeSpecFundamental,
93
+ ASTTrailingTypeSpecName,
94
+ ASTType,
95
+ ASTTypeWithInit,
96
+ ASTUnaryOpExpr,
97
+ ASTUnion,
98
+ )
99
+
47
100
  logger = logging.getLogger(__name__)
48
101
 
49
102
 
@@ -48,6 +48,98 @@ if TYPE_CHECKING:
48
48
  from sphinx.environment import BuildEnvironment
49
49
  from sphinx.util.typing import ExtensionMetadata, OptionSpec
50
50
 
51
+ # re-export objects for backwards compatibility
52
+ # xref https://github.com/sphinx-doc/sphinx/issues/12295
53
+ from sphinx.domains.cpp._ast import ( # NoQA: F401
54
+ ASTAlignofExpr,
55
+ ASTArray,
56
+ ASTAssignmentExpr,
57
+ ASTBase,
58
+ ASTBaseClass,
59
+ ASTBinOpExpr,
60
+ ASTBooleanLiteral,
61
+ ASTBracedInitList,
62
+ ASTCastExpr,
63
+ ASTCharLiteral,
64
+ ASTClass,
65
+ ASTCommaExpr,
66
+ ASTConcept,
67
+ ASTConditionalExpr,
68
+ ASTDeclarator,
69
+ ASTDeclaratorMemPtr,
70
+ ASTDeclaratorNameBitField,
71
+ ASTDeclaratorNameParamQual,
72
+ ASTDeclaratorParamPack,
73
+ ASTDeclaratorParen,
74
+ ASTDeclaratorPtr,
75
+ ASTDeclaratorRef,
76
+ ASTDeclSpecs,
77
+ ASTDeclSpecsSimple,
78
+ ASTDeleteExpr,
79
+ ASTEnum,
80
+ ASTEnumerator,
81
+ ASTExplicitCast,
82
+ ASTExplicitSpec,
83
+ ASTExpression,
84
+ ASTFallbackExpr,
85
+ ASTFoldExpr,
86
+ ASTFunctionParameter,
87
+ ASTIdExpression,
88
+ ASTInitializer,
89
+ ASTLiteral,
90
+ ASTNewExpr,
91
+ ASTNoexceptExpr,
92
+ ASTNoexceptSpec,
93
+ ASTNumberLiteral,
94
+ ASTOperator,
95
+ ASTOperatorBuildIn,
96
+ ASTOperatorLiteral,
97
+ ASTOperatorType,
98
+ ASTPackExpansionExpr,
99
+ ASTParametersQualifiers,
100
+ ASTParenExpr,
101
+ ASTParenExprList,
102
+ ASTPointerLiteral,
103
+ ASTPostfixArray,
104
+ ASTPostfixCallExpr,
105
+ ASTPostfixDec,
106
+ ASTPostfixExpr,
107
+ ASTPostfixInc,
108
+ ASTPostfixMember,
109
+ ASTPostfixMemberOfPointer,
110
+ ASTPostfixOp,
111
+ ASTRequiresClause,
112
+ ASTSizeofExpr,
113
+ ASTSizeofParamPack,
114
+ ASTSizeofType,
115
+ ASTStringLiteral,
116
+ ASTTemplateArgConstant,
117
+ ASTTemplateArgs,
118
+ ASTTemplateDeclarationPrefix,
119
+ ASTTemplateIntroduction,
120
+ ASTTemplateIntroductionParameter,
121
+ ASTTemplateKeyParamPackIdDefault,
122
+ ASTTemplateParam,
123
+ ASTTemplateParamConstrainedTypeWithInit,
124
+ ASTTemplateParamNonType,
125
+ ASTTemplateParams,
126
+ ASTTemplateParamTemplateType,
127
+ ASTTemplateParamType,
128
+ ASTThisLiteral,
129
+ ASTTrailingTypeSpec,
130
+ ASTTrailingTypeSpecDecltype,
131
+ ASTTrailingTypeSpecDecltypeAuto,
132
+ ASTTrailingTypeSpecFundamental,
133
+ ASTTrailingTypeSpecName,
134
+ ASTType,
135
+ ASTTypeId,
136
+ ASTTypeUsing,
137
+ ASTTypeWithInit,
138
+ ASTUnaryOpExpr,
139
+ ASTUnion,
140
+ ASTUserDefinedLiteral,
141
+ )
142
+
51
143
  logger = logging.getLogger(__name__)
52
144
 
53
145
 
@@ -38,12 +38,15 @@ if TYPE_CHECKING:
38
38
 
39
39
  # re-export objects for backwards compatibility
40
40
  # xref https://github.com/sphinx-doc/sphinx/issues/12295
41
+ from sphinx.domains.python._annotations import ( # NoQA: F401
42
+ _parse_arglist, # for sphinx-immaterial
43
+ type_to_xref,
44
+ )
41
45
  from sphinx.domains.python._object import ( # NoQA: F401
42
46
  PyField,
43
47
  PyGroupedField,
44
48
  PyTypedField,
45
49
  PyXrefMixin,
46
- py_sig_re,
47
50
  )
48
51
 
49
52
  logger = logging.getLogger(__name__)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Sphinx
3
- Version: 7.3.5
3
+ Version: 7.3.6
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=xwB-1xnP8xOaVq3e22IK3dZVTFoHaiQIRPMHjH8pevM,1694
1
+ sphinx/__init__.py,sha256=LTeGLLcGjWSnQHAbpVTJWMAQAhCy-TQMYkBehF_ituk,1694
2
2
  sphinx/__main__.py,sha256=wIifwXlZHdi4gtQmkJ6KF0BsflvD9o0Wd5nARTdJc8A,127
3
3
  sphinx/addnodes.py,sha256=EQTIi9Zta6DaNa-2WGE3l9AVjdp7WzwwrfwRnax8vXE,18707
4
4
  sphinx/application.py,sha256=ICEmiMaOt4m0Wl2GBeHHulbZNcDvEpXMyfVuzDxcEhk,56266
5
- sphinx/config.py,sha256=g7XAMEnrqq66hwPbzSxnooyeJl_UrEagFQ0SPxnXEtw,30085
5
+ sphinx/config.py,sha256=qOPk7Mt41Wins29EO2Xb_X91gL4cxIRBCU-O0i00Gzw,30039
6
6
  sphinx/deprecation.py,sha256=ABIo1t4mSwCTT2uxpUKNcwQHb3X6qur_tziCWzIhqtE,2437
7
7
  sphinx/errors.py,sha256=mFyE7P1fmnVTeYtpP3wv8oXrKyTw1H0WcE46VypUPd0,3412
8
8
  sphinx/events.py,sha256=3GE0v6gIu81Llbed-6zBPDy9G1a-tY9Z1ujUIGBBN5M,4351
@@ -55,17 +55,17 @@ sphinx/domains/index.py,sha256=3eHbatgPlpfeEbJtqQ6HfBQlEFSem9rYG8fdMUExypU,4266
55
55
  sphinx/domains/javascript.py,sha256=vGuLe4mtbVzwXyWfHuDQIyFpACKo_2TXTFUaUCw6ebU,19444
56
56
  sphinx/domains/math.py,sha256=56YFKQ0o5o2ep9EZ8IobFIsgHpKrOYonSsqjGs_b6EE,5655
57
57
  sphinx/domains/rst.py,sha256=8nsCjM2GNScWq56u0MC1GaZxlSWBUfXLl_qCYVYdVFU,10696
58
- sphinx/domains/c/__init__.py,sha256=kJKWgiC_6tb-Ueomooj4Up78k_ez7MtVxpqBhFt-E30,31467
58
+ sphinx/domains/c/__init__.py,sha256=SmpOFHMVw65CN3jDuS7WLOoNe0wKsazM6P_4hEqlZAg,32620
59
59
  sphinx/domains/c/_ast.py,sha256=C7UD3KNf-LZjOPzZ04zfdbm5G0wy-4wGIpLPPdZnSuY,52724
60
60
  sphinx/domains/c/_ids.py,sha256=R_6xOt4CSGmDxkXwJ5MElKhLLjkZSJdZdvwIr0VvEoM,2220
61
61
  sphinx/domains/c/_parser.py,sha256=1jTwk2nHwZqDq5PCd2bxhmA8ElO9WBwHGCniaynH4Zs,41261
62
62
  sphinx/domains/c/_symbol.py,sha256=dmmsF1tNcDGw_rOMRywjqc3DkKxWWFvKRr4Eel15j5A,28256
63
- sphinx/domains/cpp/__init__.py,sha256=hlNSpvBCtW2DR98vFq8cRs86X5U1LQmy_hdHzOupY8U,45018
63
+ sphinx/domains/cpp/__init__.py,sha256=y9QfCqlleF9Q5K_HSzafjgzqUSsX-EEpX0IxgGJHkdo,47157
64
64
  sphinx/domains/cpp/_ast.py,sha256=P2yAf7gCCtUSZrMdDn6m9dd6-MhhAcvRFQtDGwqO23w,137953
65
65
  sphinx/domains/cpp/_ids.py,sha256=-h42RrmFnuq4AyZ0EVHtAk_H_9Umrca24Tu-w73TKCw,18028
66
66
  sphinx/domains/cpp/_parser.py,sha256=EaKoUzpUgZnAFKZYfOBl_-Iw8z2LdYxfZtdWglpSE3Q,88250
67
67
  sphinx/domains/cpp/_symbol.py,sha256=pyjUC0tvGs_3j8Qlafw5u9EUAQyPqj5ukbbE8LUkEUo,48775
68
- sphinx/domains/python/__init__.py,sha256=j51-9Pm7H0lrzQP9fO81rOpIce2A2VUdjv49kgju-iQ,33958
68
+ sphinx/domains/python/__init__.py,sha256=2xt9rkJsIWmcji1QfwYkMDTXEsJcMO9fvmruZ4BwtbU,34071
69
69
  sphinx/domains/python/_annotations.py,sha256=bLay4nHo1L7KxfX2exE2ttTLqwOnMBDVEg7r6v_YeSY,22302
70
70
  sphinx/domains/python/_object.py,sha256=Kds5Z-5bNNh2dIgStb6bEu0l9y-bC8Rga4jz1lzwGwU,17000
71
71
  sphinx/domains/std/__init__.py,sha256=rQ4gJSs74w7PQDjJ4Qu2vBcr0_kpXyUXA897BOjlEQc,46277
@@ -574,8 +574,8 @@ sphinx/writers/manpage.py,sha256=nLPgs3A5mVouhjiY2Olfoxh7PTFUZc1stHhThGDRSM4,161
574
574
  sphinx/writers/texinfo.py,sha256=YaVcaaK533HWd14FJkBJwkZZNL5Yh6rv2rcFrkhR4SU,53220
575
575
  sphinx/writers/text.py,sha256=HEiYXsWXO9QVOazg2V3D0ehGTnK38dAtYP9v0rst684,42964
576
576
  sphinx/writers/xml.py,sha256=NyDl82hCFSRiHrCZV6vBfn4AsAyXH6khtSJEfhOX8a0,1502
577
- sphinx-7.3.5.dist-info/entry_points.txt,sha256=KU_c9jqXj7yyZylSz11XRIXG3gAZApQa0d5DmcfyA7M,188
578
- sphinx-7.3.5.dist-info/LICENSE.rst,sha256=HdZPUFcmQaLySBc9fKvRC5aOUNkxL9Gz5py0p6XGDk4,3135
579
- sphinx-7.3.5.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
580
- sphinx-7.3.5.dist-info/METADATA,sha256=Rf0VlooekrRJUqECzZzuf5EDmzbNI7KQQfiLXmhGr3U,6021
581
- sphinx-7.3.5.dist-info/RECORD,,
577
+ sphinx-7.3.6.dist-info/entry_points.txt,sha256=KU_c9jqXj7yyZylSz11XRIXG3gAZApQa0d5DmcfyA7M,188
578
+ sphinx-7.3.6.dist-info/LICENSE.rst,sha256=HdZPUFcmQaLySBc9fKvRC5aOUNkxL9Gz5py0p6XGDk4,3135
579
+ sphinx-7.3.6.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
580
+ sphinx-7.3.6.dist-info/METADATA,sha256=FMYzRS9LhpvrlDPgc2zyDugkBf5CHN5N4YEqQqK67gk,6021
581
+ sphinx-7.3.6.dist-info/RECORD,,
File without changes