bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

More Sphinx 1.6 problems #72

Closed bitprophet closed 6 years ago

bitprophet commented 6 years ago

Sort of a follow-on from #71, which prompted me to dig deeper into how we were not really compatible with Sphinx 1.5/1.6.

Sphinx 1.5 was just due to Python 2.6 being dropped, so we did that here too, and no problem.

Sphinx 1.6 made a lot of internal API changes that broke us. I fixed all the stuff that seems to pop up in our test suites, but there's a side channel - parsing the changelog 'in-process' for stuff like my release Invoke tasks (which need to answer questions about a project's changelog state.)

Specifically, something seems to be almost skipping Sphinx itself when rendering, leaving us with "I'm docutils and what is this???" errors like:

image

Well...clearly :doc: should freaking work in Sphinx-flavored RST! (It also complained about a :ref: that I temporarily commented out.)

bitprophet commented 6 years ago

Actually, I think this was probably still an issue beforehand, and this is yet another spot where it's more just log visibility due to changes in how Sphinx logs. When I tidy up the log muting some more, this goes away.

Especially given that the side channel use case doesn't currently care whether or not the inner bits of changelog entries render correctly or not (they are purely concerned with the overall data structures about release lines & which issues go where) this has already wasted way too much of my time to dig deeper.

bitprophet commented 6 years ago

Today continues to be shit. Not sure what I did wrong but this wasn't actually fixed. 🤦‍♂️

bitprophet commented 6 years ago

Quick brain dump:

bitprophet commented 6 years ago

Yea seems :doc: at least was moved into the 'Std' domain in 1.6 for some reason, implying that my hacky attempts to render on the fly are...missing basically any non-builtin domains? Figured that would've errored out for many more things in the past too (though, again, this may be muddied by the logging issue - perhaps this has been going on and I just need to try harder to nuke these warnings.)

The change on Sphinx's end, at least for doc, is sphinx-doc/sphinx@12d639873953847de31ec99742b42e50e89ed58c

bitprophet commented 6 years ago

Yea, ref isn't in here even in 1.5, implying that if I remove the warning muting temporarily, I should get warnings about "the fuck is :ref:" under Sphinx 1.5 too...and yes, that is indeed the case.

So I am back to "fuck it just make it shut up", so question is, why are some of these warnings solved by getLogger('sphinx').setLevel and others...not?

bitprophet commented 6 years ago

Seems these come out of docutils' Reporter, not clear why that's the case here but for a bunch of others they seemed to bubble up into Sphinx proper.

Even stranger, they're clearly 'ERROR' level, yet the display says 'WARNING'. Wat.

Dug some more and it might be hard to actually set this level ourselves (and it would also apparently apply pretty widely and perhaps mute other truly-error situations) so now I'm wondering if it would be easier to get sphinx loading all of its domains after all.

bitprophet commented 6 years ago

Welp, so, turns out I just needed with sphinx_domains(env): in my doctree bit. Applies to most/all Sphinx versions too. It...monkeypatches docutils. So no wonder I had a very hard time figuring out what the hell was going on... :sob: