Author: Matti Picus <matti.pi...@gmail.com>
Branch: py3.6
Changeset: r98432:73c04f01d522
Date: 2020-01-01 11:18 +0200
http://bitbucket.org/pypy/pypy/changeset/73c04f01d522/

Log:    merge default into branch

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -19,8 +19,8 @@
 ^site-packages$
 ^site-packages/.*$
 ^site-packages/.*$
-^bin$
 ^pypy/bin/pypy-c
+^pypy/lib/
 ^pypy/module/cpyext/src/.+\.o$
 ^pypy/module/cpyext/src/.+\.obj$
 ^pypy/module/cpyext/test/.+\.errors$
diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py
--- a/pypy/doc/conf.py
+++ b/pypy/doc/conf.py
@@ -59,7 +59,7 @@
 
 # General information about the project.
 project = u'PyPy'
-copyright = u'2019, The PyPy Project'
+copyright = u'2020, The PyPy Project'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
diff --git a/pypy/objspace/std/test/test_unicodeobject.py 
b/pypy/objspace/std/test/test_unicodeobject.py
--- a/pypy/objspace/std/test/test_unicodeobject.py
+++ b/pypy/objspace/std/test/test_unicodeobject.py
@@ -253,6 +253,9 @@
         assert u''.rsplit('aaa') == [u'']
         assert u'a\nb\u1680c'.rsplit() == [u'a', u'b', u'c']
 
+    def test_rsplit_bug(self):
+        assert u'Vestur- og Mi&#240;'.rsplit() == [u'Vestur-', u'og', 
u'Mi&#240;']
+
     def test_center(self):
         s=u"a b"
         assert s.center(0) == u"a b"
diff --git a/rpython/rlib/rstring.py b/rpython/rlib/rstring.py
--- a/rpython/rlib/rstring.py
+++ b/rpython/rlib/rstring.py
@@ -139,7 +139,7 @@
     if by is None:
         res = []
 
-        i = len(value) - 1
+        i = _decr(value, len(value), isutf8)
         while True:
             # starting from the end, find the end of the next word
             while i >= 0:
diff --git a/rpython/rlib/test/test_rstring.py 
b/rpython/rlib/test/test_rstring.py
--- a/rpython/rlib/test/test_rstring.py
+++ b/rpython/rlib/test/test_rstring.py
@@ -88,6 +88,7 @@
     assert rsplit('baba', 'a', isutf8=1) == ['b', 'b', '']
     assert rsplit('b b', isutf8=1) == ['b', 'b']
     assert rsplit('b\xe1\x9a\x80b', isutf8=1) == ['b', 'b']
+    assert rsplit('b\xe1\x9a\x80', isutf8=1) == ['b']
 
 def test_string_replace():
     def check_replace(value, sub, *args, **kwargs):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to