Skip to content

pydoc for namespace packages indicates FILE as built-in #68441

Description

@anntzer
mannequin
BPO 24253
Nosy @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2015-05-21.04:37:38.192>
labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
title = 'pydoc for namespace packages indicates FILE as built-in'
updated_at = <Date 2021-12-07.13:28:04.970>
user = 'https://github.com/anntzer'

bugs.python.org fields:

activity = <Date 2021-12-07.13:28:04.970>
actor = 'Antony.Lee'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2015-05-21.04:37:38.192>
creator = 'Antony.Lee'
dependencies = []
files = []
hgrepos = []
issue_num = 24253
keywords = []
message_count = 2.0
messages = ['243728', '407924']
nosy_count = 1.0
nosy_names = ['iritkatriel']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue24253'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Linked PRs

Activity

  1. anntzer commented on May 21, 2015

    anntzermannequin
    MannequinAuthor

    All's in the title: the output of "pydoc foo" where foo is a namespace package (... e.g. any directory in the cwd) says that the package is defined as a builtin (under the FILE entry) -- which is certainly incorrect.

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on May 21, 2015
  3. iritkatriel commented on Dec 7, 2021

    @iritkatriel
    Member

    Reproduce on 3.11.

  4. transferred this issue fromon Apr 10, 2022
  5. vasiliyk commented on Oct 24, 2026

    @vasiliyk
    Contributor

    This still reproduces on 3.16.0a1+dev.

    A directory with no __init__.py imports as a namespace package (PEP 420), which has no __file__.
    pydoc then hits its TypeError fallback and prints "(built-in)".

    The 3.9–3.11 labels can be dropped (no bug fixes there now).
    I'm happy to open a PR.

  6. added a commit that references this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10 (EOL)end of life3.11only security fixes3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions