Discussion:
Deprecation of css_files
(too old to reply)
Aaron Carlisle
2018-01-16 21:17:00 UTC
Permalink
A while back css_files was marked deprecation and users should use app.add_stylesheet()
instead. However, this just simply uses css_files internally. So what will
eventually happen? Will app.add_stylesheet() use a different method in the
builder to add css_files. I guess this also matters for themes that have:

{%- for css in css_files %}
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2018-01-17 02:04:45 UTC
Permalink
Hi,

Since Sphinx-1.6, css_files started to support title and rel attribute
for its link tags.
At that time, we changed internal structure of css_files from list of
str to list of struct.
So we call deprecation for modifying it directly.

Could you check your theme file modifies css_files directly?
For example, the following code will be warned:

css_files = css_files + ['path/to/style.css']
css_files.append('path/to/style.css')

Thanks,
Takeshi KOMIYA
Post by Aaron Carlisle
A while back css_files was marked deprecation and users should use
app.add_stylesheet() instead. However, this just simply uses css_files
internally. So what will eventually happen? Will app.add_stylesheet() use a
different method in the builder to add css_files. I guess this also matters
{%- for css in css_files %}
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Aaron Carlisle
2018-01-17 02:36:28 UTC
Permalink
Ok,

We are only using:

`for cssfile in css_files`

Which if I understand correctly will still be appropriate usage.
Post by Komiya Takeshi
Hi,
Since Sphinx-1.6, css_files started to support title and rel attribute
for its link tags.
At that time, we changed internal structure of css_files from list of
str to list of struct.
So we call deprecation for modifying it directly.
Could you check your theme file modifies css_files directly?
css_files = css_files + ['path/to/style.css']
css_files.append('path/to/style.css')
Thanks,
Takeshi KOMIYA
Post by Aaron Carlisle
A while back css_files was marked deprecation and users should use
app.add_stylesheet() instead. However, this just simply uses css_files
internally. So what will eventually happen? Will app.add_stylesheet()
use a
Post by Aaron Carlisle
different method in the builder to add css_files. I guess this also
matters
Post by Aaron Carlisle
{%- for css in css_files %}
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "sphinx-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/sphinx-dev/bvnF6Grw224/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Aaron Carlisle

Picture taker | Bit cruncher | Pixel pusher | Document writer |
Project administrator for the Blender 3D Documentation Project
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2018-01-17 12:18:17 UTC
Permalink
Yes, the usage is not deprecated.

Could you re-build with PYTHONWARNINGS=error envvar?
Then you'll see where the deprecation warning raised from.
Post by Aaron Carlisle
Ok,
`for cssfile in css_files`
Which if I understand correctly will still be appropriate usage.
Post by Komiya Takeshi
Hi,
Since Sphinx-1.6, css_files started to support title and rel attribute
for its link tags.
At that time, we changed internal structure of css_files from list of
str to list of struct.
So we call deprecation for modifying it directly.
Could you check your theme file modifies css_files directly?
css_files = css_files + ['path/to/style.css']
css_files.append('path/to/style.css')
Thanks,
Takeshi KOMIYA
Post by Aaron Carlisle
A while back css_files was marked deprecation and users should use
app.add_stylesheet() instead. However, this just simply uses css_files
internally. So what will eventually happen? Will app.add_stylesheet() use a
different method in the builder to add css_files. I guess this also matters
{%- for css in css_files %}
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "sphinx-dev" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/sphinx-dev/bvnF6Grw224/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
Aaron Carlisle
Picture taker | Bit cruncher | Pixel pusher | Document writer |
Project administrator for the Blender 3D Documentation Project
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...