Commit 5d3cda4e authored by Matti Picus's avatar Matti Picus
Browse files

merge py3.8 into release

--HG--
branch : release-pypy3.8-v7.x
Pipeline #27472 passed with stage
in 29 minutes and 11 seconds
......@@ -136,16 +136,17 @@ class TestInteractiveConsole(unittest.TestCase):
EOFError('Finished')]
self.console.interact()
output = ''.join(''.join(call[1]) for call in self.stderr.method_calls)
# pypy addition: expect suggestions
expected = dedent("""
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'ham' is not defined
NameError: name 'ham' is not defined. Did you mean: hash?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<console>", line 2, in <module>
NameError: name 'eggs' is not defined
NameError: name 'eggs' is not defined. Did you mean: abs?
""")
self.assertIn(expected, output)
......
......@@ -14,6 +14,7 @@ import types
logger = logging.getLogger(__name__)
IS_PYPY = sys.implementation.name == 'pypy'
class EnvBuilder:
"""
......@@ -195,8 +196,8 @@ class EnvBuilder:
except Exception: # may need to use a more specific exception
logger.warning('Unable to symlink %r to %r', src, dst)
# On Windows, we rewrite symlinks to our base python.exe into
# copies of venvlauncher.exe
# On Windows in CPython, we rewrite symlinks to our base python.exe
# into copies of venvlauncher.exe
basename, ext = os.path.splitext(os.path.basename(src))
srcfn = os.path.join(os.path.dirname(__file__),
"scripts",
......@@ -208,9 +209,9 @@ class EnvBuilder:
if basename.endswith('_d'):
ext = '_d' + ext
basename = basename[:-2]
if basename == 'python':
if not IS_PYPY and basename == 'python':
basename = 'venvlauncher'
elif basename == 'pythonw':
elif not IS_PYPY and basename == 'pythonw':
basename = 'venvwlauncher'
src = os.path.join(os.path.dirname(src), basename + ext)
else:
......@@ -245,18 +246,17 @@ class EnvBuilder:
copier(context.env_exe, path, relative_symlinks_ok=True)
if not os.path.islink(path):
os.chmod(path, 0o755)
#
# PyPy extension: also copy needed dlls, not just the
# small executable
for libname in ['libpypy3-c.so', 'libpypy3-c.dylib', 'libffi-7.dll']:
dest_library = os.path.join(binpath, libname)
src_library = os.path.join(os.path.dirname(context.executable),
libname)
if (not os.path.exists(dest_library) and
os.path.exists(src_library)):
copier(src_library, dest_library)
if not os.path.islink(dest_library):
os.chmod(dest_library, 0o755)
# PyPy: also copy lib/*.so*, lib/tk, lib/tkl for portable builds
# if symlinks are not available
libsrc = os.path.join(context.python_dir, '..', 'lib')
if os.path.exists(libsrc) and not self.symlinks:
libdst = os.path.join(context.env_dir, 'lib')
if not os.path.exists(libdst):
os.mkdir(libdst)
for f in os.listdir(libsrc):
src = os.path.join(libsrc, f)
dst = os.path.join(libdst, f)
copier(src, dst)
#
else:
if self.symlinks:
......
......@@ -22,7 +22,7 @@ Process for upgrading the stdlib to a new cpython version
(just hg branch stdlib-$version)
7. merge vendor/stdlib or vendor/stdlib-3-*
8. commit
10. fix issues
10. fix issues. Note especially changes in datetime.py, venv/__init__.py, and others.
11. commit --close-branch
12. merge to default / py3k
12. merge to default / py3k
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