Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r90299:f7ee914736ff
Date: 2017-02-22 15:40 +0100
http://bitbucket.org/pypy/pypy/changeset/f7ee914736ff/

Log:    remove space.str0_w() completely

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1622,10 +1622,6 @@
         """For tests only."""
         return self.bytes_w(w_obj)
 
-    @not_rpython    # tests only; should be replaced with bytes0_w or text0_w
-    def str0_w(self, w_obj):
-        return self.bytes0_w(w_obj)
-
     def bytes0_w(self, w_obj):
         "Like bytes_w, but rejects strings with NUL bytes."
         from rpython.rlib import rstring
diff --git a/pypy/interpreter/test/test_objspace.py 
b/pypy/interpreter/test/test_objspace.py
--- a/pypy/interpreter/test/test_objspace.py
+++ b/pypy/interpreter/test/test_objspace.py
@@ -212,11 +212,11 @@
         res = self.space.interp_w(Function, w(None), can_be_None=True)
         assert res is None
 
-    def test_str0_w(self):
+    def test_text0_w(self):
         space = self.space
         w = space.wrap
-        assert space.str0_w(w("123")) == "123"
-        exc = space.raises_w(space.w_TypeError, space.str0_w, w("123\x004"))
+        assert space.text0_w(w("123")) == "123"
+        exc = space.raises_w(space.w_TypeError, space.text0_w, w("123\x004"))
         assert space.unicode0_w(w(u"123")) == u"123"
         exc = space.raises_w(space.w_TypeError, space.unicode0_w, 
w(u"123\x004"))
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to