[issue26202] The range() object is deepcopied as atomic

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change has been reverted in issue40792. The range object attributes has now exact type int, so the original issue with deep copying is gone. -- ___ Python tracker __

[issue26202] The range() object is deepcopied as atomic

2020-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5f4b229df7812f1788287095eb6b138bb21876a4 by Serhiy Storchaka in branch 'master': bpo-40792: Make the result of PyNumber_Index() always having exact type int. (GH-20443) https://github.com/python/cpython/commit/5f4b229df7812f1788287095eb6b138b

[issue26202] The range() object is deepcopied as atomic

2016-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Victor. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue26202] The range() object is deepcopied as atomic

2016-01-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5772eae17a82 by Serhiy Storchaka in branch '3.5': Issue #26202: copy.deepcopy() now correctly copies range() objects with https://hg.python.org/cpython/rev/5772eae17a82 New changeset d5d0b62c2830 by Serhiy Storchaka in branch 'default': Issue #26202

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Returning the same range() object from copy.copy() is correct. This is shallow copying. -- ___ Python tracker ___ ___

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread STINNER Victor
STINNER Victor added the comment: deepcopy_range.patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread Ethan Furman
Ethan Furman added the comment: I don't have much experience with the copy module, but I don't see any problems with the code. Does copy.copy suffer from the same problem? If yes, is it fixed with this same patch, or is more work needed? -- nosy: +ethan.furman __

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread Ethan Furman
Ethan Furman added the comment: Victor, patch was already attached. ;) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread STINNER Victor
STINNER Victor added the comment: Hum ok, it's a bug :-) It should be fixed. Do you want to work on a patch? -- ___ Python tracker ___ ___

[issue26202] The range() object is deepcopied as atomic

2016-01-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The range() object is immutable, but is not atomic, and copy.deepcopy() shouldn't return it unchanged. >>> class I(int): pass # mutable index ... >>> import copy >>> r = range(I(10)) >>> r2 = copy.deepcopy(r) >>> r.stop.attr = 'spam' >>> r2.stop.attr 'spa