Open trevorbaca opened 1 year ago
container
is a built-in directive in docutils, so this probably isn't related to uqbar. But I'll look into it.
What version of Sphinx are you on now? sphinx-build --version
will spit it out. I'm on 5.3.0.
I am using the .. container:: example
directive over in supriya: https://github.com/josiah-wolf-oberholtzer/supriya/blob/e00e3886a2546ac5443d793ad26ef75cd2654da0/supriya/ugens/bases.py#L267-L295
... and I haven't had trouble. One difference is I'm using the ::
code block directive in front of every code block. That's also the case inside the .. container
directives in uqbar's own docs. I haven't tested to see if that matters though.
I stayed on Sphinx 5.3.0, too. Uqbar's constraint of <6 and >=5.3.0 made it clear to do. Thanks for that!
I noticed uqbar is using the naked ::
directive, too, so I tested it in Abjad, but appears not to make a difference in Abjad's builds.
A strange clue is that it's only the first container
directive in a docstring that raises this error; nonfirst container
directives in a docstring continue to interpret just fine.
Once upon a time I had to temporarily change something in uqbar's call to black_format()
for something or other. So I thought it might have been a problem that I (yesterday) upgraded from black 22.1.0 to 23.1.0 at the same moment that I upgraded from uqbar 0.6.8 to 0.6.9. But downgrading to black 22.1.0 doesn't change anything (same with uqbar 0.6.8). Which is odd. I'm surprised that I haven't been able to downgrade dependencies back to something that gives me a clean build, especially since I build Abjad's 3.15 docs only a month ago. Le sigh.
Interesting. Definitely not seeing anything weird over here.
What branch of Abjad are you building the docs on? I can try to reproduce when I have some free time.
Cool. You can build on main, though I just merged in a manual workaround for all the docstrings in question. The workaround's ugly tho (strange to not be able to start a container with explanatory text), so if you do find something that'd be awesome.
To reproduce, just type "foo:" inside any container
directive, and see if Sphinx complains.
Hmm, actually, I guess if you go try that and the error isn't reproducible, then I suppose it's just something to do with the config of my venv. Lemme know if it's even reproducible on your machine.
Sometime after January 14 (Abjad 3.15) and yesterday, Sphinx started to issue an ERROR/WARNING pair for every
.. container:: example
directive that's followed by explanatory text (rather than by example Python code).So Sphinx errors on this (explanatory text immediately after container directive):
But Sphinx is happy with this (explanatory text hoisted outside of container directive):
Are you seeing anything similar? Is there any chance this has to do with uqbar? It's possible the problem could be Sphinx itself, or black. But I can't figure it out.
It seems like these same errors should be occurring when building uqbar's own docs, at ...
https://github.com/josiah-wolf-oberholtzer/uqbar/blob/42b24f7917d2b2078e44cf184d9e45adf5d091d5/uqbar/book/console.py#L86
https://github.com/josiah-wolf-oberholtzer/uqbar/blob/42b24f7917d2b2078e44cf184d9e45adf5d091d5/uqbar/book/console.py#L104
https://github.com/josiah-wolf-oberholtzer/uqbar/blob/42b24f7917d2b2078e44cf184d9e45adf5d091d5/uqbar/book/console.py#L122
... for example.
For reference, Sphinx's error output on Abjad's API looks like this: