[pypy-commit] pypy default: Tweak in the first paragraph

2017-03-17 Thread arigo
Author: Armin Rigo 
Branch: 
Changeset: r90740:897b23340aaa
Date: 2017-03-17 08:29 +0100
http://bitbucket.org/pypy/pypy/changeset/897b23340aaa/

Log:Tweak in the first paragraph

diff --git a/pypy/doc/release-v5.7.0.rst b/pypy/doc/release-v5.7.0.rst
--- a/pypy/doc/release-v5.7.0.rst
+++ b/pypy/doc/release-v5.7.0.rst
@@ -2,9 +2,10 @@
 PyPy2.7 and PyPy3.5 v5.7 - two in one release
 =
 
-We have released PyPy2.7 and a beta-quality PyPy3.5 v5.7 for 64 bit linux.
+We have released PyPy2.7 v5.7, and a beta-quality PyPy3.5 v5.7 (for
+Linux 64bit only at first).
 This new PyPy2.7 release includes the upstream stdlib version 2.7.13, and
-PyPy 3.5 (our first in the 3.5 series) includes the upstream stdlib version
+PyPy3.5 (our first in the 3.5 series) includes the upstream stdlib version
 3.5.3.
 
 We continue to make incremental improvements to our C-API
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy default: mention pypy3-c in this README too

2017-03-17 Thread arigo
Author: Armin Rigo 
Branch: 
Changeset: r90739:35e71a2df836
Date: 2017-03-17 08:27 +0100
http://bitbucket.org/pypy/pypy/changeset/35e71a2df836/

Log:mention pypy3-c in this README too

diff --git a/README.rst b/README.rst
--- a/README.rst
+++ b/README.rst
@@ -27,14 +27,19 @@
 Building
 
 
-build with:
+First switch to or download the correct branch.  The basic choices are
+``default`` for Python 2.7 and, for Python 3.X, the corresponding py3.X
+branch (e.g. ``py3.5``).
+
+Build with:
 
 .. code-block:: console
 
 $ rpython/bin/rpython -Ojit pypy/goal/targetpypystandalone.py
 
-This ends up with ``pypy-c`` binary in the main pypy directory. We suggest
-to use virtualenv with the resulting pypy-c as the interpreter; you can
-find more details about various installation schemes here:
+This ends up with a ``pypy-c`` or ``pypy3-c`` binary in the main pypy
+directory.  We suggest to use virtualenv with the resulting
+pypy-c/pypy3-c as the interpreter; you can find more details about
+various installation schemes here:
 
 http://doc.pypy.org/en/latest/install.html
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy py3.5: check if RAND_egd is present before builtinify is called, (also transform RAND_status)

2017-03-17 Thread plan_rich
Author: Richard Plangger 
Branch: py3.5
Changeset: r90741:a320b2c592ec
Date: 2017-03-17 10:24 +0100
http://bitbucket.org/pypy/pypy/changeset/a320b2c592ec/

Log:check if RAND_egd is present before builtinify is called, (also
transform RAND_status)

diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py 
b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -1363,7 +1363,8 @@
 return lib.BIO_ctrl_pending(self.bio)
 
 
-RAND_status = lib.RAND_status
+def RAND_status():
+return lib.RAND_status()
 
 def _RAND_bytes(count, pseudo):
 if count < 0:
diff --git a/lib_pypy/_ssl/__init__.py b/lib_pypy/_ssl/__init__.py
--- a/lib_pypy/_ssl/__init__.py
+++ b/lib_pypy/_ssl/__init__.py
@@ -1,5 +1,6 @@
 from _cffi_ssl._stdssl import (_PROTOCOL_NAMES, _OPENSSL_API_VERSION,
 _test_decode_cert, _SSLContext)
+from _cffi_ssl import _stdssl
 from _cffi_ssl._stdssl import *
 
 
@@ -8,5 +9,8 @@
 
 RAND_add  = builtinify(RAND_add)
 RAND_bytes= builtinify(RAND_bytes)
-RAND_egd  = builtinify(RAND_egd)
 RAND_pseudo_bytes = builtinify(RAND_pseudo_bytes)
+RAND_status   = builtinify(RAND_status)
+# RAND_egd is optional and might not be available on e.g. libreoffice
+if hasattr(_stdssl, 'RAND_egd'):
+RAND_egd  = builtinify(RAND_egd)
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy py3.5: wow, what a typo

2017-03-17 Thread plan_rich
Author: Richard Plangger 
Branch: py3.5
Changeset: r90742:3e766f54a47c
Date: 2017-03-17 10:31 +0100
http://bitbucket.org/pypy/pypy/changeset/3e766f54a47c/

Log:wow, what a typo

diff --git a/lib_pypy/_ssl/__init__.py b/lib_pypy/_ssl/__init__.py
--- a/lib_pypy/_ssl/__init__.py
+++ b/lib_pypy/_ssl/__init__.py
@@ -11,6 +11,6 @@
 RAND_bytes= builtinify(RAND_bytes)
 RAND_pseudo_bytes = builtinify(RAND_pseudo_bytes)
 RAND_status   = builtinify(RAND_status)
-# RAND_egd is optional and might not be available on e.g. libreoffice
+# RAND_egd is optional and might not be available on e.g. libressl
 if hasattr(_stdssl, 'RAND_egd'):
 RAND_egd  = builtinify(RAND_egd)
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy default: mention dropping support for python 2.6

2017-03-17 Thread mattip
Author: Matti Picus 
Branch: 
Changeset: r90743:ef43d5aa82f7
Date: 2017-03-17 11:49 +0200
http://bitbucket.org/pypy/pypy/changeset/ef43d5aa82f7/

Log:mention dropping support for python 2.6

diff --git a/pypy/doc/release-v5.7.0.rst b/pypy/doc/release-v5.7.0.rst
--- a/pypy/doc/release-v5.7.0.rst
+++ b/pypy/doc/release-v5.7.0.rst
@@ -83,6 +83,9 @@
 Highlights of the PyPy2.7, cpyext, and RPython changes (since 5.6 released 
Nov, 2016)
 
=
 
+Translation uses python 2.7 syntax, we could renew support for python 2.6 if
+a downstream RPython-based project depends on it.
+
 See also issues that were resolved_
 
 * New features and cleanups
@@ -129,8 +132,6 @@
 ``PyMemoryView_FromBuffer``, and ``PyBuffer_Release``
   * improve support for creating C-extension objects from app-level classes,
 filling more slots, especially ``tp_new`` and ``tp_dealloc``
-  * add rstack.stack_almost_full() and use it to avoid stack overflow due to
-the JIT where possible
   * fix for ``ctypes.c_bool`` returning ``bool`` restype, issue #2475_
   * fix in corner cases with the GIL and C-API functions
 
@@ -162,6 +163,8 @@
   * improve shadowstack to where it is now the default in place of asmgcc
   * add a rpython implementation of siphash24, allow choosing hash algorithm
 randomizing the seed
+  * add rstack.stack_almost_full() and use it to avoid stack overflow due to
+the JIT where possible
 
 Highlights of the PyPy3.5 release (since 5.5 alpha released Oct, 2016)
 ==
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy default: apparently the python 2.7 requirement is not new to this version

2017-03-17 Thread mattip
Author: Matti Picus 
Branch: 
Changeset: r90744:24ba403e24e6
Date: 2017-03-17 14:27 +0200
http://bitbucket.org/pypy/pypy/changeset/24ba403e24e6/

Log:apparently the python 2.7 requirement is not new to this version

diff --git a/pypy/doc/release-v5.7.0.rst b/pypy/doc/release-v5.7.0.rst
--- a/pypy/doc/release-v5.7.0.rst
+++ b/pypy/doc/release-v5.7.0.rst
@@ -83,9 +83,6 @@
 Highlights of the PyPy2.7, cpyext, and RPython changes (since 5.6 released 
Nov, 2016)
 
=
 
-Translation uses python 2.7 syntax, we could renew support for python 2.6 if
-a downstream RPython-based project depends on it.
-
 See also issues that were resolved_
 
 * New features and cleanups
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy release-pypy3.5-5.x: merge py3.5 into release

2017-03-17 Thread mattip
Author: Matti Picus 
Branch: release-pypy3.5-5.x
Changeset: r90745:b702475ce4b0
Date: 2017-03-18 08:44 +0200
http://bitbucket.org/pypy/pypy/changeset/b702475ce4b0/

Log:merge py3.5 into release

diff --git a/lib-python/3/test/test_importlib/frozen/__init__.py 
b/lib-python/3/test/test_importlib/frozen/__init__.py
--- a/lib-python/3/test/test_importlib/frozen/__init__.py
+++ b/lib-python/3/test/test_importlib/frozen/__init__.py
@@ -1,5 +1,10 @@
 import os
-from test.support import load_package_tests
+import unittest
+from test.support import load_package_tests, check_impl_detail
 
 def load_tests(*args):
 return load_package_tests(os.path.dirname(__file__), *args)
+
+
+if check_impl_detail(pypy=True):
+raise unittest.SkipTest("PyPy doesn't have frozen modules")
diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py 
b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -1363,7 +1363,8 @@
 return lib.BIO_ctrl_pending(self.bio)
 
 
-RAND_status = lib.RAND_status
+def RAND_status():
+return lib.RAND_status()
 
 def _RAND_bytes(count, pseudo):
 if count < 0:
diff --git a/lib_pypy/_ssl/__init__.py b/lib_pypy/_ssl/__init__.py
--- a/lib_pypy/_ssl/__init__.py
+++ b/lib_pypy/_ssl/__init__.py
@@ -1,5 +1,6 @@
 from _cffi_ssl._stdssl import (_PROTOCOL_NAMES, _OPENSSL_API_VERSION,
 _test_decode_cert, _SSLContext)
+from _cffi_ssl import _stdssl
 from _cffi_ssl._stdssl import *
 
 
@@ -8,5 +9,8 @@
 
 RAND_add  = builtinify(RAND_add)
 RAND_bytes= builtinify(RAND_bytes)
-RAND_egd  = builtinify(RAND_egd)
 RAND_pseudo_bytes = builtinify(RAND_pseudo_bytes)
+RAND_status   = builtinify(RAND_status)
+# RAND_egd is optional and might not be available on e.g. libressl
+if hasattr(_stdssl, 'RAND_egd'):
+RAND_egd  = builtinify(RAND_egd)
diff --git a/pypy/interpreter/mixedmodule.py b/pypy/interpreter/mixedmodule.py
--- a/pypy/interpreter/mixedmodule.py
+++ b/pypy/interpreter/mixedmodule.py
@@ -1,4 +1,4 @@
-from pypy.interpreter.module import Module
+from pypy.interpreter.module import Module, init_extra_module_attrs
 from pypy.interpreter.function import Function, BuiltinFunction
 from pypy.interpreter import gateway
 from pypy.interpreter.error import OperationError
@@ -18,6 +18,7 @@
 def __init__(self, space, w_name):
 """ NOT_RPYTHON """
 Module.__init__(self, space, w_name)
+init_extra_module_attrs(space, self)
 self.lazy = True
 self.lazy_initial_values_w = {}
 self.__class__.buildloaders()
diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -119,7 +119,7 @@
 
 def _prepare_module(space, w_mod, filename, pkgdir):
 space.sys.setmodule(w_mod)
-space.setattr(w_mod, space.newtext('__file__'), space.newtext(filename))
+space.setattr(w_mod, space.newtext('__file__'), 
space.newfilename(filename))
 space.setattr(w_mod, space.newtext('__doc__'), space.w_None)
 if pkgdir is not None:
 space.setattr(w_mod, space.newtext('__path__'),
diff --git a/pypy/module/zipimport/interp_zipimport.py 
b/pypy/module/zipimport/interp_zipimport.py
--- a/pypy/module/zipimport/interp_zipimport.py
+++ b/pypy/module/zipimport/interp_zipimport.py
@@ -373,7 +373,7 @@
 if self.have_modulefile(space, filename + ext):
 return True, None
 # See if this is a directory (part of a namespace pkg)
-dirpath = self.prefix + fullname
+dirpath = self.prefix + fullname.split(".")[-1]
 if self.have_modulefile(space, dirpath + ZIPSEP):
 return True, self.filename + os.path.sep + self.corr_zname(dirpath)
 return False, None
diff --git a/pypy/module/zipimport/test/test_zipimport.py 
b/pypy/module/zipimport/test/test_zipimport.py
--- a/pypy/module/zipimport/test/test_zipimport.py
+++ b/pypy/module/zipimport/test/test_zipimport.py
@@ -431,7 +431,7 @@
 z.writestr(zinfo, '')
 z.close()
 try:
-zipimport.zipimporter(filename)
+zipimport.zipimporter(filename).load_module('uu')
 finally:
 os.remove(filename)
 
@@ -446,6 +446,13 @@
 foo = __import__('foo.one', None, None, [])
 assert foo.one.attr == 'portion1 foo one'
 
+def test_namespace_pkg_nested(self):
+self.writefile('foo/', '')
+self.writefile('foo/bar/', '')
+self.writefile('foo/bar/one.py', "attr = 'portion1 foo one'\n")
+foo = __import__('foo.bar.one', None, None, [])
+assert foo.bar.one.attr == 'portion1 foo one'
+
 
 if os.sep != '/':
 class AppTestNativePathSep(AppTestZipimport):
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit