Need help understanding issue 42237

Hey all, I’m new here. I’m looking at issue 42237, and there are two main concerns.

  1. The documentation does not show a list of all encodings (Lib/encodings/aliases/py).
  2. The runtime should customize the list to the architecture/OS the reader is on.

I modified the requester’s code to run under Python 3 (see below).

Things I do not understand:

  1. What documentation is the request referencing? I couldn’t find it on the docs site, but that may just be my newness.
  2. Instead of a long list of encodings to read, wouldn’t a reference to Lib/encodings/ be more useful?
    • It would provide the data desired.
    • It would empower the coder to use the data as they saw fit.
      • It gives them all available options, and they can use codecs.lookup().

The root questions are “What is available?” and “What is available on my machine?” The general use case customer should be able to read Lib/encodings/ either as text or programmaticly.

What am I missing? Can this be closed?

def main():
    enchash = {}

    for enc in encodings.aliases.aliases.values():
        enchash[enc] = []
    for encalias in encodings.aliases.aliases.keys():

    for enc, item in enchash.items():
        print(enc, item)

if __name__ == '__main__':

It’s referencing 4.9.2 Standard Encodings (the docs don’t have an overarching table of contents like it used to).

The trick with pointing to the code is if someone looks at the wrong branch, e.g. someone is reading the 3.10 docs but inadvertently looks in main then they make get the wrong results.