Better doc string detection

A bug in 2.7 test_descr.py revealed a problem with the way we were
detecting docstrings.

        __doc__ = DocDescr()

was getting confused with a docstring.

This program also reveals other bugs in 3.2+ but we'll deal with that
in another commit.
This commit is contained in:
rocky
2020-07-19 20:31:50 -04:00
parent bd07de5172
commit 0f80c38530
8 changed files with 53 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ for path in py_source:
cfile = "bytecode_%s%s/%s" % (version, suffix, short) + "c"
print("byte-compiling %s to %s" % (path, cfile))
optimize = 2
if vers >= (3, 0):
if vers > (3, 1):
py_compile.compile(path, cfile, optimize=optimize)
else:
py_compile.compile(path, cfile)