This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: str.rpartition fails silently with unicode argument
Type: Stage:
Components: None Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, benjamin.peterson, forest_atq, pitrou
Priority: normal Keywords: patch

Created on 2008-09-01 15:09 by forest_atq, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
rpartition.patch amaury.forgeotdarc, 2008-09-01 19:43
Messages (6)
msg72259 - (view) Author: Forest Bond (forest_atq) * Date: 2008-09-01 15:09
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> u'/foo/bar'.rpartition(u'/')
(u'/foo', u'/', u'bar')
>>> '/foo/bar'.rpartition(u'/')
(u'', u'/', u'foo/bar')
msg72263 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-01 15:20
It's not failing, it's simply calling unicode.partition instead of
unicode.rpartition!
msg72264 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-09-01 15:33
Adding a few tests wouldn't hurt :)
msg72286 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-01 19:43
Updated patch, with tests.
This is a 2.5 backport candidate.
msg72287 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-09-01 19:47
Go ahead with the patch and backporting; it looks fine to me.
msg72289 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-01 20:05
Committed r66119 (trunk) and r66121 (python2.5)
Thanks for the report!
History
Date User Action Args
2022-04-11 14:56:38adminsetgithub: 48001
2008-09-01 20:05:34amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
messages: + msg72289
2008-09-01 19:47:27benjamin.petersonsetkeywords: - needs review
nosy: + benjamin.peterson
messages: + msg72287
2008-09-01 19:46:43amaury.forgeotdarcsetfiles: - rpartition.patch
2008-09-01 19:43:54amaury.forgeotdarcsetkeywords: + needs review
files: + rpartition.patch
messages: + msg72286
2008-09-01 15:33:24pitrousetnosy: + pitrou
messages: + msg72264
2008-09-01 15:20:56amaury.forgeotdarcsetfiles: + rpartition.patch
keywords: + patch
messages: + msg72263
nosy: + amaury.forgeotdarc
2008-09-01 15:09:05forest_atqcreate