summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2023-12-27 14:04:31 (GMT)
committerGitHub <noreply@github.com>2023-12-27 14:04:31 (GMT)
commit1ddd773293bd692b9dbeba9be54403a7b1e95dbf (patch)
treea12e5796090c46d14d9d89382cd82045c2827e42 /Lib/pydoc.py
parent4acf825058a7785ed3d66d4f5a4991298c011f64 (diff)
downloadcpython-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-xLib/pydoc.py2
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)):