This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients akdor1154, ezio.melotti, hroncok, lemburg, mark, methane, qigangxu, shihai1991, vstinner
Date 2021-04-23.07:45:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <f5753b5f-8c18-76ea-8859-21b10088d03e@egenix.com>
In-reply-to <1619141852.47.0.450343139284.issue37751@roundup.psfhosted.org>
Content
On 23.04.2021 03:37, akdor1154 wrote:
> 
> akdor1154 <akdor1154@gmail.com> added the comment:
> 
> If I understand the target of this issue, this is a breaking change in python 3.9 .
> 
> E.g. see https://github.com/SAP/PyHDB/issues/149
> 
> Ideally if we did not intend to break libraries then can this be fixed?
> Or if it is acceptable to have such a breaking change, can it be documented as such? (maybe this is https://github.com/python/cpython/pull/23096 ? though I would not interpret that as a breaking change at first glance)

This patch only restored the behavior we had before (and for many many
years). It's not breaking, it's in fact resolving a break which was
caused by earlier:

https://bugs.python.org/issue37751#msg349448

Please note that search functions determine how to map codec names
to codec implementations. The codec search function in the encodings
package uses one way to do this (and depends on how the package
is structured).

The approach taken by the encodings search function is listed here:
https://github.com/python/cpython/blob/master/Lib/encodings/__init__.py#L43

Other search functions can work in different ways.

Now, unfortunately, parts of this kind of normalization have also made
its way into the codecs module itself and into the Unicode
implementation and perhaps not always in a way which allows search
functions to use a different approach or which is consistent.

As I mentioned before, the safest way to go about this is to use
alnum only names for codecs, with the addition of underscores to
separate important parts.

The Python implementation should make sure that such names continue
to work when passed through any codec name normalization.
History
Date User Action Args
2021-04-23 07:45:16lemburgsetrecipients: + lemburg, vstinner, mark, ezio.melotti, methane, hroncok, shihai1991, qigangxu, akdor1154
2021-04-23 07:45:16lemburglinkissue37751 messages
2021-04-23 07:45:15lemburgcreate