diff mbox series

[ovs-dev] containers: Cap sphinx at 7 to unblock CI.

Message ID 20240729224359.1747631-1-i.maximets@ovn.org
State Accepted
Headers show
Series [ovs-dev] containers: Cap sphinx at 7 to unblock CI. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ilya Maximets July 29, 2024, 10:43 p.m. UTC
Just released sphinx 8.0 requires Pygments >= 2.17, but it fails to
build with it in practice.  This breaks our CI completely:

  Traceback (most recent call last):
    File "/usr/local/bin/sphinx-build", line 5, in <module>
      from sphinx.cmd.build import main
    File "sphinx/cmd/build.py", line 21, in <module>
      from sphinx.application import Sphinx
    File "sphinx/application.py", line 29, in <module>
      from sphinx.highlighting import lexer_classes
    File "sphinx/highlighting.py", line 86, in <module>
      class PygmentsBridge:
      ...<131 lines>...
                  return formatter.get_style_defs() + _LATEX_ADD_STYLES
    File "sphinx/highlighting.py", line 89, in PygmentsBridge
      html_formatter = HtmlFormatter[str]
                       ~~~~~~~~~~~~~^^^^^
  TypeError: type 'HtmlFormatter' is not subscriptable

Cap the version for now to unblock CI.

Can be reverted once https://github.com/sphinx-doc/sphinx/issues/12711
is fixed.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 utilities/containers/py-requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Numan Siddique July 30, 2024, 12:42 a.m. UTC | #1
On Mon, Jul 29, 2024 at 6:44 PM Ilya Maximets <i.maximets@ovn.org> wrote:
>
> Just released sphinx 8.0 requires Pygments >= 2.17, but it fails to
> build with it in practice.  This breaks our CI completely:
>
>   Traceback (most recent call last):
>     File "/usr/local/bin/sphinx-build", line 5, in <module>
>       from sphinx.cmd.build import main
>     File "sphinx/cmd/build.py", line 21, in <module>
>       from sphinx.application import Sphinx
>     File "sphinx/application.py", line 29, in <module>
>       from sphinx.highlighting import lexer_classes
>     File "sphinx/highlighting.py", line 86, in <module>
>       class PygmentsBridge:
>       ...<131 lines>...
>                   return formatter.get_style_defs() + _LATEX_ADD_STYLES
>     File "sphinx/highlighting.py", line 89, in PygmentsBridge
>       html_formatter = HtmlFormatter[str]
>                        ~~~~~~~~~~~~~^^^^^
>   TypeError: type 'HtmlFormatter' is not subscriptable
>
> Cap the version for now to unblock CI.
>
> Can be reverted once https://github.com/sphinx-doc/sphinx/issues/12711
> is fixed.
>
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>

Thanks Ilya for fixing the CI.  Applied to main.  Do we need to back port this ?
I think so.

Numan

> ---
>  utilities/containers/py-requirements.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utilities/containers/py-requirements.txt b/utilities/containers/py-requirements.txt
> index 2a310c687..8a3e977aa 100644
> --- a/utilities/containers/py-requirements.txt
> +++ b/utilities/containers/py-requirements.txt
> @@ -1,7 +1,7 @@
>  flake8>=6.1.0
>  meson>=1.4,<1.5
>  scapy
> -sphinx
> +sphinx<8.0 # https://github.com/sphinx-doc/sphinx/issues/12711
>  setuptools
>  pyelftools
>  pyOpenSSL
> --
> 2.45.2
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ilya Maximets July 30, 2024, 10:13 a.m. UTC | #2
On 7/30/24 02:42, Numan Siddique wrote:
> On Mon, Jul 29, 2024 at 6:44 PM Ilya Maximets <i.maximets@ovn.org> wrote:
>>
>> Just released sphinx 8.0 requires Pygments >= 2.17, but it fails to
>> build with it in practice.  This breaks our CI completely:
>>
>>   Traceback (most recent call last):
>>     File "/usr/local/bin/sphinx-build", line 5, in <module>
>>       from sphinx.cmd.build import main
>>     File "sphinx/cmd/build.py", line 21, in <module>
>>       from sphinx.application import Sphinx
>>     File "sphinx/application.py", line 29, in <module>
>>       from sphinx.highlighting import lexer_classes
>>     File "sphinx/highlighting.py", line 86, in <module>
>>       class PygmentsBridge:
>>       ...<131 lines>...
>>                   return formatter.get_style_defs() + _LATEX_ADD_STYLES
>>     File "sphinx/highlighting.py", line 89, in PygmentsBridge
>>       html_formatter = HtmlFormatter[str]
>>                        ~~~~~~~~~~~~~^^^^^
>>   TypeError: type 'HtmlFormatter' is not subscriptable
>>
>> Cap the version for now to unblock CI.
>>
>> Can be reverted once https://github.com/sphinx-doc/sphinx/issues/12711
>> is fixed.
>>
>> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> 
> Thanks Ilya for fixing the CI.  Applied to main.  Do we need to back port this ?
> I think so.

Yep.  We have the same CI on all supported branches.

However, as I reported the issue to sphinx, during the night they
released sphinx 8.0.2 that supposed to fix the issue.  I'm running
some tests with the new version.  So, maybe we can revert this
change from main instead of backporting.

OTOH, our CI has too many moving parts, so maybe pinning the
sphinx to a specific version is not a bad idea in general.

Best regards, Ilya Maximets.

> 
> Numan
> 
>> ---
>>  utilities/containers/py-requirements.txt | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/utilities/containers/py-requirements.txt b/utilities/containers/py-requirements.txt
>> index 2a310c687..8a3e977aa 100644
>> --- a/utilities/containers/py-requirements.txt
>> +++ b/utilities/containers/py-requirements.txt
>> @@ -1,7 +1,7 @@
>>  flake8>=6.1.0
>>  meson>=1.4,<1.5
>>  scapy
>> -sphinx
>> +sphinx<8.0 # https://github.com/sphinx-doc/sphinx/issues/12711
>>  setuptools
>>  pyelftools
>>  pyOpenSSL
>> --
>> 2.45.2
diff mbox series

Patch

diff --git a/utilities/containers/py-requirements.txt b/utilities/containers/py-requirements.txt
index 2a310c687..8a3e977aa 100644
--- a/utilities/containers/py-requirements.txt
+++ b/utilities/containers/py-requirements.txt
@@ -1,7 +1,7 @@ 
 flake8>=6.1.0
 meson>=1.4,<1.5
 scapy
-sphinx
+sphinx<8.0 # https://github.com/sphinx-doc/sphinx/issues/12711
 setuptools
 pyelftools
 pyOpenSSL