Bug 2264849 - python-docutils fails to build with Python 3.13: csv: ValueError: bad delimiter value
Summary: python-docutils fails to build with Python 3.13: csv: ValueError: bad delimit...
Keywords:
Status: CLOSED COMPLETED
Alias: None
Product: Fedora
Classification: Fedora
Component: python-docutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karolina Surma
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-02-19 09:58 UTC by Karolina Surma
Modified: 2024-03-22 08:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-03-22 08:32:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-02-19 09:58:12 UTC
python-docutils fails to build with Python 3.13.0a4.

4 tests fail with the same issue:

======================================================================
ERROR: test_parser (test_parsers.test_rst.test_directives.test_tables.ParserTestCase.test_parser) (id="totest['csv_table'][17]")
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/docutils-0.20.1/test/test_parsers/test_rst/test_directives/test_tables.py", line 41, in test_parser
    parser.parse(case_input, document)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/__init__.py", line 184, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 169, in run
    results = StateMachineWS.run(self, input_lines, input_offset,
              ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                 input_source=document['source'])
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
                                  ~~~~~~~~~~~~~~~^
        context, state, transitions)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
           ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 2357, in explicit_markup
    self.explicit_list(blank_finish)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 2382, in explicit_list
    newline_offset, blank_finish = self.nested_list_parse(
                                   ~~~~~~~~~~~~~~~~~~~~~~^
          self.state_machine.input_lines[offset:],
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
          blank_finish=blank_finish,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
          match_titles=self.state_machine.match_titles)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 316, in nested_list_parse
    state_machine.run(block, input_offset, memo=self.memo,
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      node=node, match_titles=match_titles)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
              ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
                                  ~~~~~~~~~~~~~~~^
        context, state, transitions)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
           ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 2660, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
                             ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 2367, in explicit_construct
    return method(self, expmatch)
           ~~~~~~^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 2104, in directive
    return self.run_directive(
           ~~~~~~~~~~~~~~~~~~^
        directive_class, match, type_name, option_presets)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/states.py", line 2154, in run_directive
    result = directive_instance.run()
             ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/directives/tables.py", line 295, in run
    csv_data, self.DocutilsDialect(self.options), source)
              ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/docutils-0.20.1/docutils/parsers/rst/directives/tables.py", line 237, in __init__
    super().__init__()
    ~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/csv.py", line 110, in __init__
    self._validate()
    ~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/csv.py", line 114, in _validate
    _Dialect(self)
    ~~~~~~~~^^^^^^
ValueError: bad delimiter value

----------------------------------------------------------------------
Ran 1583 tests in 1.580s

FAILED (errors=4, skipped=5)

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07033758-python-docutils/

For all our attempts to build python-docutils with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-docutils/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 2 Karolina Surma 2024-02-21 12:19:29 UTC
This has been merged in Python main: https://github.com/python/cpython/pull/115721 - the next alpha should contain the fix.

Comment 3 Karolina Surma 2024-03-22 08:32:08 UTC
Indeed, with the 5th alpha docutils build fine: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/build/7147653/


Note You need to log in before you can comment on or make changes to this bug.