[pypy-commit] pypy py3.6: merge default into branch
mattip
pypy.commits at gmail.com
Sun Nov 3 06:13:45 EST 2019
Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r97944:9e6ad1f66385
Date: 2019-11-03 06:12 -0500
http://bitbucket.org/pypy/pypy/changeset/9e6ad1f66385/
Log: merge default into branch
diff --git a/lib_pypy/_ctypes/array.py b/lib_pypy/_ctypes/array.py
--- a/lib_pypy/_ctypes/array.py
+++ b/lib_pypy/_ctypes/array.py
@@ -275,6 +275,8 @@
raise TypeError("Can't multiply a ctypes type by a non-integer")
if length < 0:
raise ValueError("Array length must be >= 0")
+ if length * base._sizeofinstances() > sys.maxsize:
+ raise OverflowError("array too large")
key = (base, length)
try:
return ARRAY_CACHE[key]
diff --git a/pypy/tool/release/make_portable.py b/pypy/tool/release/make_portable.py
--- a/pypy/tool/release/make_portable.py
+++ b/pypy/tool/release/make_portable.py
@@ -3,7 +3,7 @@
bundle = ['sqlite3', 'ssl', 'crypto', 'ffi', 'expat', 'tcl', 'tk', 'gdbm',
'lzma', 'tinfo', 'tinfow', 'ncursesw', 'panelw', 'ncurses', 'panel', 'panelw']
-from os import chdir, mkdir, symlink
+import os
from os.path import dirname, relpath, join, exists, basename, realpath
from shutil import copy2
import sys
@@ -53,7 +53,7 @@
copied[path] = 'lib/' + bname
if not exists('lib/' + needed):
- symlink(bname, 'lib/' + needed)
+ os.symlink(bname, 'lib/' + needed)
return copied
@@ -96,13 +96,13 @@
if __name__ == '__main__':
try:
- chdir(sys.argv[1])
+ os.chdir(sys.argv[1])
except:
print('Call as %s <path/to/pypy/topdir' % sys.argv[0])
exit(-1)
try:
- mkdir('lib')
+ os.mkdir('lib')
except OSError:
pass
More information about the pypy-commit
mailing list