python / python/cpython

AF_DECnet is missing from socket.AddressFamily

Open
#127,544 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.12 3.13 3.14 stdlib topic-socket type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

This code populates the AddressFamily enum:

IntEnum._convert_(
        'AddressFamily',
        __name__,
        lambda C: C.isupper() and C.startswith('AF_'))

But AF_DECnet isn't all uppercase so it's currently excluded. Do we need the isupper() test? I don't see anything that begins with AF_ in socket other than the existing members of AddressFamily and AF_DECnet.

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Linked PRs
  • gh-127548

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the socket module where AddressFamily is populated by IntEnum.convert and inspect the AF_* names, especially AF_DECnet. Check the linked PR gh-127548 and existing socket tests; done means AF_DECnet is represented in socket.AddressFamily without regressing other address-family members.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.