[issue4643] cgitb.html fails if getattr call raises exception

2021-01-02 Thread Irit Katriel
Irit Katriel added the comment: I agree that this can be closed as duplicate. Thanks, Karl, for the research. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> cgitb failures ___ Python tracker

[issue4643] cgitb.html fails if getattr call raises exception

2021-01-02 Thread karl
karl added the comment: > The getattr call here has a default value, so it should not raise > AttributeError. It should also not raise any other exception because a valid > implementation of __getattr__ should raise only AttributeError: but probably the intent of the patch here is to

[issue4643] cgitb.html fails if getattr call raises exception

2021-01-01 Thread Irit Katriel
Irit Katriel added the comment: On closer scrutiny I'm not sure this patch should be merged. The getattr call here has a default value, so it should not raise AttributeError. It should also not raise any other exception because a valid implementation of __getattr__ should raise only

[issue4643] cgitb.html fails if getattr call raises exception

2021-01-01 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg384182 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue4643] cgitb.html fails if getattr call raises exception

2021-01-01 Thread Irit Katriel
Irit Katriel added the comment: On closer scrutiny I'm not sure this patch should not be merged. The getattr call here has a default value, so it should not raise AttributeError. It should also not raise any other exception because a valid implementation of __getattr__ should raise only

[issue4643] cgitb.html fails if getattr call raises exception

2021-01-01 Thread karl
karl added the comment: Converted into GitHub PR https://github.com/python/cpython/pull/24038 -- ___ Python tracker ___ ___

[issue4643] cgitb.html fails if getattr call raises exception

2021-01-01 Thread karl
Change by karl : -- nosy: +karlcow nosy_count: 4.0 -> 5.0 pull_requests: +22878 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/24038 ___ Python tracker

[issue4643] cgitb.html fails if getattr call raises exception

2020-11-15 Thread Irit Katriel
Irit Katriel added the comment: Arthur, are you interested in converting your patch to a github pull request? -- ___ Python tracker ___

[issue4643] cgitb.html fails if getattr call raises exception

2020-11-15 Thread Irit Katriel
Irit Katriel added the comment: The issue still occurs in 3.10. Python 3 version of the script: import cgitb class WeirdObject(object): def __getattr__(self, attr): if attr == 'a': return 'the letter a' elif attr == 'b': return str(slf) #

[issue4643] cgitb.html fails if getattr call raises exception

2012-12-06 Thread Arthur Petitpierre
Arthur Petitpierre added the comment: I attached a patch containing both the fix suggested by Allan and a test case. Tested against trunk and python2.7. -- keywords: +patch nosy: +arthur.petitpierre Added file: http://bugs.python.org/file28229/issue4643.patch

[issue4643] cgitb.html fails if getattr call raises exception

2012-10-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - test needed versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-29 Thread Allan Crooks
Allan Crooks a...@users.sourceforge.net added the comment: In the interests of getting this fixed (and not letting it die), should I submit a proper patch? I suppose I would have to do one for each version of Python that is affected (which is all of them, really).

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-29 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I believe a patch against the trunk would be enough, but should include a test case. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643 ___ ___

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-17 Thread Allan Crooks
Allan Crooks a...@users.sourceforge.net added the comment: In terms of patching scanvars, I came up with the following solution: ORIGINAL: if parent is not __UNDEF__: value = getattr(parent, token, __UNDEF__) vars.append((prefix + token, prefix, value)) SOLUTION: if parent is not

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-15 Thread Gabriel Genellina
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643 ___ ___

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-12 Thread Allan Crooks
New submission from Allan Crooks a...@users.sourceforge.net: If cgitb.html tries to get the value of an attribute from an object, and the getattr call causes an exception to be raised (other than an AttributeError), then cgitb.html fails to work: If you run the attached file in Python 2.5.2 or

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-12 Thread Allan Crooks
Changes by Allan Crooks a...@users.sourceforge.net: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643 ___ ___