Skip to content

gh-118761: Optimise import time for ast #131953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "Add private unparse names to getattr"
This reverts commit 460491e.
  • Loading branch information
AA-Turner committed Apr 1, 2025
commit a5463286921a91a25ea7c9f9d72aa8fcde57f4e2
6 changes: 0 additions & 6 deletions Lib/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,4 @@ def __getattr__(name):
from _ast_unparse import unparse
return unparse

if name in {'_INFSTR', '_SINGLE_QUOTES', '_MULTI_QUOTES', '_ALL_QUOTES',
'_Precedence', '_Unparser'}:
# all of these names are private, but re-exported for compatibility
import _ast_unparse
return getattr(_ast_unparse, name)

raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy