Author: Manuel Jacob Branch: remove-dict-smm Changeset: r64250:73e4f8cf4839 Date: 2013-05-17 11:25 +0200 http://bitbucket.org/pypy/pypy/changeset/73e4f8cf4839/
Log: hg merge default diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py --- a/pypy/doc/conf.py +++ b/pypy/doc/conf.py @@ -47,7 +47,7 @@ # The short X.Y version. version = '2.0' # The full version, including alpha/beta/rc tags. -release = '2.0.0' +release = '2.0.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pypy/doc/how-to-release.rst b/pypy/doc/how-to-release.rst --- a/pypy/doc/how-to-release.rst +++ b/pypy/doc/how-to-release.rst @@ -22,7 +22,8 @@ will capture the revision number of this change for the release; some of the next updates may be done before or after branching; make sure things are ported back to the trunk and to the branch as - necessary + necessary; also update the version number in pypy/doc/conf.py, + and in pypy/doc/index.rst * update pypy/doc/contributor.rst (and possibly LICENSE) * rename pypy/doc/whatsnew_head.rst to whatsnew_VERSION.rst and create a fresh whatsnew_head.rst after the release diff --git a/pypy/doc/index.rst b/pypy/doc/index.rst --- a/pypy/doc/index.rst +++ b/pypy/doc/index.rst @@ -40,7 +40,7 @@ * `FAQ`_: some frequently asked questions. -* `Release 2.0`_: the latest official release +* `Release 2.0.1`_: the latest official release * `PyPy Blog`_: news and status info about PyPy @@ -110,7 +110,7 @@ .. _`Getting Started`: getting-started.html .. _`Papers`: extradoc.html .. _`Videos`: video-index.html -.. _`Release 2.0`: http://pypy.org/download.html +.. _`Release 2.0.1`: http://pypy.org/download.html .. _`speed.pypy.org`: http://speed.pypy.org .. _`RPython toolchain`: translation.html .. _`potential project ideas`: project-ideas.html diff --git a/pypy/doc/release-2.0.1.rst b/pypy/doc/release-2.0.1.rst new file mode 100644 --- /dev/null +++ b/pypy/doc/release-2.0.1.rst @@ -0,0 +1,46 @@ +============================== +PyPy 2.0.1 - Bohr Smørrebrød +============================== + +We're pleased to announce PyPy 2.0.1. This is a stable bugfix release +over `2.0`_. You can download it here: + + http://pypy.org/download.html + +The fixes are mainly about fatal errors or crashes in our stdlib. See +below for more details. + +What is PyPy? +============= + +PyPy is a very compliant Python interpreter, almost a drop-in replacement for +CPython 2.7. It's fast (`pypy 2.0 and cpython 2.7.3`_ performance comparison) +due to its integrated tracing JIT compiler. + +This release supports x86 machines running Linux 32/64, Mac OS X 64 or +Windows 32. Support for ARM is progressing but not bug-free yet. + +.. _`pypy 2.0 and cpython 2.7.3`: http://speed.pypy.org + +Highlights +========== + +- fix an occasional crash in the JIT that ends in `RPython Fatal error: + NotImplementedError`__. + +- `id(x)` is now always a positive number (except on int/float/long/complex). + This fixes an issue in ``_sqlite.py`` (mostly for 32-bit Linux). + +- fix crashes of callback-from-C-functions (with cffi) when used together + with Stackless features, on asmgcc (i.e. Linux only). Now `gevent should + work better`__. + +- work around an eventlet issue with `socket._decref_socketios()`__. + +.. __: https://bugs.pypy.org/issue1482 +.. __: http://mail.python.org/pipermail/pypy-dev/2013-May/011362.html +.. __: https://bugs.pypy.org/issue1468 +.. _2.0: release-2.0.0.html + +Cheers, +arigo et. al. for the PyPy team diff --git a/pypy/interpreter/test/test_app_main.py b/pypy/interpreter/test/test_app_main.py --- a/pypy/interpreter/test/test_app_main.py +++ b/pypy/interpreter/test/test_app_main.py @@ -920,7 +920,7 @@ import app_main app_main.setup_bootstrap_path('/tmp/pypy-c') # stdlib not found assert sys.executable == '' - assert sys.path == old_sys_path + [self.goal_dir] + assert sys.path == old_sys_path app_main.setup_bootstrap_path(self.fake_exe) assert sys.executable == self.fake_exe diff --git a/pypy/module/_cffi_backend/cdataobj.py b/pypy/module/_cffi_backend/cdataobj.py --- a/pypy/module/_cffi_backend/cdataobj.py +++ b/pypy/module/_cffi_backend/cdataobj.py @@ -114,8 +114,11 @@ ge = _make_comparison('ge') def hash(self): - h = (objectmodel.compute_identity_hash(self.ctype) ^ - rffi.cast(lltype.Signed, self._cdata)) + h = rffi.cast(lltype.Signed, self._cdata) + # To hash pointers in dictionaries. Assumes that h shows some + # alignment (to 4, 8, maybe 16 bytes), so we use the following + # formula to avoid the trailing bits being always 0. + h = h ^ (h >> 4) return self.space.wrap(h) def getitem(self, w_index): 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 @@ -365,8 +365,9 @@ BInt = new_primitive_type("int") BFloat = new_primitive_type("float") for i in range(1, 20): - if (hash(cast(BChar, chr(i))) != - hash(cast(BInt, i))): + x1 = cast(BChar, chr(i)) + x2 = cast(BInt, i) + if hash(x1) != hash(x2): break else: raise AssertionError("hashes are equal") @@ -2723,6 +2724,14 @@ assert x.__name__ == '<cdata>' assert hasattr(x, '__doc__') +def test_different_types_of_ptr_equality(): + BVoidP = new_pointer_type(new_void_type()) + BIntP = new_pointer_type(new_primitive_type("int")) + x = cast(BVoidP, 12345) + assert x == cast(BIntP, 12345) + assert x != cast(BIntP, 12344) + assert hash(x) == hash(cast(BIntP, 12345)) + def test_version(): # this test is here mostly for PyPy assert __version__ == "0.6" diff --git a/pypy/module/sys/initpath.py b/pypy/module/sys/initpath.py --- a/pypy/module/sys/initpath.py +++ b/pypy/module/sys/initpath.py @@ -68,7 +68,7 @@ If it cannot be found, return (None, None). """ if executable == '': - return None, None + executable = 'pypy-c' search = executable while True: dirname = resolvedirof(search) diff --git a/pypy/module/sys/test/test_initpath.py b/pypy/module/sys/test/test_initpath.py --- a/pypy/module/sys/test/test_initpath.py +++ b/pypy/module/sys/test/test_initpath.py @@ -16,9 +16,12 @@ build_hierarchy(tmpdir) path, prefix = find_stdlib(None, str(pypy)) assert prefix == tmpdir - # shouldn't find stdlib if executable == '' even if parent dir has a stdlib - monkeypatch.chdir(tmpdir.join('bin')) - assert find_stdlib(None, '') == (None, None) + # in executable is None look for stdlib based on the working directory + # see lib-python/2.7/test/test_sys.py:test_executable + _, prefix = find_stdlib(None, '') + cwd = os.path.dirname(os.path.realpath(__file__)) + assert prefix is not None + assert cwd.startswith(str(prefix)) @py.test.mark.skipif('not hasattr(os, "symlink")') def test_find_stdlib_follow_symlink(tmpdir): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit