[pypy-commit] pypy default: update contributor.rst
Author: Antonio Cuni Branch: Changeset: r95735:d4cd9570a582 Date: 2019-01-28 17:27 +0100 http://bitbucket.org/pypy/pypy/changeset/d4cd9570a582/ Log:update contributor.rst diff --git a/pypy/doc/contributor.rst b/pypy/doc/contributor.rst --- a/pypy/doc/contributor.rst +++ b/pypy/doc/contributor.rst @@ -7,16 +7,16 @@ Armin Rigo Maciej Fijalkowski Carl Friedrich Bolz-Tereick + Antonio Cuni Amaury Forgeot d'Arc - Antonio Cuni Matti Picus Samuele Pedroni Ronan Lamy Alex Gaynor Philip Jenvey + Richard Plangger Brian Kearns - Richard Plangger - Michael Hudson + Michael Hudson-Doyle Manuel Jacob David Schneider Holger Krekel @@ -26,8 +26,8 @@ Anders Chrigstrom Wim Lavrijsen Eric van Riet Paap + Remi Meier Richard Emslie - Remi Meier Alexander Schremmer Dan Villiom Podlaski Christiansen Lukas Diekmann @@ -37,10 +37,10 @@ Niklaus Haldimann Camillo Bruni Laura Creighton - Romain Guillebert Toon Verwaest Leonardo Santagada Seo Sanghyeon + Romain Guillebert Ronny Pfannschmidt Justin Peel Raffael Tfirst @@ -81,12 +81,12 @@ Squeaky Edd Barrett Timo Paulssen + Laurence Tratt Marius Gedminas Nicolas Truessel Alexandre Fayolle Simon Burton Martin Matusiak - Laurence Tratt Wenzhu Man Konstantin Lopuhin John Witulski @@ -101,8 +101,9 @@ Jean-Philippe St. Pierre Guido van Rossum Pavel Vinogradov + Stefan Beyer + William Leslie Paweł Piotr Przeradowski - William Leslie marky1991 Ilya Osadchiy Tobias Oberstein @@ -111,10 +112,10 @@ Taavi Burns Adrian Kuhn tav + Stian Andreassen Georg Brandl Joannah Nanjekye Bert Freudenberg - Stian Andreassen Wanja Saatkamp Mike Blume Gerald Klix @@ -130,6 +131,7 @@ Vasily Kuznetsov Preston Timmons David Ripton + Pieter Zieschang Dusty Phillips Lukas Renggli Guenter Jantzen @@ -143,6 +145,7 @@ Andrew Durdin Ben Young Michael Schneider + Yusuke Tsutsumi Nicholas Riley Jason Chu Igor Trindade Oliveira @@ -154,7 +157,6 @@ Mariano Anaya anatoly techtonik Karl Bartel - Stefan Beyer Gabriel Lavoie Jared Grubb Alecsandru Patrascu @@ -165,7 +167,6 @@ Victor Stinner Andrews Medina Aaron Iles - p_ziesch...@yahoo.de Toby Watson Daniel Patrick Stuart Williams @@ -177,6 +178,7 @@ Mikael Schönenberg Stanislaw Halik Mihnea Saracin + Matt Jackson Berkin Ilbeyi Gasper Zejn Faye Zhao @@ -184,12 +186,14 @@ Anders Qvist Corbin Simpson Chirag Jadwani + Pauli Virtanen Jonathan David Riehl Beatrice During Alex Perry Robert Zaremba Alan McIntyre Alexander Sedov + David C Ellis Vaibhav Sood Reuben Cummings Attila Gobi @@ -209,7 +213,6 @@ Arjun Naik Aaron Gallagher Alexis Daboville - Pieter Zieschang Karl Ramm Lukas Vacek Omer Katz @@ -237,12 +240,15 @@ Catalin Gabriel Manciu Jacob Oscarson Ryan Gonzalez + Antoine Dupre Kristjan Valur Jonsson Lucio Torre Richard Lancaster Dan Buch Lene Wagner Tomo Cocoa + Miro Hrončok + Anthony Sottile David Lievens Neil Blakey-Milner Henrik Vendelbo @@ -257,10 +263,12 @@ Bobby Impollonia Roberto De Ioris Jeong YunWon + andrewjlawrence Christopher Armstrong Aaron Tubbs Vasantha Ganesh K Jason Michalski + Radu Ciorba Markus Holtermann Andrew Thompson Yusei Tahara @@ -268,28 +276,26 @@ Fabio Niephaus Akira Li Gustavo Niemeyer - Rafał Gałczyński + Nate Bragg Lucas Stadler roberto@goyle + Carl Bordum Hansen Matt Bogosian Yury V. Zaytsev florinpapa Anders Sigfridsson - Matt Jackson Nikolay Zinov rafalgalczyn...@gmail.com Joshua Gilbert Anna Katrina Dominguez Kim Jin Su Amber Brown - Miro Hrončok - Anthony Sottile - Nate Bragg + Andrew Stepanov + Rafał Gałczyński Ben Darnell Juan Francisco Cantero Hurtado Godefroid Chappelle Julian Berman - Michael Hudson-Doyle Stephan Busemann Dan Colish timo @@ -299,6 +305,7 @@ halgari Jim Baker Chris Lambacher + John Aldis coolbutusel...@gmail.com Mike Bayer Rodrigo Araújo @@ -307,6 +314,7 @@ OlivierBlanvillain Jonas Pfannschmidt Zearin + Johan Forsberg Andrey Churin Dan Crosta reub...@gmail.com @@ -316,8 +324,9 @@ Steve Papanik Eli Stevens Boglarka Vezer - gabrielg + gabri...@ec2-54-146-239-158.compute-1.amazonaws.com PavloKapyshin + Hervé Beraud Tomer Chachamu Christopher Groskopf Asmo Soinio @@ -331,8 +340,8 @@ Michael Chermside Anna Ravencroft remarkablerocket - Pauli Virtanen Petre Vijiac + hgattic Berker Peksag Christian Muirhead soareschen @@ -351,12 +360,13 @@ Zooko Wilcox-O Hearn James Lan jiaaro + Evgenii Gorinov Markus Unterwaditzer Kristoffer Kleine Graham Markall Dan Loewenherz werat - Andrew Stepanov + Filip Salomonsson Niclas Olofsson Chris Pres
[pypy-commit] pypy default: start to write a release announcement
Author: Antonio Cuni Branch: Changeset: r95736:8019bdc4d877 Date: 2019-01-28 18:50 +0100 http://bitbucket.org/pypy/pypy/changeset/8019bdc4d877/ Log:start to write a release announcement diff --git a/pypy/doc/release-v7.0.0.rst b/pypy/doc/release-v7.0.0.rst new file mode 100644 --- /dev/null +++ b/pypy/doc/release-v7.0.0.rst @@ -0,0 +1,69 @@ +== +PyPy v7.0.0: triple release of 2.7, 3.5 and 3.6-alpha +== + +The PyPy team is proud to release the version 7.0.0 of PyPy, which includes +three different interpreters: + + - PyPy2.7, which is an interpreter supporting the syntax and the features of +Python 2.7 + + - PyPy3.5, which supports Python 3.5 + + - PyPy3.6-alpha: this is the first official release of PyPy to support 3.6 +features, although it is still considered alpha quality. + +All the interpreters are based on much the same codebase, thus the triple +release. + +XXX write release highlights + +You can download the v6.0 releases here: + +http://pypy.org/download.html + +We would like to thank our donors for the continued support of the PyPy +project. If PyPy is not quite good enough for your needs, we are available for +direct consulting work. + +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. + +.. _`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, 3.5 and 3.6. 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 release supports: + + * **x86** machines on most common operating systems +(Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD) + + * big- and little-endian variants of **PPC64** running Linux, + + * **s390x** running Linux + +Unfortunately at the moment of writing our ARM buildbots are out of service, +so for now we are **not** releasing any binary for the ARM architecture. + +.. _`PyPy and CPython 2.7.x`: http://speed.pypy.org +.. _`dynamic languages`: http://rpython.readthedocs.io/en/latest/examples.html + + +Changelog += + +XXX write me ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: first draft of release note
Author: Matti Picus Branch: Changeset: r95738:07c721ed19aa Date: 2019-01-28 16:20 +0200 http://bitbucket.org/pypy/pypy/changeset/07c721ed19aa/ Log:first draft of release note diff --git a/pypy/doc/release-v7.0.0.rst b/pypy/doc/release-v7.0.0.rst new file mode 100644 --- /dev/null +++ b/pypy/doc/release-v7.0.0.rst @@ -0,0 +1,141 @@ +=== +PyPy2.7, PyPy3.5. PyPy3.6alpha v7.0 release +=== + +The PyPy team is proud to release PyPy2.7 (supporting Python 2.7 syntax), +PyPy3.5 (supporting Python 3.5 syntax with f-strings from 3.6), and our first +alpha release of PyPy3.6 for 64-bit linux only (supporting Python 3.6 syntax). +The releases are based on much the same codebase. + +This release is a feature release following our previous 6.0 release in April +2018. Our C-API compatibility layer ``cpyext`` is more mature, as more projects +use PyPy3.5 in their CI testing. Since these changes affect the included python +development header files, all c-extension modules must be recompiled for this +version. + +Until we can work with downstream providers to distribute builds with PyPy, we +have made packages for some common packages `available as wheels`_. + +The GC now has `hooks`_ to gain more insights into its performance, and it is +now possible to manually manage the GC by using a combination of +``gc.disable`` and ``gc.collect_step``. See the `GC blog post`_. + + +We updated the `cffi`_ module included in PyPy to version 1.12, and the +`cppyy`_ backend to 1.4. Please use these to wrap your C and C++ code, +respectively, for a JIT friendly experience. + +As always, this release is 100% compatible with the previous one and fixed +several issues and bugs raised by the growing community of PyPy users. +We strongly recommend updating. + +The PyPy3.6 release and the Windows PyPy3.5 release are still not production +quality so your mileage may vary. There are open issues with incomplete +compatibility and c-extension support. + +The utf8 branch that changes internal representation of unicode to utf8 did not +make it into the release, so there is still more goodness coming. + +You can download the v7.0 releases here: + +http://pypy.org/download.html + +We would like to thank our donors for the continued support of the PyPy +project. If PyPy is not quite good enough for your needs, we are available for +direct consulting work. + +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. + +.. _`PyPy`: index.html +.. _`RPython`: https://rpython.readthedocs.org +.. _`help`: project-ideas.html +.. _`cffi`: http://cffi.readthedocs.io +.. _`cppyy`: https://cppyy.readthedocs.io +.. _`available as wheels`: https://github.com/antocuni/pypy-wheels +.. _`GC blog post`: https://morepypy.blogspot.com/2019/01/pypy-for-low-latency-systems.html + +What is PyPy? += + +PyPy is a very compliant Python interpreter, almost a drop-in replacement for +CPython 2.7, 3.5 and 3.6. 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 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 + +Changelog += + +If not specified, the changes are shared across versions + +* Support ``__set_name__``, ``__init_subclass__`` (Py3.6) +* Support ``cppyy`` in Py3.5 and Py3.6 +* Use implementation-specific site directories in ``sysconfig`` (Py3.5, Py3.6) +* Adding detection of gcc to ``sysconfig`` (Py3.5, Py3.6) +* Fix multiprocessing regression on newer glibcs +* Make sure 'blocking-ness' of socket is set along with default timeout +* Include ``crypt.h`` for ``crypt()`` on Linux +* Improve and re-organize the contributing_ documentation +* Make the ``__module__`` attribute writable, fixing an incompatibility with + NumPy 1.16 +* Implement ``Py_ReprEnter``, ``Py_ReprLeave(), ``PyMarshal_ReadObjectFromString``, + ``PyMarshal_WriteObjectToString``, ``PyObject_DelItemString``, + ``PyMapping_DelItem``, ``PyMapping_DelItemString``, ``PyEval_GetFrame``, + ``PyOS_InputHook``, ``PyErr_FormatFromCause`` (Py3.6), +* Implement new wordcode instruction encoding (Py3.6) +* Log additional gc-minor and gc-collect-step info in the PYPYLOG +* Set ``reverse-debugger`` act
[pypy-commit] pypy py3.6: merge py3.5 into branch
Author: Matti Picus Branch: py3.6 Changeset: r95739:614f05464dbb Date: 2019-01-28 16:22 +0200 http://bitbucket.org/pypy/pypy/changeset/614f05464dbb/ Log:merge py3.5 into branch diff too long, truncating to 2000 out of 2143 lines diff --git a/extra_tests/cffi_tests/cffi0/test_ffi_backend.py b/extra_tests/cffi_tests/cffi0/test_ffi_backend.py --- a/extra_tests/cffi_tests/cffi0/test_ffi_backend.py +++ b/extra_tests/cffi_tests/cffi0/test_ffi_backend.py @@ -325,19 +325,32 @@ a = array.array('H', [1, 2, 3]) c = ffi.from_buffer(a) assert ffi.typeof(c) is ffi.typeof("char[]") +assert len(c) == 6 ffi.cast("unsigned short *", c)[1] += 500 assert list(a) == [1, 20500, 3] -assert c == ffi.from_buffer(a, True) +assert c == ffi.from_buffer("char[]", a, True) assert c == ffi.from_buffer(a, require_writable=True) # +c = ffi.from_buffer("unsigned short[]", a) +assert len(c) == 3 +assert c[1] == 20500 +# p = ffi.from_buffer(b"abcd") assert p[2] == b"c" # -assert p == ffi.from_buffer(b"abcd", False) -py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd", True) +assert p == ffi.from_buffer(b"abcd", require_writable=False) +py.test.raises((TypeError, BufferError), ffi.from_buffer, + "char[]", b"abcd", True) py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd", require_writable=True) +def test_release(self): +ffi = FFI() +p = ffi.new("int[]", 123) +ffi.release(p) +# here, reading p[0] might give garbage or segfault... +ffi.release(p) # no effect + def test_memmove(self): ffi = FFI() p = ffi.new("short[]", [-1234, -2345, -3456, -4567, -5678]) diff --git a/extra_tests/cffi_tests/cffi1/test_ffi_obj.py b/extra_tests/cffi_tests/cffi1/test_ffi_obj.py --- a/extra_tests/cffi_tests/cffi1/test_ffi_obj.py +++ b/extra_tests/cffi_tests/cffi1/test_ffi_obj.py @@ -239,19 +239,31 @@ def test_ffi_from_buffer(): import array ffi = _cffi1_backend.FFI() -a = array.array('H', [1, 2, 3]) +a = array.array('H', [1, 2, 3, 4]) c = ffi.from_buffer(a) assert ffi.typeof(c) is ffi.typeof("char[]") +assert len(c) == 8 ffi.cast("unsigned short *", c)[1] += 500 -assert list(a) == [1, 20500, 3] -assert c == ffi.from_buffer(a, True) +assert list(a) == [1, 20500, 3, 4] +py.test.raises(TypeError, ffi.from_buffer, a, True) +assert c == ffi.from_buffer("char[]", a, True) assert c == ffi.from_buffer(a, require_writable=True) # +c = ffi.from_buffer("unsigned short[]", a) +assert len(c) == 4 +assert c[1] == 20500 +# +c = ffi.from_buffer("unsigned short[2][2]", a) +assert len(c) == 2 +assert len(c[0]) == 2 +assert c[0][1] == 20500 +# p = ffi.from_buffer(b"abcd") assert p[2] == b"c" # -assert p == ffi.from_buffer(b"abcd", False) -py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd", True) +assert p == ffi.from_buffer(b"abcd", require_writable=False) +py.test.raises((TypeError, BufferError), ffi.from_buffer, + "char[]", b"abcd", True) py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd", require_writable=True) diff --git a/extra_tests/cffi_tests/cffi1/test_new_ffi_1.py b/extra_tests/cffi_tests/cffi1/test_new_ffi_1.py --- a/extra_tests/cffi_tests/cffi1/test_new_ffi_1.py +++ b/extra_tests/cffi_tests/cffi1/test_new_ffi_1.py @@ -1457,6 +1457,35 @@ import gc; gc.collect(); gc.collect(); gc.collect() assert seen == [3] +def test_release(self): +p = ffi.new("int[]", 123) +ffi.release(p) +# here, reading p[0] might give garbage or segfault... +ffi.release(p) # no effect + +def test_release_new_allocator(self): +seen = [] +def myalloc(size): +seen.append(size) +return ffi.new("char[]", b"X" * size) +def myfree(raw): +seen.append(raw) +alloc2 = ffi.new_allocator(alloc=myalloc, free=myfree) +p = alloc2("int[]", 15) +assert seen == [15 * 4] +ffi.release(p) +assert seen == [15 * 4, p] +ffi.release(p)# no effect +assert seen == [15 * 4, p] +# +del seen[:] +p = alloc2("struct ab *") +assert seen == [2 * 4] +ffi.release(p) +assert seen == [2 * 4, p] +ffi.release(p)# no effect +assert seen == [2 * 4, p] + def test_CData_CType(self): assert isinstance(ffi.cast("int", 0), ffi.CData) assert isinstance(ffi.new("int *"), f
[pypy-commit] pypy release-pypy3.6-7.x: version -> 7.0.0 alpha
Author: Matti Picus Branch: release-pypy3.6-7.x Changeset: r95740:a51d929d674b Date: 2019-01-28 16:26 +0200 http://bitbucket.org/pypy/pypy/changeset/a51d929d674b/ Log:version -> 7.0.0 alpha diff --git a/pypy/module/cpyext/include/patchlevel.h b/pypy/module/cpyext/include/patchlevel.h --- a/pypy/module/cpyext/include/patchlevel.h +++ b/pypy/module/cpyext/include/patchlevel.h @@ -32,8 +32,8 @@ * module/sys/version.py * doc/conf.py */ -#define PYPY_VERSION "7.1.0-alpha0" -#define PYPY_VERSION_NUM 0x0701 +#define PYPY_VERSION "7.0.0-alpha0" +#define PYPY_VERSION_NUM 0x0700 /* Defined to mean a PyPy where cpyext holds more regular references to PyObjects, e.g. staying alive as long as the internal PyPy object stays alive. */ diff --git a/pypy/module/sys/version.py b/pypy/module/sys/version.py --- a/pypy/module/sys/version.py +++ b/pypy/module/sys/version.py @@ -13,7 +13,7 @@ # make sure to keep PYPY_VERSION in sync with: #module/cpyext/include/patchlevel.h #doc/conf.py -PYPY_VERSION = (7, 1, 0, "alpha", 0) +PYPY_VERSION = (7, 0, 0, "alpha", 0) import pypy ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: merge heads
Author: Matti Picus Branch: Changeset: r95741:018346b46386 Date: 2019-01-28 20:56 +0200 http://bitbucket.org/pypy/pypy/changeset/018346b46386/ Log:merge heads diff --git a/pypy/doc/contributor.rst b/pypy/doc/contributor.rst --- a/pypy/doc/contributor.rst +++ b/pypy/doc/contributor.rst @@ -7,16 +7,16 @@ Armin Rigo Maciej Fijalkowski Carl Friedrich Bolz-Tereick + Antonio Cuni Amaury Forgeot d'Arc - Antonio Cuni Matti Picus Samuele Pedroni Ronan Lamy Alex Gaynor Philip Jenvey + Richard Plangger Brian Kearns - Richard Plangger - Michael Hudson + Michael Hudson-Doyle Manuel Jacob David Schneider Holger Krekel @@ -26,8 +26,8 @@ Anders Chrigstrom Wim Lavrijsen Eric van Riet Paap + Remi Meier Richard Emslie - Remi Meier Alexander Schremmer Dan Villiom Podlaski Christiansen Lukas Diekmann @@ -37,10 +37,10 @@ Niklaus Haldimann Camillo Bruni Laura Creighton - Romain Guillebert Toon Verwaest Leonardo Santagada Seo Sanghyeon + Romain Guillebert Ronny Pfannschmidt Justin Peel Raffael Tfirst @@ -81,12 +81,12 @@ Squeaky Edd Barrett Timo Paulssen + Laurence Tratt Marius Gedminas Nicolas Truessel Alexandre Fayolle Simon Burton Martin Matusiak - Laurence Tratt Wenzhu Man Konstantin Lopuhin John Witulski @@ -101,8 +101,9 @@ Jean-Philippe St. Pierre Guido van Rossum Pavel Vinogradov + Stefan Beyer + William Leslie Paweł Piotr Przeradowski - William Leslie marky1991 Ilya Osadchiy Tobias Oberstein @@ -111,10 +112,10 @@ Taavi Burns Adrian Kuhn tav + Stian Andreassen Georg Brandl Joannah Nanjekye Bert Freudenberg - Stian Andreassen Wanja Saatkamp Mike Blume Gerald Klix @@ -130,6 +131,7 @@ Vasily Kuznetsov Preston Timmons David Ripton + Pieter Zieschang Dusty Phillips Lukas Renggli Guenter Jantzen @@ -143,6 +145,7 @@ Andrew Durdin Ben Young Michael Schneider + Yusuke Tsutsumi Nicholas Riley Jason Chu Igor Trindade Oliveira @@ -154,7 +157,6 @@ Mariano Anaya anatoly techtonik Karl Bartel - Stefan Beyer Gabriel Lavoie Jared Grubb Alecsandru Patrascu @@ -165,7 +167,6 @@ Victor Stinner Andrews Medina Aaron Iles - p_ziesch...@yahoo.de Toby Watson Daniel Patrick Stuart Williams @@ -177,6 +178,7 @@ Mikael Schönenberg Stanislaw Halik Mihnea Saracin + Matt Jackson Berkin Ilbeyi Gasper Zejn Faye Zhao @@ -184,12 +186,14 @@ Anders Qvist Corbin Simpson Chirag Jadwani + Pauli Virtanen Jonathan David Riehl Beatrice During Alex Perry Robert Zaremba Alan McIntyre Alexander Sedov + David C Ellis Vaibhav Sood Reuben Cummings Attila Gobi @@ -209,7 +213,6 @@ Arjun Naik Aaron Gallagher Alexis Daboville - Pieter Zieschang Karl Ramm Lukas Vacek Omer Katz @@ -237,12 +240,15 @@ Catalin Gabriel Manciu Jacob Oscarson Ryan Gonzalez + Antoine Dupre Kristjan Valur Jonsson Lucio Torre Richard Lancaster Dan Buch Lene Wagner Tomo Cocoa + Miro Hrončok + Anthony Sottile David Lievens Neil Blakey-Milner Henrik Vendelbo @@ -257,10 +263,12 @@ Bobby Impollonia Roberto De Ioris Jeong YunWon + andrewjlawrence Christopher Armstrong Aaron Tubbs Vasantha Ganesh K Jason Michalski + Radu Ciorba Markus Holtermann Andrew Thompson Yusei Tahara @@ -268,28 +276,26 @@ Fabio Niephaus Akira Li Gustavo Niemeyer - Rafał Gałczyński + Nate Bragg Lucas Stadler roberto@goyle + Carl Bordum Hansen Matt Bogosian Yury V. Zaytsev florinpapa Anders Sigfridsson - Matt Jackson Nikolay Zinov rafalgalczyn...@gmail.com Joshua Gilbert Anna Katrina Dominguez Kim Jin Su Amber Brown - Miro Hrončok - Anthony Sottile - Nate Bragg + Andrew Stepanov + Rafał Gałczyński Ben Darnell Juan Francisco Cantero Hurtado Godefroid Chappelle Julian Berman - Michael Hudson-Doyle Stephan Busemann Dan Colish timo @@ -299,6 +305,7 @@ halgari Jim Baker Chris Lambacher + John Aldis coolbutusel...@gmail.com Mike Bayer Rodrigo Araújo @@ -307,6 +314,7 @@ OlivierBlanvillain Jonas Pfannschmidt Zearin + Johan Forsberg Andrey Churin Dan Crosta reub...@gmail.com @@ -316,8 +324,9 @@ Steve Papanik Eli Stevens Boglarka Vezer - gabrielg + gabri...@ec2-54-146-239-158.compute-1.amazonaws.com PavloKapyshin + Hervé Beraud Tomer Chachamu Christopher Groskopf Asmo Soinio @@ -331,8 +340,8 @@ Michael Chermside Anna Ravencroft remarkablerocket - Pauli Virtanen Petre Vijiac + hgattic Berker Peksag Christian Muirhead soareschen @@ -351,12 +360,13 @@ Zooko Wilcox-O Hearn James Lan jiaaro + Evgenii Gorinov Markus Unterwaditzer Kristoffer Kleine Graham Markall Dan Loewenherz werat - Andrew Stepanov + Filip Salomonsson Niclas Olofsson Chris Pressey Tobia
[pypy-commit] pypy unicode-utf8-py3: update whatsnew
Author: Matti Picus Branch: unicode-utf8-py3 Changeset: r95742:2368e6fcba43 Date: 2019-01-23 23:40 +0200 http://bitbucket.org/pypy/pypy/changeset/2368e6fcba43/ Log:update whatsnew 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 @@ -8,3 +8,7 @@ .. branch: unicode-utf8 Use utf-8 internally to represent unicode strings + +.. branch: unicode-utf8-py3 + +Use utf-8 internally to represent unicode strings ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy py3.6: hg merge py3.5
Author: Ronan Lamy Branch: py3.6 Changeset: r95743:c5adb85f6de1 Date: 2019-01-28 19:02 + http://bitbucket.org/pypy/pypy/changeset/c5adb85f6de1/ Log:hg merge py3.5 diff --git a/lib_pypy/_collections.py b/lib_pypy/_collections.py --- a/lib_pypy/_collections.py +++ b/lib_pypy/_collections.py @@ -390,7 +390,7 @@ class defaultdict(dict): __slots__ = ["default_factory"] - + def __init__(self, *args, **kwds): if len(args) > 0: default_factory = args[0] @@ -401,10 +401,10 @@ default_factory = None self.default_factory = default_factory super(defaultdict, self).__init__(*args, **kwds) - + def __missing__(self, key): # from defaultdict docs -if self.default_factory is None: +if self.default_factory is None: raise KeyError(key) self[key] = value = self.default_factory() return value @@ -420,7 +420,7 @@ def copy(self): return type(self)(self.default_factory, self) - + def __copy__(self): return self.copy() @@ -438,9 +438,3 @@ """ return (type(self), (self.default_factory,), None, None, iter(self.items())) - - -try: -from _pypy_collections import OrderedDict -except ImportError: -pass diff --git a/pypy/module/_collections/__init__.py b/pypy/module/_collections/__init__.py --- a/pypy/module/_collections/__init__.py +++ b/pypy/module/_collections/__init__.py @@ -8,6 +8,7 @@ appleveldefs = { 'defaultdict': 'app_defaultdict.defaultdict', +'OrderedDict': 'app_odict.OrderedDict', } interpleveldefs = { @@ -25,15 +26,3 @@ space = self.space space.getattr(self, space.newtext('defaultdict')) # force importing space.delattr(self, space.newtext('__missing__')) - -def startup(self, space): -# OrderedDict is normally present, but in some cases the line -# "from __pypy__ import reversed_dict, move_to_end" from -# _pypy_collections.py raises -space.appexec([self], """(mod): -try: -from _pypy_collections import OrderedDict -mod.OrderedDict = OrderedDict -except ImportError: -pass -""") diff --git a/lib_pypy/_pypy_collections.py b/pypy/module/_collections/app_odict.py rename from lib_pypy/_pypy_collections.py rename to pypy/module/_collections/app_odict.py ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] cffi default: Issue #362
Author: Armin Rigo Branch: Changeset: r3184:73a16cc62771 Date: 2019-01-28 23:33 +0100 http://bitbucket.org/cffi/cffi/changeset/73a16cc62771/ Log:Issue #362 Add "thread canary" objects which are deallocated if the PyThreadState is explicitly deallocated by CPython. If the thread shuts down first, then instead the canary is inserted in a zombie list. In that case, we clear and delete properly the PyThreadState at the next occasion. diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c --- a/c/_cffi_backend.c +++ b/c/_cffi_backend.c @@ -7671,7 +7671,7 @@ init_cffi_tls(); if (PyErr_Occurred()) INITERROR; -init_cffi_tls_delete(); +init_cffi_tls_zombie(); if (PyErr_Occurred()) INITERROR; diff --git a/c/misc_thread_common.h b/c/misc_thread_common.h --- a/c/misc_thread_common.h +++ b/c/misc_thread_common.h @@ -5,10 +5,10 @@ struct cffi_tls_s { -/* The locally-made thread state. This is only non-null in case - we build the thread state here. It remains null if this thread - had already a thread state provided by CPython. */ -PyThreadState *local_thread_state; +/* The current thread's ThreadCanaryObj. This is only non-null in + case cffi builds the thread state here. It remains null if this + thread had already a thread state provided by CPython. */ +struct thread_canary_s *local_thread_canary; #ifndef USE__THREAD /* The saved errno. If the C compiler supports '__thread', then @@ -26,81 +26,245 @@ or misc_win32.h */ -/* issue #362: Py_Finalize() will free any threadstate around, so in - * that case we must not call PyThreadState_Delete() any more on them - * from cffi_thread_shutdown(). The following mess is to give a - * thread-safe way to know that Py_Finalize() started. +/* We try to keep the PyThreadState around in a thread not started by + * Python but where cffi callbacks occur. If we didn't do that, then + * the standard logic in PyGILState_Ensure() and PyGILState_Release() + * would create a new PyThreadState and completely free it for every + * single call. For some applications, this is a huge slow-down. + * + * As shown by issue #362, it is quite messy to do. The current + * solution is to keep the PyThreadState alive by incrementing its + * 'gilstate_counter'. We detect thread shut-down, and we put the + * PyThreadState inside a list of zombies (we can't free it + * immediately because we don't have the GIL at that point in time). + * We also detect other pieces of code (notably Py_Finalize()) which + * clear and free PyThreadStates under our feet, using ThreadCanaryObj. */ -#define TLS_DEL_LOCK() PyThread_acquire_lock(cffi_tls_delete_lock, WAIT_LOCK) -#define TLS_DEL_UNLOCK() PyThread_release_lock(cffi_tls_delete_lock) -static PyThread_type_lock cffi_tls_delete_lock = NULL; -static int cffi_tls_delete; -static PyObject *old_exitfunc; -static PyObject *cffi_tls_shutdown(PyObject *self, PyObject *args) +#define TLS_ZOM_LOCK() PyThread_acquire_lock(cffi_zombie_lock, WAIT_LOCK) +#define TLS_ZOM_UNLOCK() PyThread_release_lock(cffi_zombie_lock) +static PyThread_type_lock cffi_zombie_lock = NULL; + + +/* A 'canary' object is created in a thread when there is a callback + invoked, and that thread has no PyThreadState so far. It is an + object of reference count equal to 1, which is stored in the + PyThreadState->dict. Two things can occur then: + + 1. The PyThreadState can be forcefully cleared by Py_Finalize(). + Then thread_canary_dealloc() is called, and we have to cancel + the hacks we did to keep the PyThreadState alive. + + 2. The thread finishes. In that case, we put the canary in a list + of zombies, and at some convenient time later when we have the + GIL, we free all PyThreadStates in the zombie list. + + Some more fun comes from the fact that thread_canary_dealloc() can + be called at a point where the canary is in the zombie list already. + Also, the various pieces are freed at specific points in time, and + we must make sure not to access already-freed structures: + +- the struct cffi_tls_s is valid until the thread shuts down, and + then it is freed by cffi_thread_shutdown(). + +- the canary is a normal Python object, but we have a borrowed + reference to it from cffi_tls_s.local_thread_canary. + */ + +typedef struct thread_canary_s { +PyObject_HEAD +struct thread_canary_s *zombie_prev, *zombie_next; +PyThreadState *tstate; +struct cffi_tls_s *tls; +} ThreadCanaryObj; + +static PyTypeObject ThreadCanary_Type;/* forward */ +static ThreadCanaryObj cffi_zombie_head; + +static void +_thread_canary_detach_with_lock(ThreadCanaryObj *ob) { -/* the lock here will wait until any parallel cffi_thread_shutdown() - is done. Future cffi_thread_shutdown() won't touch their - PyThreadState any more, which are
[pypy-commit] cffi default: Windows compilation fix
Author: Armin Rigo Branch: Changeset: r3185:e851dbe5757a Date: 2019-01-29 00:00 +0100 http://bitbucket.org/cffi/cffi/changeset/e851dbe5757a/ Log:Windows compilation fix diff --git a/c/ffi_obj.c b/c/ffi_obj.c --- a/c/ffi_obj.c +++ b/c/ffi_obj.c @@ -700,22 +700,22 @@ static PyObject *ffi_from_buffer(FFIObject *self, PyObject *args, PyObject *kwds) { -PyObject *cdecl, *python_buf = NULL; +PyObject *cdecl1, *python_buf = NULL; CTypeDescrObject *ct; int require_writable = 0; static char *keywords[] = {"cdecl", "python_buffer", "require_writable", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|Oi:from_buffer", keywords, - &cdecl, &python_buf, &require_writable)) + &cdecl1, &python_buf, &require_writable)) return NULL; if (python_buf == NULL) { -python_buf = cdecl; +python_buf = cdecl1; ct = g_ct_chararray; } else { -ct = _ffi_type(self, cdecl, ACCEPT_STRING|ACCEPT_CTYPE); +ct = _ffi_type(self, cdecl1, ACCEPT_STRING|ACCEPT_CTYPE); if (ct == NULL) return NULL; } ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] cffi default: py3 fix
Author: Armin Rigo Branch: Changeset: r3187:d100f3412c88 Date: 2019-01-29 00:14 +0100 http://bitbucket.org/cffi/cffi/changeset/d100f3412c88/ Log:py3 fix diff --git a/testing/cffi0/test_function.py b/testing/cffi0/test_function.py --- a/testing/cffi0/test_function.py +++ b/testing/cffi0/test_function.py @@ -53,7 +53,7 @@ """) needs_dlopen_none() m = ffi.dlopen(None) -x = m.getenv("FOO") +x = m.getenv(b"FOO") assert x is None def test_dlopen_filename(self): ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] cffi default: Backed out changeset 7a76a3815340
Author: Armin Rigo Branch: Changeset: r3186:e2f85d257915 Date: 2019-01-29 00:12 +0100 http://bitbucket.org/cffi/cffi/changeset/e2f85d257915/ Log:Backed out changeset 7a76a3815340 On Windows, there is no lround() or (as far as I can find) any math function returning an integer. diff --git a/testing/cffi0/test_function.py b/testing/cffi0/test_function.py --- a/testing/cffi0/test_function.py +++ b/testing/cffi0/test_function.py @@ -45,14 +45,15 @@ assert x != math.sin(1.23)# rounding effects assert abs(x - math.sin(1.23)) < 1E-6 -def test_lround_no_return_value(self): +def test_getenv_no_return_value(self): # check that 'void'-returning functions work too ffi = FFI(backend=self.Backend()) ffi.cdef(""" -void lround(double x); +void getenv(char *); """) -m = ffi.dlopen(lib_m) -x = m.lround(1.23) +needs_dlopen_none() +m = ffi.dlopen(None) +x = m.getenv("FOO") assert x is None def test_dlopen_filename(self): ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit