python: update to 3.8.3 (#5295)

This commit is contained in:
lucy phipps 2020-05-14 15:30:18 +01:00 committed by GitHub
parent 5a65ce1a78
commit 3a07c1a265
2 changed files with 2 additions and 60 deletions

View File

@ -1,57 +0,0 @@
From 84fdbc156ed424d030686de350fbfc6c3593263f Mon Sep 17 00:00:00 2001
Message-Id: <84fdbc156ed424d030686de350fbfc6c3593263f.1537028533.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Sat, 15 Sep 2018 18:22:06 +0200
Subject: [PATCH] compileall: Fix ddir when recursing
---
Lib/compileall.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/Lib/compileall.py b/Lib/compileall.py
index 72592126d7..70e246fd96 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -45,12 +45,16 @@ def _walk_dir(dir, ddir=None, maxlevels=10, quiet=0):
else:
dfile = None
if not os.path.isdir(fullname):
- yield fullname
+ yield fullname, ddir
elif (maxlevels > 0 and name != os.curdir and name != os.pardir and
os.path.isdir(fullname) and not os.path.islink(fullname)):
yield from _walk_dir(fullname, ddir=dfile,
maxlevels=maxlevels - 1, quiet=quiet)
+def _compile_one(file_ddir, *args, **kwargs):
+ file, ddir = file_ddir
+ return compile_file(file, ddir, *args, **kwargs)
+
def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
quiet=0, legacy=False, optimize=-1, workers=1,
invalidation_mode=py_compile.PycInvalidationMode.TIMESTAMP):
@@ -79,17 +83,17 @@ def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
if workers is not None and workers != 1 and ProcessPoolExecutor is not None:
workers = workers or None
with ProcessPoolExecutor(max_workers=workers) as executor:
- results = executor.map(partial(compile_file,
- ddir=ddir, force=force,
+ results = executor.map(partial(_compile_one,
+ force=force,
rx=rx, quiet=quiet,
legacy=legacy,
optimize=optimize,
invalidation_mode=invalidation_mode),
files)
success = min(results, default=True)
else:
- for file in files:
- if not compile_file(file, ddir, force, rx, quiet,
+ for file_ddir in files:
+ if not _compile_one(file_ddir, force, rx, quiet,
legacy, optimize, invalidation_mode):
success = False
return success
--
2.18.0

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://python.org/
TERMUX_PKG_DESCRIPTION="Python 3 programming language intended to enable clear programs"
TERMUX_PKG_LICENSE="PythonPL"
_MAJOR_VERSION=3.8
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.3
TERMUX_PKG_SRCURL=https://www.python.org/ftp/python/${TERMUX_PKG_VERSION}/Python-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df
TERMUX_PKG_SHA256=dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864
TERMUX_PKG_DEPENDS="gdbm, libandroid-support, libbz2, libcrypt, libffi, liblzma, libsqlite, ncurses, ncurses-ui-libs, openssl, readline, zlib"
TERMUX_PKG_RECOMMENDS="clang"
TERMUX_PKG_SUGGESTS="python-tkinter"