[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks
Dominik Vilsmeier added the comment: I wasn't aware of this issue so apparently I submitted a duplicate (#42722) half a year ago. The solution I implemented relies on simply calling `TestCase.debug` and `TestSuite.debug` which makes it a lightweight change. From the perspective of the debugger the situation is thus no different than running a "normal" script. The other issue also has a pull request attached. -- nosy: +Dominik V. ___ Python tracker <https://bugs.python.org/issue18765> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42722] Add --debug command line option to unittest to enable post-mortem debugging
Dominik Vilsmeier added the comment: Is anybody interested in reviewing the PR? It seems like a useful enhancement to me. -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue42722> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43443] Should shelve support dict union?
New submission from Dominik Vilsmeier : The docs of shelve mention that > Shelf objects support all methods supported by dictionaries. This eases the > transition from dictionary based scripts to those requiring persistent > storage. However the `|=` operator is not implemented, preventing a seamless transition from `dict` to `shelve`. So should this be implemented for `Shelf` as well? `|` on the other hand doesn't make much sense. Otherwise the docs could be updated. -- components: Library (Lib) messages: 388335 nosy: Dominik V. priority: normal severity: normal status: open title: Should shelve support dict union? type: behavior versions: Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43443> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43443] Should shelve support dict union?
Dominik Vilsmeier added the comment: Right, that seems like a good idea. But `__ior__` could be implemented nevertheless? -- ___ Python tracker <https://bugs.python.org/issue43443> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43443] Should shelve support dict union?
Dominik Vilsmeier added the comment: It's true, having `__ior__` but not `__or__` would probably be weird. In the end it's just "nice to have", but I'm not even sure that this applies. Calling `db.update(...)` is still more explicit than `db |= ...`. The docs mention that > This eases the transition from dictionary based scripts to those requiring > persistent storage. For my use cases, however, I always knew right from the beginning that I want object persistence between different runs of a script (e.g. for data analysis, caching the expensive results), so it was always clear that I'm working with a Shelf object and not a dict (i.e. no expectations on the availability of `|=`). Primarily, this issue was meant to point out the mismatch of docs/implementation and not to get `|=` implemented for `Shelf`. In the end, I think updating the docs is all that is needed. -- ___ Python tracker <https://bugs.python.org/issue43443> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com