Author: Matti Picus <matti.pi...@gmail.com>
Branch: py3.5
Changeset: r90748:b6b60142458f
Date: 2017-03-18 21:47 +0200
http://bitbucket.org/pypy/pypy/changeset/b6b60142458f/

Log:    merge default into py3.5

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
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,23 +2,24 @@
 PyPy2.7 and PyPy3.5 v5.7 - two in one release
 =============================================
 
-We have released PyPy2.7 and a beta-quality PyPy3.5 v5.7.
+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
-compatibility layer (cpyext). PyPy2 can now import and run many c-extension
-packages, among the most notable are numpy, cython, and pandas. Performance may
+compatibility layer (cpyext). PyPy2 can now import and run many C-extension
+packages, among the most notable are Numpy, Cython, and Pandas. Performance may
 be slower than CPython, especially for frequently-called short C functions.
 Please let us know if your use case is slow, we have ideas how to make things
 faster but need real-world examples (not micro-benchmarks) of problematic code.
 
 Work proceeds at a good pace on the PyPy3.5
 version due to a grant_ from the Mozilla Foundation, hence our first 3.5.3 beta
-release. Thanks Mozilla !!! While we do not pass all tests, asyncio works and
+release. Thanks Mozilla !!! While we do not pass all tests yet, asyncio works 
and
 as `these benchmarks show`_ it already gives a nice speed bump.
-We also backported the ``f""`` formatting from 3.6 (as an expection; otherwise
+We also backported the ``f""`` formatting from 3.6 (as an exception; otherwise
 "PyPy3.5" supports the Python 3.5 language).
 
 CFFI_ has been updated to 1.10, improving an already great package for
@@ -65,7 +66,7 @@
 We also welcome developers of other `dynamic languages`_ to see what RPython
 can do for them.
 
-This release supports: 
+The PyPy 2.7 release supports: 
 
   * **x86** machines on most common operating systems
     (Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD)
@@ -80,64 +81,58 @@
 .. _`dynamic languages`: http://rpython.readthedocs.io/en/latest/examples.html
 
 Highlights of the PyPy2.7, cpyext, and RPython changes (since 5.6 released 
Nov, 2016)
-=============================================================================================
+=====================================================================================
 
 See also issues that were resolved_
 
 * New features and cleanups
 
   * update the format of the PYPYLOG file and improvements to vmprof
-  * improve the consistency of RPython annotation unions
   * emit more sysconfig values for downstream cextension packages
-  * add PyAnySet_Check, PyModule_GetName, PyWeakref_Check*,
-    _PyImport_{Acquire,Release}Lock, PyGen_Check*, PyOS_AfterFork,
-  * add translation option --keepgoing to continue after the first 
AnnotationError
+  * add ``PyAnySet_Check``, ``PyModule_GetName``, ``PyWeakref_Check*``,
+    ``_PyImport_{Acquire,Release}Lock``, ``PyGen_Check*``, ``PyOS_AfterFork``,
   * detect and raise on recreation of a PyPy object from a PyObject during
     tp_dealloc
   * refactor and clean up poor handling of unicode exposed in work on py3.5
-  * builtin cppyy_ supports C++ 11, 14, etc. via cling (reflex has been 
removed)
-  * add translation time --disable_entrypoints option for embedding PyPy 
together
-    with another RPython VM
-  * adapt ``weakref`` according to Python issue #19542, will be in CPython 
2.7.14
+  * builtin module cppyy_ supports C++ 11, 14, etc. via cling (reflex has been 
removed)
+  * adapt ``weakref`` according to CPython issue #19542_, will be in CPython 
2.7.14
   * support translations with cpyext and the Boehm GC (for special cases like
-    revdb
+    RevDB_
   * implement ``StringBuffer.get_raw_address`` for the buffer protocol, it is
     now possible to obtain the address of any readonly object without pinning 
it
   * refactor the initialization code in translating cpyext
-  * fix ``"".replace("", "x", num)`` to give the same result as CPython
   * use a cffi-style C parser to create rffi objects in cpyext, now the
-    translating python must have cffi available
-  * add a rpython implementation of siphash24, allow choosing hash algorithm
-    randomizing the seed
-  * make ``attach_gdb`` work on Windows (with Visual Studio Debugger)
+    translating Python must have either ``cffi`` or ``pycparser`` available
   * implement ``move_to_end(last=True/False)`` on RPython ordered dicts, make
     available as ``__pypy__.move_to_end`` and, on py3.5,
     ``OrderedDict.move_to_end()``
   * remove completely RPython ``space.wrap`` in a major cleanup, differentiate
     between ``space.newtext`` and ``space.newbytes`` on py3.5
-  * improve shadowstack to where it is now the default in place of asmgcc
+  * any uncaught RPython exception in the interpreter is turned into a
+    SystemError (rather than a segfault)
+  * add translation time --disable_entrypoints option for embedding PyPy 
together
+    with another RPython VM
+
 
 * Bug Fixes
 
-  * any uncaught RPython exception in the interpreter is turned into a
-    SystemError (rather than a segfault)
+  * fix ``"".replace("", "x", num)`` to give the same result as CPython
   * create log files without the executable bit
-  * disable clock_gettime() on OS/X, since we support 10.11 and it was only
+  * disable ``clock_gettime()`` on OS/X, since we support 10.11 and it was only
     added in 10.12
-  * support HAVE_FSTATVFS which was unintentionally always false
-  * fix user-created C-API heaptype, issue #2434
-  * fix PyDict_Update is not actually the same as dict.update
-  * assign tp_doc on PyTypeObject and tie it to the app-level __doc__ attribute
-    issue #2446
+  * support ``HAVE_FSTATVFS`` which was unintentionally always false
+  * fix user-created C-API heaptype, issue #2434_
+  * fix ``PyDict_Update`` is not actually the same as ``dict.update``
+  * assign ``tp_doc`` on ``PyTypeObject`` and tie it to the app-level 
``__doc__`` attribute
+    issue #2446_
   * clean up memory leaks around ``PyObject_GetBuffer``, 
``PyMemoryView_GET_BUFFER``,
     ``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
+  * improve support for creating C-extension objects from app-level classes,
+    filling more slots, especially ``tp_new`` and ``tp_dealloc``
+  * fix for ``ctypes.c_bool`` returning ``bool`` restype, issue #2475_
   * fix in corner cases with the GIL and C-API functions
 
+
 * Performance improvements:
 
   * clean-ups in the jit optimizeopt
@@ -158,17 +153,28 @@
     information across failing guards
   * add optimized "zero-copy" path for ``io.FileIO.readinto``
 
+* RPython improvements
+
+  * improve the consistency of RPython annotation unions
+  * add translation option --keepgoing to continue after the first 
AnnotationError
+  * 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)
-=========================================================
+==========================================================================
 
-Development moved from the py3k branch to the py3.5 branch in the pypy 
bitbucket repo
+Development moved from the py3k branch to the py3.5 branch in the PyPy 
bitbucket repo.
 
 * New features
 
-  * this first PyPy3.5 release implements much, but not all, of Python 3.5.3
+  * this first PyPy3.5 release implements most of Python 3.5.3, exceptions are 
listed below
   * PEP 456 allowing secure and interchangable hash algorithms
   * use cryptography_'s cffi backend for SSL
 
+
 * Bug Fixes
 
   * implement fixes for some CPython issues that arose since the last release 
@@ -176,12 +182,23 @@
 
 * Performance improvements:
 
-  * do not create a list whenever descr_new of a bytesobject is called
+  * do not create a list whenever ``descr_new`` of a ``bytesobject`` is called
   * 
   * 
   * 
 
+* The following features of Python 3.5 are not implemented yet in PyPy:
+
+  * PEP 442: Safe object finalization
+  * PEP 489: Multi-phase extension module initialization
+  * XXX what else?
+
 .. _resolved: whatsnew-pypy2-5.7.0.html
+.. _19542: https://bugs.python.org/issue19542
+.. _2434: 
https://bitbucket.org/pypy/pypy/issues/2434/support-pybind11-in-conjunction-with-pypys
+.. _2446: 
https://bitbucket.org/pypy/pypy/issues/2446/cpyext-tp_doc-field-not-reflected-on
+.. _2475: https://bitbucket.org/pypy/pypy/issues/2475
+.. _RevDB: https://bitbucket.org/pypy/revdb
 .. _cryptography: https://cryptography.io
 .. _cppyy: cppyy.html
 
diff --git a/pypy/module/cpyext/classobject.py 
b/pypy/module/cpyext/classobject.py
--- a/pypy/module/cpyext/classobject.py
+++ b/pypy/module/cpyext/classobject.py
@@ -70,4 +70,6 @@
     checking."""
     return space.interp_w(InstanceMethod, w_im).w_function
     
+    if w_bases is None:
+        w_bases = space.newtuple([])
 
diff --git a/pypy/module/cpyext/test/test_classobject.py 
b/pypy/module/cpyext/test/test_classobject.py
--- a/pypy/module/cpyext/test/test_classobject.py
+++ b/pypy/module/cpyext/test/test_classobject.py
@@ -27,3 +27,15 @@
         InstanceMethod.testmethod.attribute = "test"
         assert testfunction.attribute == "test"
         raises(AttributeError, setattr, inst.testmethod, "attribute", "test")
+
+    def test_pyclass_new_no_bases(self):
+        module = self.import_extension('foo', [
+            ("new_foo", "METH_O",
+             """
+                 return PyClass_New(NULL, PyDict_New(), args);
+             """)])
+        FooClass = module.new_foo("FooClass")
+        class Cls1:
+            pass
+        assert type(FooClass) is type(Cls1)
+        assert FooClass.__bases__ == Cls1.__bases__
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to