@@ -307,8 +307,7 @@ def init_highlighter(self) -> None:
307307
308308 @property
309309 def css_files (self ) -> list [_CascadingStyleSheet ]:
310- _deprecation_warning (__name__ , f'{ self .__class__ .__name__ } .css_files' , '' ,
311- remove = (9 , 0 ))
310+ _deprecation_warning (__name__ , f'{ self .__class__ .__name__ } .css_files' , remove = (9 , 0 ))
312311 return self ._css_files
313312
314313 def init_css_files (self ) -> None :
@@ -334,8 +333,8 @@ def add_css_file(self, filename: str, **kwargs: Any) -> None:
334333
335334 @property
336335 def script_files (self ) -> list [_JavaScript ]:
337- _deprecation_warning ( __name__ , f'{ self .__class__ .__name__ } .script_files' , '' ,
338- remove = (9 , 0 ))
336+ canonical_name = f'{ self .__class__ .__name__ } .script_files'
337+ _deprecation_warning ( __name__ , canonical_name , remove = (9 , 0 ))
339338 return self ._js_files
340339
341340 def init_js_files (self ) -> None :
@@ -1340,7 +1339,8 @@ def setup(app: Sphinx) -> ExtensionMetadata:
13401339 app .add_config_value ('html_search_scorer' , '' , '' )
13411340 app .add_config_value ('html_scaled_image_link' , True , 'html' )
13421341 app .add_config_value ('html_baseurl' , '' , 'html' )
1343- app .add_config_value ('html_codeblock_linenos_style' , 'inline' , 'html' , # RemovedInSphinx70Warning # NoQA: E501
1342+ # removal is indefinitely on hold (ref: https://github.com/sphinx-doc/sphinx/issues/10265)
1343+ app .add_config_value ('html_codeblock_linenos_style' , 'inline' , 'html' ,
13441344 ENUM ('table' , 'inline' ))
13451345 app .add_config_value ('html_math_renderer' , None , 'env' )
13461346 app .add_config_value ('html4_writer' , False , 'html' )
@@ -1373,8 +1373,8 @@ def setup(app: Sphinx) -> ExtensionMetadata:
13731373 }
13741374
13751375
1376- # deprecated name -> (object to return, canonical path or empty string)
1377- _DEPRECATED_OBJECTS = {
1376+ # deprecated name -> (object to return, canonical path or empty string, removal version )
1377+ _DEPRECATED_OBJECTS : dict [ str , tuple [ Any , str , tuple [ int , int ]]] = {
13781378 'Stylesheet' : (_CascadingStyleSheet , 'sphinx.builders.html._assets._CascadingStyleSheet' , (9 , 0 )), # NoQA: E501
13791379 'JavaScript' : (_JavaScript , 'sphinx.builders.html._assets._JavaScript' , (9 , 0 )),
13801380}
0 commit comments