File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ Release 7.2.2 (in development)
4
4
Bugs fixed
5
5
----------
6
6
7
+ * Fixed membership testing (``in``) for the :py:class:`str` interface
8
+ of the asset classes (``_CascadingStyleSheet`` and ``_JavaScript``),
9
+ which several extensions relied upon.
7
10
8
11
Release 7.2.1 (released Aug 17, 2023)
9
12
=====================================
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ def __str__(self):
36
36
f'{ attr } )' )
37
37
38
38
def __eq__ (self , other ):
39
+ if isinstance (other , str ):
40
+ warnings .warn ('The str interface for _CascadingStyleSheet objects is deprecated. '
41
+ 'Use css.filename instead.' , RemovedInSphinx90Warning , stacklevel = 2 )
42
+ return self .filename == other
39
43
if not isinstance (other , _CascadingStyleSheet ):
40
44
return NotImplemented
41
45
return (self .filename == other .filename
@@ -88,6 +92,10 @@ def __str__(self):
88
92
f'{ attr } )' )
89
93
90
94
def __eq__ (self , other ):
95
+ if isinstance (other , str ):
96
+ warnings .warn ('The str interface for _JavaScript objects is deprecated. '
97
+ 'Use js.filename instead.' , RemovedInSphinx90Warning , stacklevel = 2 )
98
+ return self .filename == other
91
99
if not isinstance (other , _JavaScript ):
92
100
return NotImplemented
93
101
return (self .filename == other .filename
You can’t perform that action at this time.
0 commit comments