GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve import time of various stdlib modules · Issue #154675 · python/cpython

Improve import time of various stdlib modules #154675

New issue
Copy link
New issue
Copy link
Open
5 / 85 of 8 issues completed
Open
Improve import time of various stdlib modules#154675
5 / 85 of 8 issues completed
Copy link
Labels
3.16new features, bugs and security fixesnew features, bugs and security fixesperformancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@hugovk
hugovk
opened on Jul 25, 2026
Issue body actions

Feature or enhancement

Proposal:

Following on from 3.15's #137855, further improvements can be made to import times in 3.16.

And rather than deferring imports, we can use lazy imports.

Linked PRs

  • gh-154675: reorganize some imports in importlib #154657
  • gh-154675: Improve import performance of tkinter library with lazy imports #148409
  • gh-154675: Use lazy imports in pdb, bdb, code #156567
  • gh-154675: Use lazy imports in json package #156801
  • gh-154675: pprint use lazy imports #156803
  • gh-154675: Avoid importing inspect when creating a slotted dataclass #156841

Activity

  1. hugovk
    added
    type-featureA feature request or enhancementA feature request or enhancement
    performancePerformance or resource usagePerformance or resource usage
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Jul 25, 2026
  2. brettcannon
    added a commit that references this issue on Jul 27, 2026

    gh-154675: reorganize some imports in importlib (#154657)

    0284ce8
  3. hugovk
    added sub-issues on Jul 30, 2026
    • shutil: avoid importing bz2, lzma and compression.zstd just to probe availability #154904
    • Use lazy imports in argparse #154638
  4. mbeijen
    added a commit that references this issue on Aug 14, 2026

    pythongh-154675: reorganize some imports in importlib (python#154657)

    5f5b57c
  5. hugovk
    added a sub-issue on Aug 25, 2026
    • Speed up import rlcompleter by deferring inspect and re #156363
  6. hugovk
    added sub-issues on Sep 1, 2026
    • Optimize pdb with asyncio gating #156774
    • Optimize logging package import overhead with lazy imports #156777
  7. brittanyrey
    added 3 commits that reference this issue on Sep 1, 2026

    pythongh-154675: Use lazy imports in `json.tool`

    6cf2b8b

    pythongh-154675: Use lazy imports in `json.tool`

    4e6d471

    pythongh-154675: Use lazy imports in `json.tool`

    db14e0d
  8. hugovk
    added
    3.16new features, bugs and security fixesnew features, bugs and security fixes
    on Sep 8, 2026
  9. hugovk
    added a sub-issue on Oct 18, 2026
    • Lazy load urllib modules in saxutils #159675
  10. hugovk
    added a commit that references this issue on Oct 21, 2026

    gh-154675: Use lazy imports in `pdb`, `bdb`, `code` (#156567)

    00348be
  11. hugovk
    added a sub-issue on Nov 8, 2026
    • platform: import _wmi on first use #161513
  12. aisk
    added a sub-issue on Nov 9, 2026
    • Windows: avoid importing encodings._win_cp_codecs and time at startup #161510
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.16new features, bugs and security fixesnew features, bugs and security fixesperformancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.