[pypy-commit] pypy py3.5: hg merge default; this bump the version to 7.1-alpha0

antocuni pypy.commits at gmail.com
Fri Jan 25 09:58:18 EST 2019


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3.5
Changeset: r95723:4b2995821717
Date: 2019-01-25 15:52 +0100
http://bitbucket.org/pypy/pypy/changeset/4b2995821717/

Log:	hg merge default; this bump the version to 7.1-alpha0

diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py
--- a/pypy/doc/conf.py
+++ b/pypy/doc/conf.py
@@ -65,10 +65,15 @@
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
+
+# Make sure to keep this in sync with:
+#    module/sys/version.py
+#    module/cpyext/include/patchlevel.h
+#
 # The short X.Y version.
-version = '6.0'
+version = '7.1'
 # The full version, including alpha/beta/rc tags.
-release = '6.0.0'
+release = '7.1.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
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
@@ -28,10 +28,12 @@
 /* Version as a string */
 #define PY_VERSION		"3.5.3"
 
-/* PyPy version as a string */
-#define PYPY_VERSION "6.1.0-alpha0"
-#define PYPY_VERSION_NUM  0x06010000
-
+/* PyPy version as a string: make sure to keep this in sync with:
+ *     module/sys/version.py
+ *     doc/conf.py
+ */
+#define PYPY_VERSION "7.1.0"
+#define PYPY_VERSION_NUM  0x07010000
 /* 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
@@ -10,7 +10,10 @@
 #XXX # sync CPYTHON_VERSION with patchlevel.h, package.py
 CPYTHON_API_VERSION        = 1013   #XXX # sync with include/modsupport.h
 
-PYPY_VERSION               = (6, 1, 0, "alpha", 0)    #XXX # sync patchlevel.h
+# make sure to keep PYPY_VERSION in sync with:
+#    module/cpyext/include/patchlevel.h
+#    doc/conf.py
+PYPY_VERSION               = (7, 1, 0, "alpha0", 0)
 
 
 import pypy
diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -991,7 +991,9 @@
         items = d.items()
         d.clear()
         d[key] = value
-        d.update(items)
+        # r_dict.update does not support list of tuples, do it manually
+        for key, value in items:
+            d[key] = value
 
 @specialize.call_location()
 def move_to_end(d, key, last=True):
diff --git a/rpython/rlib/test/test_objectmodel.py b/rpython/rlib/test/test_objectmodel.py
--- a/rpython/rlib/test/test_objectmodel.py
+++ b/rpython/rlib/test/test_objectmodel.py
@@ -708,6 +708,15 @@
     move_to_end(d, 'key1', last=False)
     assert d.items() == [('key1', 'val1'), ('key2', 'val2'), ('key3', 'val3')]
 
+def test_r_dict_move_to_end():
+    d = r_dict(strange_key_eq, strange_key_hash)
+    d['1key'] = 'val1'
+    d['2key'] = 'val2'
+    d['3key'] = 'val3'
+    # does not crash, we can't check that it actually moves to end on CPython
+    move_to_end(d, '1key')
+    move_to_end(d, '1key', last=False)
+
 def test_import_from_mixin():
     class M:    # old-style
         def f(self):


More information about the pypy-commit mailing list