[glob] Deprecate glob0 and glob1 functions (#14477)

This commit is contained in:
Semyon Moroz
2025-08-08 21:21:07 +00:00
committed by GitHub
parent 8dc16bc111
commit 91ba0da4aa
+10 -2
View File
@@ -2,14 +2,22 @@ import sys
from _typeshed import StrOrBytesPath
from collections.abc import Iterator, Sequence
from typing import AnyStr
from typing_extensions import deprecated
__all__ = ["escape", "glob", "iglob"]
if sys.version_info >= (3, 13):
__all__ += ["translate"]
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
if sys.version_info >= (3, 10):
@deprecated("Will be removed in Python 3.15; Use `glob.glob` and pass *root_dir* argument instead.")
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
@deprecated("Will be removed in Python 3.15; Use `glob.glob` and pass *root_dir* argument instead.")
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
else:
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
if sys.version_info >= (3, 11):
def glob(