Issue #23731: Implement PEP 488.

The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
This commit is contained in:
Brett Cannon 2015-04-13 14:21:02 -04:00
parent a63cc21234
commit f299abdafa
56 changed files with 4731 additions and 4621 deletions

View file

@ -170,14 +170,14 @@ isfile(wchar_t *filename) /* Is file, not directory */
static int
ismodule(wchar_t *filename) /* Is module -- check for .pyc/.pyo too */
ismodule(wchar_t *filename) /* Is module -- check for .pyc too */
{
if (isfile(filename))
return 1;
/* Check for the compiled version of prefix. */
if (wcslen(filename) < MAXPATHLEN) {
wcscat(filename, Py_OptimizeFlag ? L"o" : L"c");
wcscat(filename, L"c");
if (isfile(filename))
return 1;
}
@ -891,4 +891,3 @@ Py_GetProgramFullPath(void)
#ifdef __cplusplus
}
#endif