[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-26 Thread SilentGhost
Change by SilentGhost : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-26 Thread Michael Blahay
Michael Blahay added the comment: Thank you Mark. Everything for this one is complete. The issue may be closed. -- ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-26 Thread Mark Shannon
Mark Shannon added the comment: New changeset f3d909428c7c61ea32e8fbb9c8b48344e7904a53 by Mark Shannon (Michael Blahay) in branch '3.7': BPO-27639: Correct return type for UserList slicing operation (#13203) https://github.com/python/cpython/commit/f3d909428c7c61ea32e8fbb9c8b48344e7904a53

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-24 Thread Michael Blahay
Michael Blahay added the comment: PR 13203 is still waiting for merge -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-15 Thread Michael Blahay
Michael Blahay added the comment: PR 13203 is still waiting for merge -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-10 Thread Michael Blahay
Michael Blahay added the comment: PR 13203 has finally made it through all checks successfully and is now awaiting merging. Please someone pick it up and merge it. Thank you -- ___ Python tracker

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-09 Thread Michael Blahay
Michael Blahay added the comment: For those that are wondering what is going on with PR 13181 and PR 13203, those are both for back porting the change to 3.7. The auto generated PR 13181 failed for an unknown reason and then the bot deleted the branch so the PR could not be taken any

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-08 Thread Michael Blahay
Michael Blahay added the comment: PR 13150, the recreation of PR 4981, was noticed just after I created PR 13169. It was decided to continue forward with PR 13169 since PR 13150 contained changes that were out of scope for BPO-27639 for which it was suspected might have been the cause of

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-08 Thread Michael Blahay
Change by Michael Blahay : -- pull_requests: +13114 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The real name of vaultah is Dmitry Kazakov. His PR LGTM. Did you notice that I recreated the original PR? -- ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +13097 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Mark Shannon
Mark Shannon added the comment: New changeset b1c3167c232c36ed3543ca351ff10c613639b5f5 by Mark Shannon (Michael Blahay) in branch 'master': bpo-27639: Correct return type for UserList slicing operation (#13169) https://github.com/python/cpython/commit/b1c3167c232c36ed3543ca351ff10c613639b5f5

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +13085 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Michael Blahay
Michael Blahay added the comment: Let it be known that the author of PR 4981 is known as vaultah. He/she personally closed the pull request this morning stating a lack of need to be recognized for the work. Per his/her instructions I am reviewing the changes and incorporating in our

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Dmitry Kazakov
Change by Dmitry Kazakov : -- pull_requests: +13069 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Michael Blahay
Michael Blahay added the comment: Please note that I am working with Erick Cervantes at PyCon2019 on this issue. -- ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Michael Blahay
Michael Blahay added the comment: Thank you for bringing up that PR. My team will review and try to find out why it was closed without a merge. -- ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +13065 stage: needs patch -> patch review ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4981 LGTM (except that it would be worth to add the author's name in the NEWS entry). It is sad that it was not reviewed for 2 years and is closed now. -- ___ Python tracker

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-06 Thread Michael Blahay
Michael Blahay added the comment: Results from a quick unit test on the proposed changes were positive: >>> from collections import UserList >>> UserList([0,1,2,3,4,5])[0:2].__class__ If you compare this result with the one a couple comments above, you can see that the result is no longer

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-06 Thread Michael Blahay
Michael Blahay added the comment: It is also worth noting that the definition of UserList moved from Lib/UserList.py in 2.7 to Lib/collections/__init__.py in 3.x -- ___ Python tracker

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-06 Thread Michael Blahay
Michael Blahay added the comment: The root cause of this issue seems to be the failure to implement type usage in __getitem__ when the deprecated __getslice__ was removed. This is why slicing worked correctly in 2.7, but not the 3.x versions. In 3.8, the __getitem__ method is used to create

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-06 Thread Michael Blahay
Michael Blahay added the comment: Here is a test that more explicitly shows the problem. >>> from collections import UserList >>> UserList([0,1,2,3,4,5])[0:2].__class__ >>> It can clearly be seen here that the return type of the slicing operator is list when it should, in this case, be

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy -patch stage: patch review -> needs patch versions: +Python 3.7, Python 3.8 -Python 3.6 ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-06 Thread Dmitry Kazakov
Change by Dmitry Kazakov : -- pull_requests: -4870 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27639] UserList.__getitem__ doesn't account for slices

2017-12-22 Thread Dmitry Kazakov
Change by Dmitry Kazakov : -- nosy: +vaultah ___ Python tracker ___ ___

[issue27639] UserList.__getitem__ doesn't account for slices

2017-12-22 Thread Dmitry Kazakov
Change by Dmitry Kazakov : -- pull_requests: +4870 stage: needs patch -> patch review ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Take a look at the following code from UserList.py in Python2.7 to get an idea of how this was implemented previously: def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) return self.__class__(self.data[i:j]) def

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg271612 ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: As far as I can tell, there has never been a need or request for UserList slice support in its 17 year history. And since the collections ABCs were added, this class has mostly fallen into disuse and probably doesn't warrant API expansion (the module only

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread Anton Backer
Changes by Anton Backer : Removed file: http://bugs.python.org/file43924/581663cb2d4d.diff ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread Anton Backer
Changes by Anton Backer : -- keywords: +patch Added file: http://bugs.python.org/file43924/581663cb2d4d.diff ___ Python tracker ___

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread R. David Murray
R. David Murray added the comment: LGTM, but this is change we should probably only make in a feature release, with a note in the What's New porting section. -- nosy: +r.david.murray stage: -> needs patch versions: +Python 3.6 -Python 3.5 ___

[issue27639] UserList.__getitem__ doesn't account for slices

2016-07-28 Thread Anton Backer
Changes by Anton Backer : -- hgrepos: +351 ___ Python tracker ___ ___ Python-bugs-list