Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r86728:3808099e7238
Date: 2016-08-30 13:11 +0200
http://bitbucket.org/pypy/pypy/changeset/3808099e7238/

Log:    hg merge py3k

diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -476,3 +476,15 @@
 
     https://github.com/gperftools/gperftools/blob/master/COPYING
 
+License for 'liblzma and 'lzmaffi'
+----------------------------------
+
+This copy of PyPy may be linked (dynamically or statically) with the
+liblzma library, which was put in the "public domain":
+
+    http://tukaani.org/xz/
+
+The cffi bindings to liblzma (in lib_pypy/_lzma.py) are derived from
+the lzmaffi project which is distributed under a BSD license:
+
+    https://pypi.python.org/pypi/lzmaffi/0.3.0
diff --git a/pypy/objspace/std/bytearrayobject.py 
b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -446,6 +446,11 @@
     def descr_hex(self, space):
         return _array_to_hexstring(space, self.data, len(self.data), True)
 
+    @staticmethod
+    def _iter_getitem_result(self, space, index):
+        assert isinstance(self, W_BytearrayObject)
+        return self._getitem_result(space, index)
+
 
 # ____________________________________________________________
 # helpers for slow paths, moved out because they contain loops
diff --git a/pypy/objspace/std/bytesobject.py b/pypy/objspace/std/bytesobject.py
--- a/pypy/objspace/std/bytesobject.py
+++ b/pypy/objspace/std/bytesobject.py
@@ -659,6 +659,11 @@
     def descr_upper(self, space):
         return W_BytesObject(self._value.upper())
 
+    @staticmethod
+    def _iter_getitem_result(self, space, index):
+        assert isinstance(self, W_BytesObject)
+        return self._getitem_result(space, index)
+
 
 def _create_list_from_bytes(value):
     # need this helper function to allow the jit to look inside and inline
diff --git a/pypy/objspace/std/stringmethods.py 
b/pypy/objspace/std/stringmethods.py
--- a/pypy/objspace/std/stringmethods.py
+++ b/pypy/objspace/std/stringmethods.py
@@ -76,7 +76,7 @@
 
     def descr_iter(self, space):
         from pypy.objspace.std.iterobject import W_StringIterObject
-        return W_StringIterObject(self, self.__class__._getitem_result)
+        return W_StringIterObject(self, self._iter_getitem_result)
 
     def descr_contains(self, space, w_sub):
         value = self._val(space)
diff --git a/pypy/objspace/std/unicodeobject.py 
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -509,6 +509,11 @@
     def _starts_ends_overflow(self, prefix):
         return len(prefix) == 0
 
+    @staticmethod
+    def _iter_getitem_result(self, space, index):
+        assert isinstance(self, W_UnicodeObject)
+        return self._getitem_result(space, index)
+
 
 def _isidentifier(u):
     if not u:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to