Skip to content

The "finder" Glossary Entry May Need Updating #118055

@ericsnowcurrently

Description

@ericsnowcurrently

Documentation

I'm referring to https://docs.python.org/3.13/glossary.html#term-finder.

(There are probably other import-related glossary entries that could use a similar update.)

(expand for extra context)

The glossary entry looks like so:

finder

An object that tries to find the [loader] for a module that is being imported.

Since Python 3.3, there are two types of finder: [meta path finders] for use
with [sys.meta_path], and [path entry finders] for use with [sys.path_hooks].

See [PEP 302], [PEP 420] and [PEP 451] for much more detail.

The glossary entry was added by @brettcannon in early 2009 (51d4aab), around the time he landed the initial importlib docs (afccd63), for Python 3.1.

Brett updated the entry, including the "Since 3.3" and the PEP references, in late 2015 (ccddbb1), before the 3.5 release.

PEP 302 landed in late 2002 (52e14d6), for Python 2.3 (not 3.3).

The "imports" page in the language reference was added by @warsaw in 2012 (dadebab), before the 3.3 release.

import system: https://docs.python.org/3.13/reference/import.html
importlib: https://docs.python.org/3.13/library/importlib.html


I happened to see the entry today and noticed two things:

  • it says "Since 3.3", but I'm pretty sure it should say "Since 2.3", which PEP 302 targeted (perhaps I missed something?)
  • along with (or even instead of) recommending the 3 PEPs, it would probably be even more helpful to refer to the language reference 1 and to the importlib docs page 2

Regarding the second point, the language reference and the importlib docs both would be better resources than the PEPs for explaining the various facets of the import system, including finders. PEP 302 even has a prominent warning about that.

FWIW, I had expected that the glossary entry predated that language reference page (2012) and importlib (2009), and that no one thought to update the glossary entry at the time. Having checked, that does correspond with the addition of the entry in early 2009, but not with the update in late 2015 that introduced the two bits of text I identified above. Since he committed both changes, perhaps @brettcannon has some insight into the "why" of the two parts of the glossary entry I identified above?

Linked PRs

Footnotes

  1. https://docs.python.org/3.13/reference/import.html

  2. https://docs.python.org/3.13/library/importlib.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixes3.13bugs and security fixes3.8 (EOL)end of life3.9only security fixesdocsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions