- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.

parent e560b52c
...@@ -212,8 +212,8 @@ def source_synopsis(file): ...@@ -212,8 +212,8 @@ def source_synopsis(file):
def synopsis(filename, cache={}): def synopsis(filename, cache={}):
"""Get the one-line summary out of a module file.""" """Get the one-line summary out of a module file."""
mtime = os.stat(filename).st_mtime mtime = os.stat(filename).st_mtime
lastupdate, result = cache.get(filename, (0, None)) lastupdate, result = cache.get(filename, (None, None))
if lastupdate < mtime: if lastupdate is None or lastupdate < mtime:
info = inspect.getmoduleinfo(filename) info = inspect.getmoduleinfo(filename)
try: try:
file = open(filename) file = open(filename)
......
...@@ -37,6 +37,8 @@ Core and Builtins ...@@ -37,6 +37,8 @@ Core and Builtins
Library Library
------- -------
- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is - Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
given as a low fd, it gets overwritten. given as a low fd, it gets overwritten.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment