This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年11月25日 02:05 by rbcollins, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue-22936-1.patch | rbcollins, 2015年01月26日 23:48 | |||
| issue-22936-2.patch | rbcollins, 2015年02月03日 23:29 | |||
| issue-22936-3.patch | rbcollins, 2015年03月04日 23:23 | review | ||
| issue-22936-4.patch | rbcollins, 2015年03月05日 06:37 | review | ||
| issue-22936-5.patch | rbcollins, 2015年03月06日 00:18 | review | ||
| Messages (17) | |||
|---|---|---|---|
| msg231628 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2014年11月25日 02:05 | |
From https://github.com/testing-cabal/testtools/issues/111 - any code that is data dependent can be hard to diagnose from a backtrace alone. Many unittest and server environments address this by doing custom tracebacks that include locals. To address this in unittest, we need to add a similar capacity to traceback, and then use it from unittest (as we can't just depend on a module from PyPI in the stdlib). |
|||
| msg231630 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2014年11月25日 02:07 | |
See http://bugs.python.org/issue22936 for the unittest aspect of this. |
|||
| msg231738 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2014年11月27日 00:03 | |
Check out the cgitb stdlib module. |
|||
| msg234799 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年01月26日 23:48 | |
First cut implementation. I'm sure there is lots we can add, but this will make things nicer in and of itself. Thanks for the pointer to cgitb, I've skimmed it and its definitely much more comprehensive. I'm not entirely sure about the best way to glue it and the new traceback API together; or even if thats needed. |
|||
| msg235366 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年02月03日 23:29 | |
updated with the latest 17911 patch basis. |
|||
| msg237218 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年03月04日 23:14 | |
And now updated to HEAD as 17911 has been committed. |
|||
| msg237243 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2015年03月05日 06:48 | |
Latest patch (issue-22936-4.patch) looks good to me! |
|||
| msg237244 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月05日 07:29 | |
New changeset 50741316dd3a by Robert Collins in branch 'default': Issue #22936: Make it possible to show local variables in tracebacks. https://hg.python.org/cpython/rev/50741316dd3a |
|||
| msg237246 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2015年03月05日 08:07 | |
In the patch you made some args kw-only. Isn't that backward incompatible in case someone was passing them by position? |
|||
| msg237262 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2015年03月05日 14:06 | |
It's only the new APIs just introduced in issue #17911 that changed to kwonly arguments. We missed that they should really be kwonly in the original review, but it become more obvious in this patch, as it added a second feature toggle to indicate whether or not to capture the locals. |
|||
| msg237267 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2015年03月05日 15:08 | |
You are right -- I didn't notice the versionadded in the docs. Sorry for the noise. |
|||
| msg237298 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年03月05日 22:39 | |
No worries. BTW there is one more patch needed to close this issue - adding the feature to unittest. I'm working that up now. |
|||
| msg237308 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年03月06日 00:02 | |
And the unittest patch. |
|||
| msg237314 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月06日 00:46 | |
New changeset b4a26b28f5b3 by Robert Collins in branch 'default': Issue #22936: Allow showing local variables in unittest errors. https://hg.python.org/cpython/rev/b4a26b28f5b3 |
|||
| msg237320 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2015年03月06日 02:15 | |
I just filed issue #23597 as a potential further follow-up to this, which would be to also add support for displaying local variables directly to the logging module. However, that has some additional security implications, so I'm entirely convinced it's a good idea yet. See the new RFE for more details. |
|||
| msg237326 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2015年03月06日 02:36 | |
msg237320 "...so I'm *NOT* entirely convinced..."? :) |
|||
| msg249169 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年08月26日 00:13 | |
This itself is fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:10 | admin | set | github: 67125 |
| 2015年08月26日 00:13:03 | rbcollins | set | status: open -> closed resolution: fixed messages: + msg249169 stage: resolved |
| 2015年03月21日 04:16:48 | r.david.murray | set | nosy:
+ n |
| 2015年03月21日 04:16:33 | r.david.murray | link | issue23724 superseder |
| 2015年03月06日 02:36:33 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg237326 |
| 2015年03月06日 02:15:06 | ncoghlan | set | dependencies:
+ traceback: add a new thin class storing a traceback without storing local variables messages: + msg237320 |
| 2015年03月06日 02:13:00 | ncoghlan | link | issue23597 dependencies |
| 2015年03月06日 00:46:55 | python-dev | set | messages: + msg237314 |
| 2015年03月06日 00:23:41 | gvanrossum | set | nosy:
- gvanrossum |
| 2015年03月06日 00:18:58 | rbcollins | set | files: + issue-22936-5.patch |
| 2015年03月06日 00:18:28 | rbcollins | set | files: - issue-22936-5.patch |
| 2015年03月06日 00:02:50 | rbcollins | set | files:
+ issue-22936-5.patch messages: + msg237308 |
| 2015年03月05日 22:39:29 | rbcollins | set | messages: + msg237298 |
| 2015年03月05日 15:08:35 | ezio.melotti | set | messages: + msg237267 |
| 2015年03月05日 14:07:00 | ncoghlan | set | messages: + msg237262 |
| 2015年03月05日 08:07:47 | ezio.melotti | set | nosy:
+ ezio.melotti messages: + msg237246 |
| 2015年03月05日 07:29:31 | python-dev | set | nosy:
+ python-dev messages: + msg237244 |
| 2015年03月05日 06:48:49 | ncoghlan | set | nosy:
+ ncoghlan messages: + msg237243 |
| 2015年03月05日 06:37:55 | rbcollins | set | files: + issue-22936-4.patch |
| 2015年03月04日 23:23:14 | rbcollins | set | files: + issue-22936-3.patch |
| 2015年03月04日 23:23:05 | rbcollins | set | files: - issue-22936-3.patch |
| 2015年03月04日 23:14:22 | rbcollins | set | files:
+ issue-22936-3.patch messages: + msg237218 |
| 2015年02月03日 23:29:22 | rbcollins | set | files:
+ issue-22936-2.patch messages: + msg235366 |
| 2015年01月26日 23:48:17 | rbcollins | set | files:
+ issue-22936-1.patch keywords: + patch messages: + msg234799 |
| 2014年11月28日 18:07:22 | cvrebert | set | nosy:
+ cvrebert |
| 2014年11月27日 00:03:34 | gvanrossum | set | nosy:
+ gvanrossum messages: + msg231738 |
| 2014年11月25日 02:07:00 | rbcollins | set | messages: + msg231630 |
| 2014年11月25日 02:06:34 | rbcollins | set | type: enhancement |
| 2014年11月25日 02:05:27 | rbcollins | create | |