]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-118761: Redudce the import time of ``optparse`` (#128899)
authorEli Schwartz <eschwartz@gentoo.org>
Mon, 20 Jan 2025 00:03:19 +0000 (19:03 -0500)
committerGitHub <noreply@github.com>
Mon, 20 Jan 2025 00:03:19 +0000 (00:03 +0000)
commit3b6a27c5607d2b199f127c2a5ef5316bbc30ae42
tree3f29831889a506a773bf2b5c52ff2ae77d1867c2
parentc9c9fcb8fcc3ef43e1d8bd71ae0ed3d4231a6013
gh-118761: Redudce the import time of ``optparse`` (#128899)

The same change was made, and for the same reason, by ``argparse`` back in
2017. The ``textwrap`` module is only used when printing help text, so most
invocations will never need it imported.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Lib/optparse.py
Misc/NEWS.d/next/Library/2025-01-15-18-54-48.gh-issue-118761.G1dv6E.rst [new file with mode: 0644]