PyPy 5.0 發布,Python 解釋器

jopen 8年前發布 | 7K 次閱讀

PyPy 5.0 發布了,PyPy 是用Python實現的Python解釋器。

PyPy是,Python開發者為了更好的Hack Python創建的項目。此外,PyPy比CPython是更加靈活,易于使用和試驗,以制定具體的功能在不同情況的實現方法,可以很容易實施。 該項目的目標是,讓PyPy比C實現的Python更為容易的適應各個項目和方便裁剪。

改進記錄:

新特性

  • Support embedding PyPy in a C-program via cffi and static callbacks in cffi.
    This deprecates the old method of embedding PyPy

  • Refactor vmprof to work cross-operating-system, deprecate using buggy
    libunwind on Linux platforms. Vmprof even works on Windows now.

  • Support more of the C-API type slots, like tp_getattro, and fix C-API
    macros, functions, and structs such as _PyLong_FromByteArray(),
    PyString_GET_SIZE, f_locals in PyFrameObject, Py_NAN, co_filename in
    PyCodeObject

  • Use a more stable approach for allocating PyObjects in cpyext. (see
    blog post). Once the PyObject corresponding to a PyPy object is created,
    it stays around at the same location until the death of the PyPy object.
    Done with a little bit of custom GC support.  It allows us to kill the
    notion of “borrowing” inside cpyext, reduces 4 dictionaries down to 1, and
    significantly simplifies the whole approach (which is why it is a new
    feature while technically a refactoring) and allows PyPy to support the
    populart lxml module (as of the next release) with no PyPy specific
    patches needed

  • Make the default filesystem encoding ASCII, like CPython

  • Use hypothesis in test creation, which is great for randomizing tests

Bug 修復

  • Backport always using os.urandom for uuid4 from cpython and fix the JIT as well
    (issue #2202)

  • More completely support datetime, optimize timedelta creation

  • Fix for issue #2185 which caused an inconsistent list of operations to be
    generated by the unroller, appeared in a complicated DJango app

  • Fix an elusive issue with stacklets on shadowstack which showed up when
    forgetting stacklets without resuming them

  • Fix entrypoint() which now acquires the GIL

  • Fix direct_ffi_call() so failure does not bail out before setting CALL_MAY_FORCE

  • Fix (de)pickling long values by simplifying the implementation

  • Fix RPython rthread so that objects stored as threadlocal do not force minor
    GC collection and are kept alive automatically. This improves perfomance of
    short-running Python callbacks and prevents resetting such object between
    calls

  • Support floats as parameters to itertools.isslice()

  • Check for the existence of CODESET, ignoring it should have prevented PyPy
    from working on FreeBSD

  • Fix for corner case (likely shown by Krakatau) for consecutive guards with
    interdependencies

  • Fix applevel bare class method comparisons which should fix pretty printing
    in IPython

  • Issues reported with our previous release were resolved after reports from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at #pypy

詳細請看:http://morepypy.blogspot.com/2016/03/pypy-50-released.html

下載地址:http://pypy.org/download.htm



來自: http://www.oschina.net//news/71415/pypy-5-0

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!