[docutils:bugs] #436 docutils doesn't build with Python 3.11

"Günter Milde" via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/bugs/436/298e2d7b786b1704dbaa383fedaf25953716e802.bugs@docutils.p.sourceforge.net>
- **status**: open-fixed --> closed-fixed



---

** [bugs:#436] docutils doesn't build with Python 3.11**

**Status:** closed-fixed
**Created:** Fri Nov 26, 2021 12:39 PM UTC by Tomáš Hrnčiar
**Last Updated:** Wed Jul 06, 2022 07:46 AM UTC
**Owner:** nobody


Hello,

in Fedora we started with rebuilding Python packages with preleases of Python 3.11, currently it is 2nd alpha. 

Docutils doesn't build because 3.11 adds support for null characters in the csv module, which breaks a test. See reproducer below.

>>> import csv
>>> from docutils.parsers.rst.directives import tables
>>> with open('utf-16.csv', 'rb') as f: csv_data = f.read()
... 
>>> csv_data = str(csv_data, 'latin1').splitlines()
>>> reader = csv.reader([tables.CSVTable.encode_for_csv(line + '\n') for line in csv_data])
>>> next(reader)

Python 3.11:

['þÿ\x00"\x00T\x00r\x00e\x00a\x00t\x00"\x00', '\x00 \x00"\x00Q\x00u\x00a\x00n\x00t\x00i\x00t\x00y\x00"\x00', '\x00 \x00"\x00D\x00e\x00s\x00c\x00r\x00i\x00p\x00t\x00i\x00o\x00n\x00"\x00']

Python 3.10:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_csv.Error: line contains NUL



---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.