[issue36582] collections.UserString encode method returns a string

2019-08-27 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36582] collections.UserString encode method returns a string

2019-08-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 2cb82d2a88710b0af10b9d9721a9710ecc037e72 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138) (GH-15557)

[issue36582] collections.UserString encode method returns a string

2019-08-27 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: +Python 3.9 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36582] collections.UserString encode method returns a string

2019-08-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +15230 pull_request: https://github.com/python/cpython/pull/15557 ___ Python tracker ___

[issue36582] collections.UserString encode method returns a string

2019-08-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 2a16eea71f56c2d8f38c295c8ce71a9a9a140aff by Raymond Hettinger (Daniel Fortunov) in branch 'master': bpo-36582: Make collections.UserString.encode() return bytes, not str (GH-13138)

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread Daniel Fortunov
Daniel Fortunov added the comment: PR submitted here: https://github.com/python/cpython/pull/13138 Rather than adding three different tests for the different code paths I chose to collapse the three different code paths by surfacing the underlying str.encode() defaults in the method

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread Daniel Fortunov
Change by Daniel Fortunov : -- keywords: +patch pull_requests: +13051 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread MICHAEL BLAHAY
MICHAEL BLAHAY added the comment: My mistake, dfortunov is already working on this one. -- ___ Python tracker ___ ___

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread MICHAEL BLAHAY
MICHAEL BLAHAY added the comment: I will pick this on up -- nosy: +MICHAEL BLAHAY ___ Python tracker ___ ___ Python-bugs-list

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread Daniel Fortunov
Daniel Fortunov added the comment: I'll pick this up in the PyCon US 2019 sprint this afternoon. -- nosy: +dfortunov ___ Python tracker ___

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36582] collections.UserString encode method returns a string

2019-05-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think this is an easy issue. The relevant code is at https://github.com/python/cpython/blob/cec01849f142ea96731b4725975b89d3af757656/Lib/collections/__init__.py#L1210 where the encoded result has to be fixed. Trey, if you haven't started working

[issue36582] collections.UserString encode method returns a string

2019-04-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Trey, would you like to submit a PR to fix this? (Be sure to add a test case). -- assignee: -> rhettinger type: -> behavior versions: +Python 3.8 ___ Python tracker

[issue36582] collections.UserString encode method returns a string

2019-04-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36582] collections.UserString encode method returns a string

2019-04-09 Thread Trey Hunner
New submission from Trey Hunner : It looks like the encode method for UserString incorrectly wraps its return value in a str call. ``` >>> from collections import UserString >>> UserString("hello").encode('utf-8') == b'hello' False >>> UserString("hello").encode('utf-8') "b'hello'" >>>