Re: [PATCH 1/3] doc-rst:c-domain: fix sphinx version incompatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 06.09.2016 um 15:34 schrieb Jani Nikula <jani.nikula@xxxxxxxxx>:

> On Tue, 06 Sep 2016, Jonathan Corbet <corbet@xxxxxxx> wrote:
>> On Wed, 31 Aug 2016 17:29:30 +0200
>> Markus Heiser <markus.heiser@xxxxxxxxxxx> wrote:
>> 
>>> +            if major >= 1 and minor < 4:
>>> +                # indexnode's tuple changed in 1.4
>>> +                # https://github.com/sphinx-doc/sphinx/commit/e6a5a3a92e938fcd75866b4227db9e0524d58f7c
>>> +                self.indexnode['entries'].append(
>>> +                    ('single', indextext, targetname, ''))
>>> +            else:
>>> +                self.indexnode['entries'].append(
>>> +                    ('single', indextext, targetname, '', None))
>> 
>> So this doesn't seem right.  We'll get the four-entry tuple behavior with
>> 1.3 and the five-entry behavior with 1.4...but what happens when 2.0
>> comes out?
>> 
>> Did you want maybe:
>> 
>> 	if major == 1 and minor < 4:
>> 
>> ?
>> 
>> (That will fail on 0.x, but we've already stated that we don't support
>> below 1.2).
> 
> Is there a way to check the number of entries expected in the tuples
> instead of trying to match the version?

Sadly not, the dissection of the tuple is spread around the source :(

Sphinx has some more of these tuples with fixed length (remember
conf.py, the latex_documents settings) where IMHO hash/value pairs
(dicts) are more suitable.

-- Markus --
> BR,
> Jani.
> -- 
> Jani Nikula, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux