Re: Python 2.7 support and automarkup.py - Was: Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Nícolas F . R . A . Prado
On Fri Oct 30, 2020 at 11:39 AM -03, Matthew Wilcox wrote: > > On Fri, Oct 30, 2020 at 08:14:40AM -0600, Jonathan Corbet wrote: > > On Fri, 30 Oct 2020 15:10:26 +0100 > > Mauro Carvalho Chehab wrote: > > > > > I see a few alternatives: > > > > > > 1) fix automarkup.py for it to work again with pyt

Re: Python 2.7 support and automarkup.py - Was: Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Matthew Wilcox
On Fri, Oct 30, 2020 at 08:14:40AM -0600, Jonathan Corbet wrote: > On Fri, 30 Oct 2020 15:10:26 +0100 > Mauro Carvalho Chehab wrote: > > > I see a few alternatives: > > > > 1) fix automarkup.py for it to work again with python 2.7; > > > > 2) conf.py could gain some logic to disable automarkup

Re: Python 2.7 support and automarkup.py - Was: Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Mauro Carvalho Chehab
Em Fri, 30 Oct 2020 08:14:40 -0600 Jonathan Corbet escreveu: > On Fri, 30 Oct 2020 15:10:26 +0100 > Mauro Carvalho Chehab wrote: > > > I see a few alternatives: > > > > 1) fix automarkup.py for it to work again with python 2.7; > > > > 2) conf.py could gain some logic to disable automarkup wi

Re: Python 2.7 support and automarkup.py - Was: Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Jonathan Corbet
On Fri, 30 Oct 2020 15:10:26 +0100 Mauro Carvalho Chehab wrote: > I see a few alternatives: > > 1) fix automarkup.py for it to work again with python 2.7; > > 2) conf.py could gain some logic to disable automarkup with >Python < 3; > > 3) scripts/sphinx-pre-install already detects Python v

Python 2.7 support and automarkup.py - Was: Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Mauro Carvalho Chehab
Hi Dafna, Em Fri, 30 Oct 2020 14:33:52 +0100 Dafna Hirschfeld escreveu: > Hi > > Am 14.10.20 um 01:13 schrieb Nícolas F. R. A. Prado: > > While Sphinx 2 used a single c:type role for struct, union, enum and > > typedef, Sphinx 3 uses a specific role for each one. > > To keep backward compatibil

Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Jonathan Corbet
On Fri, 30 Oct 2020 14:33:52 +0100 Dafna Hirschfeld wrote: > > +RE_struct = re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=re.ASCII) > > +RE_union = re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=re.ASCII) > > +RE_enum = re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=re.ASCII) > > +RE_typedef

Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-30 Thread Dafna Hirschfeld
Hi Am 14.10.20 um 01:13 schrieb Nícolas F. R. A. Prado: While Sphinx 2 used a single c:type role for struct, union, enum and typedef, Sphinx 3 uses a specific role for each one. To keep backward compatibility, detect the Sphinx version and use the correct roles for that version. Signed-off-by:

[PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3

2020-10-13 Thread Nícolas F . R . A . Prado
While Sphinx 2 used a single c:type role for struct, union, enum and typedef, Sphinx 3 uses a specific role for each one. To keep backward compatibility, detect the Sphinx version and use the correct roles for that version. Signed-off-by: Nícolas F. R. A. Prado --- Documentation/sphinx/automarku