diff options
author | Zackery Spytz <zspytz@gmail.com> | 2023-12-27 14:04:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 14:04:31 (GMT) |
commit | 1ddd773293bd692b9dbeba9be54403a7b1e95dbf (patch) | |
tree | a12e5796090c46d14d9d89382cd82045c2827e42 /Lib/pydoc.py | |
parent | 4acf825058a7785ed3d66d4f5a4991298c011f64 (diff) | |
download | cpython-1ddd773293bd692b9dbeba9be54403a7b1e95dbf.zip cpython-1ddd773293bd692b9dbeba9be54403a7b1e95dbf.tar.gz cpython-1ddd773293bd692b9dbeba9be54403a7b1e95dbf.tar.bz2 |
gh-64020: Deprecate pydoc.ispackage() (GH-20908)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 83c74a7..96aa1df 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -345,6 +345,8 @@ def sort_attributes(attrs, object): def ispackage(path): """Guess whether a path refers to a package directory.""" + warnings.warn('The pydoc.ispackage() function is deprecated', + DeprecationWarning, stacklevel=2) if os.path.isdir(path): for ext in ('.py', '.pyc'): if os.path.isfile(os.path.join(path, '__init__' + ext)): |