[docutils:patches] #194 Deprecate PEP 263 coding slugs support

"Günter Milde" via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/patches/194/f5c66570bc16fcaced57182a371601b472ccd2fd.patches@docutils.p.sourceforge.net>
> IMO, it is more safe keep "source code encoding both visible and changeable on a per-source file basis". [PEP 263]

OTOH, this feature does not need to be implemented in docutils.io.
The attached "inspecting_codecs" package is a first try to implement the current default behaviour as a codec -- allowing Docutils to use standard io tools. 
BTW: It also recognizes PEP-263-like encoding declarations in UTF-16 and UTF-32.
With a replacement sufficiently stable and available either inside Docutils or as separate package,
deprecating the current encoding handling is OK.


Attachments:

- [inspecting_codecs-0.1.0.tar.gz](https://sourceforge.net/p/docutils/patches/_discuss/thread/d27c8d1320/268e/attachment/inspecting_codecs-0.1.0.tar.gz) (10.3 kB; application/gzip)


---

** [patches:#194] Deprecate PEP 263 coding slugs support**

**Status:** open
**Group:** None
**Created:** Thu Jun 09, 2022 10:48 PM UTC by Adam  Turner
**Last Updated:** Tue Jun 14, 2022 10:15 AM UTC
**Owner:** nobody
**Attachments:**

- [0001-Deprecate-PEP-263-coding-slugs.patch](https://sourceforge.net/p/docutils/patches/194/attachment/0001-Deprecate-PEP-263-coding-slugs.patch) (5.5 kB; application/octet-stream)


Python 3 uses utf-8 as the encoding for Python source files, there is no longer a compelling use-case for the support, which adds complexity to the IO implementation.

I propose deprecating support for removal in 1.0, but 2.0 might be a better option.

Support was added in [r4506].

A


---

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

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/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.