[issue25455] Some repr implementations don't check for self-referential structures

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a5af6e1af77ee0f9294c5776478a9c24d9fbab94 by Serhiy Storchaka in branch 'master': bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) https://github.com/python/cpython/commit/a5af6e1af77ee0f9294c5776478a9c24d9fbab94

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fca705d533970011e50b3f278aab81cead39b00d by Serhiy Storchaka in branch '3.6': bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) (#722)

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 08612ed6a91003cdba7617dee7787c26495c50d9 by Serhiy Storchaka in branch '3.5': bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) (#727)

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +642 ___ Python tracker ___ ___

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +637 ___ Python tracker ___ ___

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +423 ___ Python tracker ___ ___

[issue25455] Some repr implementations don't check for self-referential structures

2016-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea1edf1bf362 by Benjamin Peterson in branch '2.7': when you enter repr, you must leave, too (#25455) https://hg.python.org/cpython/rev/ea1edf1bf362 -- ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2016-08-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Antoine, are you fine with io_recursive_repr2.patch? -- ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0323b33894f2 by Serhiy Storchaka in branch '3.5': Issue #25455: Clean up reference loops created in tests for recursive https://hg.python.org/cpython/rev/0323b33894f2 New changeset 688edc946ab9 by Serhiy Storchaka in branch '2.7': Issue #25455:

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, tests for recursive partial objects create reference loops and don't clean them. Thank you Berker. I'll fix this. -- ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7859742826b2 by Serhiy Storchaka in branch '2.7': Issue #25455: Backported tests for pickling recursive functools.partial objects. https://hg.python.org/cpython/rev/7859742826b2 -- ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch for io classes needed an update. -- Added file: http://bugs.python.org/file43360/io_recursive_repr2.patch ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Berker Peksag
Berker Peksag added the comment: I'm not sure if 17e78918f608 is relevant but test_gc is failing on several buildbots: * http://buildbot.python.org/all/builders/PPC64%20Fedora%203.5/builds/716 http://buildbot.python.org/all/builders/PPC64%20Fedora%203.5/builds/716/steps/test/logs/stdio *

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset c071da010053 by Serhiy Storchaka in branch '2.7': Issue #25455: Fixed a crash in repr of cElementTree.Element with recursive tag. https://hg.python.org/cpython/rev/c071da010053 New changeset 17e78918f608 by Serhiy Storchaka in branch '3.5': Issue

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset e44bd1259bda by Serhiy Storchaka in branch '3.5': Issue #25455: Fixed a crash in repr of ElementTree.Element with recursive tag. https://hg.python.org/cpython/rev/e44bd1259bda New changeset e3671a684ea0 by Serhiy Storchaka in branch 'default':

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-11 Thread Stefan Behnel
Stefan Behnel added the comment: Etree patch looks straight forward to me, feel free to apply it. -- ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2016-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25455] Some repr implementations don't check for self-referential structures

2016-01-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___ ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-23 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: -eli.bendersky ___ Python tracker ___ ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-23 Thread Eli Bendersky
Eli Bendersky added the comment: As I've mentioned elsewhere, I'll have to temporarily take myself off these issues as I don't have the time to work on them (even review patches). I think Raymond may have gotten his Stefans mixed up and meant Stefan Behnel, who's also been looking at etree

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-23 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: -eli.bendersky ___ Python tracker ___ ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-23 Thread Stefan Krah
Stefan Krah added the comment: I think you may have meant Eli Bendersky -- I'm not an elementree expert (Eli, I'm adding you back just to clear this up). -- nosy: +eli.bendersky ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raymond, could you please make a review of the first patch? -- ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: >Raymond, could you please make a review of the first patch? Will do. Also, we should ask Antoine Pitrou to look at the TextIO patch and ask Stephan Krah to look at the ElementTree patch. -- nosy: +skrah ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file40972/etree_recursive_repr.patch ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are patches for io classes and for ElementTree. -- stage: needs patch -> patch review versions: +Python 2.7, Python 3.4 Added file: http://bugs.python.org/file40971/io_recursive_repr.patch ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is also a crash with Python implementation of TextIOWrapper. >>> import _pyio as io >>> t = io.TextIOWrapper(io.BytesIO()) >>> t.mode = t >>> t Fatal Python error: Cannot recover from stack overflow. Current thread 0xb74a9700 (most recent call first):

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added ElementTree and io modules experts to the nosy list. -- nosy: +benjamin.peterson, eli.bendersky, pitrou, scoder, stutzbach ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Recursive partial objects are legitimate. Here is a patch that makes partial's repr to support recursive partial objects. Also added a test for pickling. Cases for Element and file-like objects are questionable. Recursive Element.tag and TextIOWrapper.name

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Changing PyObject_Repr is too course; it affects a broad class of objects other than containers, and it risks unknown impacts to larges swaths of third-party code use this venerable API. It is also a break with the long established history of recursion

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one example: >>> import io >>> class BR(io.BufferedReader): ... @property ... def name(self): ... return self ... >>> repr(BR(io.BytesIO())) Segmentation fault The same is for other file-like objects. --

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The general solution is to make PyObject_Repr to detect recursive calls (as reprlib.recursive_repr does). The straightforward way is to use thread local identity set. It can be implemented as a dict that maps id(obj) -> obj (creates an int object for key

[issue25455] Some repr implementations don't check for self-referential structures

2015-10-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> high stage: -> needs patch ___ Python tracker ___

[issue25455] Some repr implementations don't check for self-referential structures

2015-10-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: Implementations of repr for some of the types in the standard library doesn't check for self-referential structures. As a result, when calling repr() on such objects, Python crashes due to infinite recursion. Example: >>> import functools >>> x =