[pypy-commit] pypy release-pypy2.7-5.x: merge default into release for cffi 1.11.1

mattip pypy.commits at gmail.com
Wed Sep 27 15:31:23 EDT 2017


Author: Matti Picus <matti.picus at gmail.com>
Branch: release-pypy2.7-5.x
Changeset: r92483:fedadd23d48b
Date: 2017-09-27 22:24 +0300
http://bitbucket.org/pypy/pypy/changeset/fedadd23d48b/

Log:	merge default into release for cffi 1.11.1

diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -60,8 +60,8 @@
   Wim Lavrijsen
   Eric van Riet Paap
   Richard Emslie
+  Remi Meier
   Alexander Schremmer
-  Remi Meier
   Dan Villiom Podlaski Christiansen
   Lukas Diekmann
   Sven Hager
@@ -102,6 +102,7 @@
   Michael Foord
   Stephan Diehl
   Stefano Rivera
+  Jean-Paul Calderone
   Stefan Schwarzer
   Tomek Meka
   Valentino Volonghi
@@ -110,14 +111,13 @@
   Bob Ippolito
   Bruno Gola
   David Malcolm
-  Jean-Paul Calderone
   Squeaky
   Edd Barrett
   Timo Paulssen
   Marius Gedminas
+  Nicolas Truessel
   Alexandre Fayolle
   Simon Burton
-  Nicolas Truessel
   Martin Matusiak
   Laurence Tratt
   Wenzhu Man
@@ -156,6 +156,7 @@
   Stefan H. Muller
   Tim Felgentreff
   Eugene Oden
+  Dodan Mihai
   Jeff Terrace
   Henry Mason
   Vasily Kuznetsov
@@ -182,11 +183,13 @@
   Rocco Moretti
   Gintautas Miliauskas
   Lucian Branescu Mihaila
+  Mariano Anaya
   anatoly techtonik
-  Dodan Mihai
   Karl Bartel
+  Stefan Beyer
   Gabriel Lavoie
   Jared Grubb
+  Alecsandru Patrascu
   Olivier Dormond
   Wouter van Heyst
   Sebastian Pawluś
@@ -194,6 +197,7 @@
   Victor Stinner
   Andrews Medina
   Aaron Iles
+  p_zieschang at yahoo.de
   Toby Watson
   Daniel Patrick
   Stuart Williams
@@ -204,6 +208,7 @@
   Michael Cheng
   Mikael Schönenberg
   Stanislaw Halik
+  Mihnea Saracin
   Berkin Ilbeyi
   Gasper Zejn
   Faye Zhao
@@ -214,14 +219,12 @@
   Jonathan David Riehl
   Beatrice During
   Alex Perry
-  p_zieschang at yahoo.de
   Robert Zaremba
   Alan McIntyre
   Alexander Sedov
   Vaibhav Sood
   Reuben Cummings
   Attila Gobi
-  Alecsandru Patrascu
   Christopher Pope
   Tristan Arthur
   Christian Tismer 
@@ -243,7 +246,6 @@
   Jacek Generowicz
   Sylvain Thenault
   Jakub Stasiak
-  Stefan Beyer
   Andrew Dalke
   Alejandro J. Cura
   Vladimir Kryachko
@@ -275,6 +277,7 @@
   Christoph Gerum
   Miguel de Val Borro
   Artur Lisiecki
+  afteryu
   Toni Mattis
   Laurens Van Houtven
   Bobby Impollonia
@@ -305,6 +308,7 @@
   Anna Katrina Dominguez
   Kim Jin Su
   Amber Brown
+  Anthony Sottile
   Nate Bragg
   Ben Darnell
   Juan Francisco Cantero Hurtado
@@ -325,12 +329,14 @@
   Mike Bayer
   Rodrigo Araújo
   Daniil Yarancev
+  Min RK
   OlivierBlanvillain
   Jonas Pfannschmidt
   Zearin
   Andrey Churin
   Dan Crosta
   reubano at gmail.com
+  Stanisław Halik
   Julien Phalip
   Roman Podoliaka
   Eli Stevens
diff --git a/lib_pypy/cffi.egg-info/PKG-INFO b/lib_pypy/cffi.egg-info/PKG-INFO
--- a/lib_pypy/cffi.egg-info/PKG-INFO
+++ b/lib_pypy/cffi.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: cffi
-Version: 1.11.0
+Version: 1.11.1
 Summary: Foreign Function Interface for Python calling C code.
 Home-page: http://cffi.readthedocs.org
 Author: Armin Rigo, Maciej Fijalkowski
diff --git a/lib_pypy/cffi/__init__.py b/lib_pypy/cffi/__init__.py
--- a/lib_pypy/cffi/__init__.py
+++ b/lib_pypy/cffi/__init__.py
@@ -4,8 +4,8 @@
 from .api import FFI
 from .error import CDefError, FFIError, VerificationError, VerificationMissing
 
-__version__ = "1.11.0"
-__version_info__ = (1, 11, 0)
+__version__ = "1.11.1"
+__version_info__ = (1, 11, 1)
 
 # The verifier module file names are based on the CRC32 of a string that
 # contains the following version number.  It may be older than __version__
diff --git a/lib_pypy/cffi/_embedding.h b/lib_pypy/cffi/_embedding.h
--- a/lib_pypy/cffi/_embedding.h
+++ b/lib_pypy/cffi/_embedding.h
@@ -247,7 +247,7 @@
 
         if (f != NULL && f != Py_None) {
             PyFile_WriteString("\nFrom: " _CFFI_MODULE_NAME
-                               "\ncompiled with cffi version: 1.11.0"
+                               "\ncompiled with cffi version: 1.11.1"
                                "\n_cffi_backend module: ", f);
             modules = PyImport_GetModuleDict();
             mod = PyDict_GetItemString(modules, "_cffi_backend");
diff --git a/lib_pypy/pyrepl/historical_reader.py b/lib_pypy/pyrepl/historical_reader.py
--- a/lib_pypy/pyrepl/historical_reader.py
+++ b/lib_pypy/pyrepl/historical_reader.py
@@ -17,7 +17,7 @@
 # CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-from pyrepl import reader, commands
+from pyrepl import reader, commands, input
 from pyrepl.reader import Reader as R
 
 isearch_keymap = tuple(
@@ -214,7 +214,6 @@
                   isearch_forwards, isearch_backwards, operate_and_get_next]:
             self.commands[c.__name__] = c
             self.commands[c.__name__.replace('_', '-')] = c
-        from pyrepl import input
         self.isearch_trans = input.KeymapTranslator(
             isearch_keymap, invalid_cls=isearch_end,
             character_cls=isearch_add_character)
diff --git a/pypy/doc/contributor.rst b/pypy/doc/contributor.rst
--- a/pypy/doc/contributor.rst
+++ b/pypy/doc/contributor.rst
@@ -27,8 +27,8 @@
   Wim Lavrijsen
   Eric van Riet Paap
   Richard Emslie
+  Remi Meier
   Alexander Schremmer
-  Remi Meier
   Dan Villiom Podlaski Christiansen
   Lukas Diekmann
   Sven Hager
@@ -69,6 +69,7 @@
   Michael Foord
   Stephan Diehl
   Stefano Rivera
+  Jean-Paul Calderone
   Stefan Schwarzer
   Tomek Meka
   Valentino Volonghi
@@ -77,14 +78,13 @@
   Bob Ippolito
   Bruno Gola
   David Malcolm
-  Jean-Paul Calderone
   Squeaky
   Edd Barrett
   Timo Paulssen
   Marius Gedminas
+  Nicolas Truessel
   Alexandre Fayolle
   Simon Burton
-  Nicolas Truessel
   Martin Matusiak
   Laurence Tratt
   Wenzhu Man
@@ -123,6 +123,7 @@
   Stefan H. Muller
   Tim Felgentreff
   Eugene Oden
+  Dodan Mihai
   Jeff Terrace
   Henry Mason
   Vasily Kuznetsov
@@ -149,11 +150,13 @@
   Rocco Moretti
   Gintautas Miliauskas
   Lucian Branescu Mihaila
+  Mariano Anaya
   anatoly techtonik
-  Dodan Mihai
   Karl Bartel
+  Stefan Beyer
   Gabriel Lavoie
   Jared Grubb
+  Alecsandru Patrascu
   Olivier Dormond
   Wouter van Heyst
   Sebastian Pawluś
@@ -161,6 +164,7 @@
   Victor Stinner
   Andrews Medina
   Aaron Iles
+  p_zieschang at yahoo.de
   Toby Watson
   Daniel Patrick
   Stuart Williams
@@ -171,6 +175,7 @@
   Michael Cheng
   Mikael Schönenberg
   Stanislaw Halik
+  Mihnea Saracin
   Berkin Ilbeyi
   Gasper Zejn
   Faye Zhao
@@ -181,14 +186,12 @@
   Jonathan David Riehl
   Beatrice During
   Alex Perry
-  p_zieschang at yahoo.de
   Robert Zaremba
   Alan McIntyre
   Alexander Sedov
   Vaibhav Sood
   Reuben Cummings
   Attila Gobi
-  Alecsandru Patrascu
   Christopher Pope
   Tristan Arthur
   Christian Tismer 
@@ -210,7 +213,6 @@
   Jacek Generowicz
   Sylvain Thenault
   Jakub Stasiak
-  Stefan Beyer
   Andrew Dalke
   Alejandro J. Cura
   Vladimir Kryachko
@@ -242,6 +244,7 @@
   Christoph Gerum
   Miguel de Val Borro
   Artur Lisiecki
+  afteryu
   Toni Mattis
   Laurens Van Houtven
   Bobby Impollonia
@@ -272,6 +275,7 @@
   Anna Katrina Dominguez
   Kim Jin Su
   Amber Brown
+  Anthony Sottile
   Nate Bragg
   Ben Darnell
   Juan Francisco Cantero Hurtado
@@ -292,12 +296,14 @@
   Mike Bayer
   Rodrigo Araújo
   Daniil Yarancev
+  Min RK
   OlivierBlanvillain
   Jonas Pfannschmidt
   Zearin
   Andrey Churin
   Dan Crosta
   reubano at gmail.com
+  Stanisław Halik
   Julien Phalip
   Roman Podoliaka
   Eli Stevens
diff --git a/pypy/doc/index-of-release-notes.rst b/pypy/doc/index-of-release-notes.rst
--- a/pypy/doc/index-of-release-notes.rst
+++ b/pypy/doc/index-of-release-notes.rst
@@ -6,6 +6,7 @@
 
 .. toctree::
 
+   release-v5.9.0.rst
    release-v5.8.0.rst
    release-v5.7.1.rst
    release-v5.7.0.rst
diff --git a/pypy/doc/index-of-whatsnew.rst b/pypy/doc/index-of-whatsnew.rst
--- a/pypy/doc/index-of-whatsnew.rst
+++ b/pypy/doc/index-of-whatsnew.rst
@@ -7,6 +7,7 @@
 .. toctree::
 
    whatsnew-head.rst
+   whatsnew-pypy2-5.9.0.rst
    whatsnew-pypy2-5.8.0.rst
    whatsnew-pypy2-5.7.0.rst
    whatsnew-pypy2-5.6.0.rst
@@ -36,6 +37,7 @@
 .. toctree::
 
    whatsnew-pypy3-head.rst
+   whatsnew-pypy3-5.9.0.rst
    whatsnew-pypy3-5.8.0.rst
    whatsnew-pypy3-5.7.0.rst
 
diff --git a/pypy/doc/release-v5.9.0.rst b/pypy/doc/release-v5.9.0.rst
new file mode 100644
--- /dev/null
+++ b/pypy/doc/release-v5.9.0.rst
@@ -0,0 +1,213 @@
+=====================================
+PyPy2.7 and PyPy3.5 v5.9 dual release
+=====================================
+
+The PyPy team is proud to release both PyPy2.7 v5.9 (an interpreter supporting
+Python 2.7 syntax), and a beta-quality PyPy3.5 v5.9 (an interpreter for Python
+3.5 syntax). The two releases are both based on much the same codebase, thus
+the dual release.  Note that PyPy3.5 supports Linux 64bit only for now. 
+
+This new PyPy2.7 release includes the upstream stdlib version 2.7.13, and
+PyPy3.5 includes the upstream stdlib version 3.5.3.
+
+NumPy and Pandas now work on PyPy2.7. Issues that appeared as excessive memory
+use were cleared up and other incompatibilities were resolved. The C-API
+compatibility layer does slow down code which crosses the python-c interface
+often, we have ideas on how it could be improved, and still recommend
+using pure python on PyPy or interfacing via CFFI_. Many other modules
+based on C-API exentions now work on PyPy as well.
+
+Cython 0.27 (released last week) should support more projects with PyPy, both
+on PyPy2.7 and PyPy3.5 beta.
+
+We optimized the JSON parser for recurring string keys, which should decrease
+memory use to 50% and increase parsing speed by up to 15% for large JSON files
+with many repeating dictionary keys (which is quite common).
+
+CFFI_, which is part of the PyPy release, has been updated to 1.11.1,
+improving an already great package for interfacing with C. CFFI now supports
+complex arguments in API mode, as well as ``char16_t`` and ``char32_t`` and has
+improved support for callbacks.
+
+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 sponsored by a Mozilla grant_ continues on PyPy3.5; numerous fixes from
+CPython were ported to PyPy. Of course the bug fixes and performance enhancements
+mentioned above are part of both PyPy2.7 and PyPy3.5 beta.
+
+As always, this release fixed many other issues and bugs raised by the
+growing community of PyPy users. We strongly recommend updating.
+
+You can download the v5.9 releases here:
+
+    http://pypy.org/download.html
+
+We would like to thank our donors for the continued support of the PyPy
+project.
+
+We would also like to thank our contributors and
+encourage new people to join the project. PyPy has many
+layers and we need help with all of them: `PyPy`_ and `RPython`_ documentation
+improvements, tweaking popular `modules`_ to run on pypy, or general `help`_
+with making RPython's JIT even better.
+
+.. _vmprof: http://vmprof.readthedocs.io
+.. _CFFI: https://cffi.readthedocs.io/en/latest/whatsnew.html
+.. _grant: https://morepypy.blogspot.com/2016/08/pypy-gets-funding-from-mozilla-for.html
+.. _`PyPy`: index.html
+.. _`RPython`: https://rpython.readthedocs.org
+.. _`modules`: project-ideas.html#make-more-python-modules-pypy-friendly
+.. _`help`: project-ideas.html
+
+What is PyPy?
+=============
+
+PyPy is a very compliant Python interpreter, almost a drop-in replacement for
+CPython 2.7 and CPython 3.5. It's fast (`PyPy and CPython 2.7.x`_ performance comparison)
+due to its integrated tracing JIT compiler.
+
+We also welcome developers of other `dynamic languages`_ to see what RPython
+can do for them.
+
+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)
+  
+  * newer **ARM** hardware (ARMv6 or ARMv7, with VFPv3) running Linux,
+  
+  * big- and little-endian variants of **PPC64** running Linux,
+
+  * **s390x** running Linux
+
+.. _`PyPy and CPython 2.7.x`: http://speed.pypy.org
+.. _`dynamic languages`: http://rpython.readthedocs.io/en/latest/examples.html
+
+Highlights of the PyPy2.7, cpyext, and RPython changes (since 5.8 released June, 2017)
+======================================================================================
+
+See also issues that were resolved_
+
+Note that these are also merged into PyPy 3.5
+
+* New features and cleanups
+
+  * Add support for ``PyFrozenSet_New``, ``PyObject_HashNotImplemented``,
+    ``PyObject_Print(NULL, ...)``, ``PyObject_RichCompareBool(a, a, ...)``,
+    ``PyType_IS_GC`` (does nothing), ``PyUnicode_FromFormat``
+  * ctypes ``char_p`` and ``unichar_p`` indexing now CPython compatible
+  * ``gcdump`` now reports largest object
+  * More complete support in the ``_curses`` CFFI module
+  * Add cPickle.Unpickler.find_global (issue 1853_)
+  * Fix ``PyErr_Fetch`` + ``PyErr_NormalizeException`` with no exception set
+  * Simplify ``gc.get_referrers()`` to return the opposite of ``gc.get_referents()``
+  * Update RevDB to version pypy2.7-v5.6.2
+  * Previously, ``instance.method`` would return always the same bound method
+    object, when gotten from the same instance (as far as ``is`` and ``id()``
+    can tell).  CPython doesn't do that.  Now PyPy, like CPython, returns a 
+    different bound method object every time.  For ``type.method``, PyPy2 still
+    returns always the same *unbound* method object; CPython does it for built-in
+    types but not for user-defined types
+  * Link to disable PaX protection for the JIT when needed
+  * Update build instructions and an rarely used Makefile
+  * Recreate support for using leakfinder in cpyext tests which had suffered
+    bit-rot, disable due to many false positives
+  * Add more functionality to ``sysconfig``
+  * Added ``_swappedbytes_`` support for ``ctypes.Structure``
+  * Better support the ``inspect`` module on ``frames``
+
+* Bug Fixes 
+
+  * Fix issue 2592_ - cpyext ``PyListObject.pop``, ``pop_end`` must return a value
+  * Implement ``PyListOjbect.getstorage_copy``
+  * Fix for ``reversed(dictproxy)`` issue 2601_
+  * Fix for duplicate names in ctypes' ``_fields__``, issue 2621_
+  * Update built-in ``pyexpat`` module on win32 to use UTF-8 version not UTF-16
+  * ``gc.get_objects`` now handles objects with finalizers more consistently
+  * Fixed memory leak in ``SSLContext.getpeercert`` returning validated
+    certificates and ``SSLContext.get_ca_certs(binary_mode=True)``
+    (_get_crl_dp) `CPython issue 29738`_
+
+* Performance improvements:
+
+  * Improve performance of ``bytearray.extend`` by rewriting portions in app-level
+  * Optimize list accesses with constant indexes better by retaining more
+    information about them
+  * Add a jit driver for ``array.count`` and ``array.index``
+  * Improve information retained in a bridge wrt ``array``
+  * Move some dummy CAPI functions and ``Py*_Check`` functions from RPython into
+    pure C macros
+  * In the fast ``zip(intlist1, intlist2)`` implementation, don't wrap and unwrap
+    all the ints
+  * Cache string keys that occur in JSON dicts, as they are likely to repeat
+
+* RPython improvements
+
+  * Do not preallocate a RPython list if we only know an upper bound on its size
+  * Issue 2590_: fix the bounds in the GC when allocating a lot of objects with finalizers
+  * Replace magical NOT RPYTHON comment with a decorator
+  * Implement ``socket.sendmsg()``/``.recvmsg()`` for py3.5
+
+* Degredations
+
+  * Disable vmprof on win32, due to upstream changes that break the internal ``_vmprof`` module
+
+.. _here: cpython_differences.html
+.. _1853: https://bitbucket.org/pypy/pypy/issues/1853
+.. _2592: https://bitbucket.org/pypy/pypy/issues/2592
+.. _2590: https://bitbucket.org/pypy/pypy/issues/2590
+.. _2621: https://bitbucket.org/pypy/pypy/issues/2621
+
+Highlights of the PyPy3.5 release (since 5.8 beta released June 2017)
+======================================================================
+
+* New features
+
+  * Add support for ``_PyNamespace_New``, ``PyMemoryView_FromMemory``, 
+    ``Py_EnterRecursiveCall`` raising RecursionError, ``PyObject_LengthHint``,
+    ``PyUnicode_FromKindAndData``, ``PyDict_SetDefault``, ``PyGenObject``,
+    ``PyGenObject``, ``PyUnicode_Substring``, ``PyLong_FromUnicodeObject``
+  * Implement ``PyType_FromSpec`` (PEP 384) and fix issues with PEP 489 support
+  * Support the new version of ``os.stat()`` on win32
+  * Use ``stat3()`` on Posix
+  * Accept buffer objects as filenames, except for `oslistdir``
+  * Make slices of array ``memoryview`` s usable as writable buffers if contiguous
+  * Better handling of ``'%s'`` formatting for byte strings which might be utf-8 encoded
+  * Update the macros ``Py_DECREF`` and similar to use the CPython 3.5 version
+  * Ensure that ``mappingproxy`` is recognised as a mapping, not a sequence
+  * Enable PGO for CLang
+  * Rework ``cppyy`` packaging and rename the backend to ``_cppyy``
+  * Support for libressl 2.5.4
+  * Mirror CPython ``classmethod __reduce__`` which fixes pickling test
+  * Use utf-8 for ``readline`` history file
+  * Allow assigning ``'__class__'`` between ``ModuleType`` and its subclasses
+  * Add async slot functions in cpyext
+
+* Bug Fixes
+
+  * Try to make ``openssl`` CFFI bindings more general and future-proof
+  * Better support ``importlib`` by only listing built-in modules in ``sys.builtin``
+  * Add ``memory_pressure`` to large CFFI allocations in ``_lzma``, issue 2579_
+  * Fix for ``reversed(mapping object)`` issue 2601_
+  * Fixing regression with non-started generator receiving non-``None``, should
+    always raise ``TypeError``
+  * ``itertools.islice``: use same logic as CPython, fixes 2643_
+
+* Performance improvements:
+
+  * 
+
+* The following features of Python 3.5 are not implemented yet in PyPy:
+
+  * PEP 442: Safe object finalization
+
+.. _resolved: whatsnew-pypy2-5.9.0.html
+.. _2579: https://bitbucket.org/pypy/pypy/issues/2579
+.. _2601: https://bitbucket.org/pypy/pypy/issues/2601
+.. _2643: https://bitbucket.org/pypy/pypy/issues/2643
+.. _CPython issue 29738: https://bugs.python.org/issue29738
+
+Please update, and continue to help us make PyPy better.
+
+Cheers
diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-pypy2-5.9.0.rst
copy from pypy/doc/whatsnew-head.rst
copy to pypy/doc/whatsnew-pypy2-5.9.0.rst
diff --git a/pypy/doc/whatsnew-pypy3-5.9.0.rst b/pypy/doc/whatsnew-pypy3-5.9.0.rst
new file mode 100644
--- /dev/null
+++ b/pypy/doc/whatsnew-pypy3-5.9.0.rst
@@ -0,0 +1,7 @@
+=======================
+What's new in PyPy3 5.9
+=======================
+
+.. this is the revision after release-pypy3.5-5.8
+.. startrev: afbf09453369
+
diff --git a/pypy/doc/whatsnew-pypy3-head.rst b/pypy/doc/whatsnew-pypy3-head.rst
--- a/pypy/doc/whatsnew-pypy3-head.rst
+++ b/pypy/doc/whatsnew-pypy3-head.rst
@@ -1,7 +1,7 @@
 =========================
-What's new in PyPy3 5.7+
+What's new in PyPy3 5.9+
 =========================
 
-.. this is the revision after release-pypy3.3-5.7.x was branched
-.. startrev: afbf09453369
+.. this is the revision after release-pypy3.5-5.9
+.. startrev: be41e3ac0a29
 
diff --git a/pypy/module/_cffi_backend/__init__.py b/pypy/module/_cffi_backend/__init__.py
--- a/pypy/module/_cffi_backend/__init__.py
+++ b/pypy/module/_cffi_backend/__init__.py
@@ -3,7 +3,7 @@
 from rpython.rlib import rdynload, clibffi
 from rpython.rtyper.lltypesystem import rffi
 
-VERSION = "1.11.0"
+VERSION = "1.11.1"
 
 FFI_DEFAULT_ABI = clibffi.FFI_DEFAULT_ABI
 try:
diff --git a/pypy/module/_cffi_backend/test/_backend_test_c.py b/pypy/module/_cffi_backend/test/_backend_test_c.py
--- a/pypy/module/_cffi_backend/test/_backend_test_c.py
+++ b/pypy/module/_cffi_backend/test/_backend_test_c.py
@@ -1,7 +1,7 @@
 # ____________________________________________________________
 
 import sys
-assert __version__ == "1.11.0", ("This test_c.py file is for testing a version"
+assert __version__ == "1.11.1", ("This test_c.py file is for testing a version"
                                  " of cffi that differs from the one that we"
                                  " get from 'import _cffi_backend'")
 if sys.version_info < (3,):
diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
--- a/pypy/module/_ssl/interp_ssl.py
+++ b/pypy/module/_ssl/interp_ssl.py
@@ -1315,7 +1315,7 @@
         if not ctx:
             raise ssl_error(space, "failed to allocate SSL context")
 
-        rgc.add_memory_pressure(10 * 1024 * 1024)
+        rgc.add_memory_pressure(10 * 1024)
         self = space.allocate_instance(_SSLContext, w_subtype)
         self.ctx = ctx
         self.check_hostname = False
diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py
--- a/pypy/module/cpyext/api.py
+++ b/pypy/module/cpyext/api.py
@@ -1314,6 +1314,18 @@
     decls = defaultdict(list)
     for decl in FORWARD_DECLS:
         decls[pypy_decl].append("%s;" % (decl,))
+    decls[pypy_decl].append("""
+        /* hack for https://bugs.python.org/issue29943 */
+        PyAPI_FUNC(int) %s(PySliceObject *arg0,
+                           Signed arg1, Signed *arg2,
+                           Signed *arg3, Signed *arg4, Signed *arg5);
+        static int PySlice_GetIndicesEx(PySliceObject *arg0, Py_ssize_t arg1,
+                Py_ssize_t *arg2, Py_ssize_t *arg3, Py_ssize_t *arg4,
+                Py_ssize_t *arg5) {
+            return %s(arg0, arg1, arg2, arg3,
+                      arg4, arg5);
+        }
+    """ % ((mangle_name(prefix, 'PySlice_GetIndicesEx'),)*2))
 
     for header_name, header_functions in FUNCTIONS_BY_HEADER.iteritems():
         header = decls[header_name]


More information about the pypy-commit mailing list