Author: Matti Picus <[email protected]>
Branch: extradoc
Changeset: r5637:2d7ef522bdea
Date: 2016-04-27 19:29 +0300
http://bitbucket.org/pypy/extradoc/changeset/2d7ef522bdea/

Log:    add a draft blog post

diff --git a/blog/draft/cpyext-ext.rst b/blog/draft/cpyext-ext.rst
new file mode 100644
--- /dev/null
+++ b/blog/draft/cpyext-ext.rst
@@ -0,0 +1,61 @@
+
+C-API Support update Part II
+============================
+
+We have been working on an upgrade to our C-API support (in the cpyext module),
+and have merged the second piece of the puzzle to the PyPy trunk. The first
+piece was an overhauling of the way refcounted PyObjects are reflected in 
+interpreter level objects, and was completed in time for PyPy 5.0 (here_ is
+the relevant blog post). The current upgrade focused on implementing all the
+necessary C-API functions to build and run numpy from upstream code. We are
+pleased to report we have come close to succeeding, using our fork_ of the
+numpy repo (which introduces only very minor changes) we can now pass over
+90% of the numpy test suite. We still fail over 400 of the 5900 tests, but
+much of numpy is usable as-is. As always with cpyext, it is expensive to call
+into the C-API, we would love to hear how you are using it and what the
+performance is in real-life applications. We reccomend using PyPy in a 
+virtualenv_, instructions to getting started are on the forked repo's README.
+
+.. _here: http://morepypy.blogspot.com/2016/02/c-api-support-update.html 
+.. _fork: https://github.com/pypy/numpy
+.. _virtualenv: https://virtualenv.pypa.io
+
+What Changed
+============
+
+PyPy relies on test-driven development. We can now write c-code snippets that
+exercize the C-API, and test them on a host python system (such as CPython or
+post-translation PyPy) or as non-translated tests. This greatly enhanced our
+ability to compare and contrast CPython's behaviour with PyPy's.
+
+We then were able to test and fix edge cases in the C-API and add missing 
+functions. We improved threading support through the C-API. All function slots
+should now be filled, and type inheritance should also now be more fully
+supported. We created a list strategy specifically for PyObjects for fast
+access via C.
+
+Here is a more complete list of the changed functionality in the cpyext-ext 
branch:
+
+  - allow c-snippet tests to be run with -A so we can verify we are compatible
+  - fix many edge cases exposed by fixing tests to run with -A
+  - issequence() logic matches cpython
+  - make PyStringObject and PyUnicodeObject field names compatible with cpython
+  - add prelminary support for PyDateTime_*
+  - support PyComplexObject, PyFloatObject, PyDict_Merge, PyDictProxy,
+    PyMemoryView_*, _Py_HashDouble, PyFile_AsFile, PyFile_FromFile,
+  - PyAnySet_CheckExact, PyUnicode_Concat
+  - improve support for PyGILState_Ensure, PyGILState_Release, and thread
+    primitives, also find a case where CPython will allow thread creation
+    before PyEval_InitThreads is run, dissallow on PyPy 
+  - create a PyObject-specific list strategy
+  - rewrite slot assignment for typeobjects
+  - improve tracking of PyObject to rpython object mapping
+  - support tp_as_{number, sequence, mapping, buffer} slots
+
+Wait a minute, I thought PyPy already had numpy?
+================================================
+XXX plans for the future
+
+Please try it out and let us know how it works for you
+
+The PyPy Team
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to