[issue9084] vimrc: use matchall() instead of :match to allow multiple matches

2010-06-25 Thread daniel hahler
New submission from daniel hahler python-b...@thequod.de: This patch fixes the vimrc example file to use matchadd() instead of :match, so that the second match does not overwrite the first one. This resulted in leading tabs not highlighted as BadWhitespace. -- components: Demos

[issue9084] vimrc: use matchall() instead of :match to allow multiple matches

2010-06-25 Thread daniel hahler
Changes by daniel hahler python-b...@thequod.de: -- keywords: +patch Added file: http://bugs.python.org/file17773/python-vimrc-use-matchadd.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9084

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2014-02-17 Thread daniel hahler
New submission from daniel hahler: posix.unsetenv fails to clear the environment if there's an entry with an empty key. TEST CASE: Python 2.7.6 (default, Jan 6 2014, 17:05:19) [GCC 4.8.1] on linux2 Type help, copyright, credits or license for more information. import os

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2014-02-19 Thread daniel hahler
daniel hahler added the comment: Please note that I have noticed this not because of setting it via `os.environ`, but because a program using `os.environ.clear()` crashed: https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1281086 I cannot say how this unusual entry was added

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2014-02-19 Thread daniel hahler
daniel hahler added the comment: It would help to know if the key was set manually by apport, or if it comes from the real environment. The environment looks correct: It comes from the real environment. I wanted to use apport, but could not from the current shell, because of this bug. I

[issue27900] ctypes fails to find ncurses via ncursesw on Arch Linux

2016-08-30 Thread daniel hahler
New submission from daniel hahler: The following code fails on Arch Linux: import ctypes.util print(ctypes.util.find_library("ncurses")) It first looks at "ldconfig -p" (via _findSoname_ldconfig), which only contains: libncursesw.so.6 (libc6,x86-64) => /u

[issue31495] Wrong offset with IndentationError ("expected an indented block")

2017-09-16 Thread daniel hahler
New submission from daniel hahler: Given the following file `t-expected-indent.py`: ``` if 1: foo ``` python t-expected-indent.py reports: ``` File "t-expected-indent.py", line 2 foo ^ IndentationError: expected an indented block ``` However, it should get reported fo

[issue33949] tests: allow to select tests using loadTestsFromName

2018-06-23 Thread daniel hahler
New submission from daniel hahler : I was not aware of `python -m test -m …`, but think that supporting `python -m test test.module.class.name` should be supported for selecting a single test. -- components: Tests messages: 320325 nosy: blueyed priority: normal pull_requests: 7489

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2018-08-20 Thread daniel hahler
New submission from daniel hahler : With "." in sys.path the "__file__" attribute will be a relative path, and therefore cannot be used after "chdir". This likely affects relative paths in general, but have not tested it. ``` import os import sys sys.pa

[issue16482] pdb.set_trace() clobbering traceback on error

2018-03-27 Thread daniel hahler
daniel hahler <python-b...@thequod.de> added the comment: Just for reference: https://github.com/python/cpython/pull/6233 is about fixing this. -- keywords: +patch nosy: +blueyed pull_requests: +5995 stage: needs patch -> patch review _

[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue35137> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35270] Cmd.complete does not handle cmd=None

2018-11-17 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +9833 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35270> ___ ___ Py

[issue35270] Cmd.complete does not handle cmd=None

2018-11-17 Thread daniel hahler
New submission from daniel hahler : When `parseline` returns `None` for `cmd` (like pdb++ might cause it when changing a cmd "disable" to "!disable"), the following will cause a TypeError: > compfunc = getattr(self, 'complete_' + cmd) "None" should be a

[issue36388] pdb: do_debug installs sys.settrace handler when used inside post_mortem

2019-03-21 Thread daniel hahler
New submission from daniel hahler : It seems like the "debug" command is not properly handled with "post_mortem()". It appears due to using `sys.settrace(self.trace_dispatch)` in the end of `do_debug`, although no tracing is installed with post_mortem in the first place.

[issue36388] pdb: do_debug installs sys.settrace handler when used inside post_mortem

2019-03-21 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12431 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36388> ___ ___ Py

[issue14841] os.get_terminal_size() should check stdin as a fallback

2019-04-05 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12622 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue14841> ___ ___ Py

[issue14841] os.get_terminal_size() should check stdin as a fallback

2019-04-05 Thread daniel hahler
daniel hahler added the comment: Created a PR at https://github.com/python/cpython/pull/12697. It prefers stdin and stderr over stdout. I think stdin is most likely connected to a terminal, and wondered why ncurses uses stderr/stdout first, and only then stdin. stdin handling was added

[issue36474] RecursionError resets trace function set via sys.settrace

2019-03-29 Thread daniel hahler
daniel hahler added the comment: Discovered via / relevant for coverage's PyTracer: https://github.com/nedbat/coveragepy/issues/787. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36474] RecursionError resets trace function set via sys.settrace

2019-03-29 Thread daniel hahler
New submission from daniel hahler : A RecursionError causes the trace function set via `sys.settrace` to get removed/unset. Given the following script: ``` import sys def trace(*args): print("trace", args) return trace sys.settrace(trace) def f(): f() print(sy

[issue36494] bdb: should set f_trace_lines = True

2019-03-31 Thread daniel hahler
New submission from daniel hahler : bdb.Bdb.set_trace should set "f_trace_lines = True" on frames explicitly. Otherwise they might be skipped if something else has set it to False already, e.g. via a suggested change for coverage.py to set this for performance reasons (https://

[issue36494] bdb: should set f_trace_lines = True

2019-03-31 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12572 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36494> ___ ___ Py

[issue36494] bdb.Bdb.set_trace: should set f_trace_lines = True

2019-03-31 Thread daniel hahler
Change by daniel hahler : -- components: +Library (Lib) title: bdb: should set f_trace_lines = True -> bdb.Bdb.set_trace: should set f_trace_lines = True type: -> behavior ___ Python tracker <https://bugs.python.org/i

[issue36550] Avoid creating AttributeError exceptions in the debugger

2019-04-07 Thread daniel hahler
New submission from daniel hahler : pdb should try (hard) to avoid creating unnecessary exceptions, e.g. ``AttributeError`` when looking up commands, since this will show up in exception chains then (as "'Pdb' object has no attribute 'do_foo'"). See https://github.com/python/cp

[issue36550] Avoid creating AttributeError exceptions in the debugger

2019-04-07 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12643 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36550> ___ ___ Py

[issue36563] pdbrc home twice

2019-04-08 Thread daniel hahler
Change by daniel hahler : -- nosy: blueyed priority: normal severity: normal status: open title: pdbrc home twice ___ Python tracker <https://bugs.python.org/issue36

[issue36563] pdbrc is read twice if current directory is the home directory

2019-04-08 Thread daniel hahler
New submission from daniel hahler : If $HOME is $PWD, .pdbrc is read twice. This confused me when seeing intentional errors from there twice during tests. It should be only read once. -- components: +Library (Lib) title: pdbrc home twice -> pdbrc is read twice if current direct

[issue36563] pdbrc is read twice if current directory is the home directory

2019-04-08 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12654 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36563> ___ ___ Py

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-28 Thread daniel hahler
daniel hahler added the comment: Re-opening: it currently still crashes with a NameError when using "debug doesnotexist", or "debug doesnotexist()". Will create a new PR for this. -- status: closed -> open ___

[issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput

2019-02-27 Thread daniel hahler
daniel hahler added the comment: I can confirm that this fixes cursor keys not working properly after "debug foo()" (recursive debugging) with pdb. -- nosy: +blueyed versions: +Python 3.8 ___ Python tracker <https://bugs.python.o

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-28 Thread daniel hahler
Change by daniel hahler : -- pull_requests: +12109 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issue35931> ___ ___ Python-

[issue36335] Factor out / add bdb.Bdb.is_skipped_frame

2019-03-17 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12347 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36335> ___ ___ Py

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-17 Thread daniel hahler
daniel hahler added the comment: Just as a sidenote: the other day I was checking Python's source to see how to override a user's home (in tests, when os.path.expanduser` is used in code), and found it easy to just set $HOME in the environment in the end. I guess this change will cause

[issue36335] Factor out / add bdb.Bdb.is_skipped_frame

2019-03-17 Thread daniel hahler
New submission from daniel hahler : In https://bugs.python.org/issue36130 is_skipped_module was changed to handle frames without __name__, but I think it makes sense being able to skip e.g. frames on frame.f_code.co_name then. Factoring out is_skipped_frame allows for this. The default

[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-03-09 Thread daniel hahler
Change by daniel hahler : -- pull_requests: +12238 ___ Python tracker <https://bugs.python.org/issue13120> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36250] pdb: interaction might cause "ValueError: signal only works in main thread"

2019-03-09 Thread daniel hahler
New submission from daniel hahler : This is similar to https://bugs.python.org/issue13120. I have a patch for a fix already, but no test - will add a PR for it. Fixed in pdbpp in https://github.com/antocuni/pdb/pull/143, which also has a test that demonstrates it. -- components

[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-03-09 Thread daniel hahler
daniel hahler added the comment: Just for reference: there is a similar issue with `interaction`: https://bugs.python.org/issue36250. -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue13

[issue36250] pdb: interaction might cause "ValueError: signal only works in main thread"

2019-03-09 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12239 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36250> ___ ___ Py

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-03-09 Thread daniel hahler
daniel hahler added the comment: Bumping. The first (merged) patch is not sufficient, and causes even an API breakage, because it disallows passing in a code object (via compile()) anymore. A better fix is waiting at https://github.com/python/cpython/pull/12103, and should also get

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-03-09 Thread daniel hahler
daniel hahler added the comment: Example of the API breakage: ``` /opt/python/3.8-dev/lib/python3.8/pdb.py:321: in _cmdloop self.cmdloop() /opt/python/3.8-dev/lib/python3.8/cmd.py:138: in cmdloop stop = self.onecmd(line) /opt/python/3.8-dev/lib/python3.8/pdb.py:418: in onecmd

[issue24565] the f_lineno getter is broken

2019-03-22 Thread daniel hahler
Change by daniel hahler : -- versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue24565> ___ ___ Python-bugs-list mailin

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-07 Thread daniel hahler
New submission from daniel hahler : `debug print(` will make pdb crash with a SyntaxError: % python -c '__import__("pdb").set_trace()' --Return-- > (1)()->None (Pdb) print( *** SyntaxError: unexpected EOF while parsing (Pdb) debug print( EN

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-07 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch, patch pull_requests: +11767, 11768 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-07 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +11767 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35931> ___ ___ Py

[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread daniel hahler
daniel hahler added the comment: Thanks for the review and backport! -- ___ Python tracker <https://bugs.python.org/issue35931> ___ ___ Python-bugs-list mailin

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-25 Thread daniel hahler
daniel hahler added the comment: > In that case the proposed change builds an implicit stack of trace functions > that is increased each time the interpreter executes this hard breakpoint Very valid and good point. Would it work to store it on the class then (once)? FWIW: pdbp

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-25 Thread daniel hahler
daniel hahler added the comment: I've just found that I've created an issue with regard to `do_debug` for this already (https://bugs.python.org/issue36388), and a PR: https://github.com/python/cpython/pull/12479. -- ___ Python tracker <ht

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-26 Thread daniel hahler
daniel hahler added the comment: >From my initial comment: > I've done this via monkeypatching for pdbpp's tests, which resulted in an > easy 2% coverage gain (https://github.com/antocuni/pdb/pull/253). It will also affect running tests with coverage (in general, or using tools li

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-06-05 Thread daniel hahler
daniel hahler added the comment: Just for reference: I've just spent quite some time debugging missing coverage with pytest, and it turned out that part of it is because of this issue. Most of the pdb related tests run in a subprocess (via pexpect), but not all of them. I am using

[issue37175] make install: make compileall optional

2019-06-06 Thread daniel hahler
New submission from daniel hahler : I'd like to make running compileall optionally during installation, since it takes quite a while by itself (with lots of output), and gets a bit into the way when installing often (e.g. with git-bisect). AFAIK it should not be required, because the files

[issue36786] "make install" should run compileall in parallel

2019-06-06 Thread daniel hahler
daniel hahler added the comment: This can be closed as per https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504. -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue36

[issue37032] Add CodeType.replace() method

2019-06-06 Thread daniel hahler
daniel hahler added the comment: Thanks for this great improvement! Was about to suggest having something more futureproof when noticing this with pdbpp, found this, and submitted PRs to use it for ipython and hypothesis also. -- nosy: +blueyed

[issue36474] RecursionError resets trace function set via sys.settrace

2019-05-13 Thread daniel hahler
daniel hahler added the comment: Duplicate of https://bugs.python.org/issue10933. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-22 Thread daniel hahler
New submission from daniel hahler : bdb/pdb currently uses `sys.settrace(None)` when uninstalling its trace function (trace_dispatch), but should rather store the original trace function in the beginning and use this instead of `None`. While typically pdb is not used in tests, it is just

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-22 Thread daniel hahler
Change by daniel hahler : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue37011> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-22 Thread daniel hahler
daniel hahler added the comment: Looks great, thanks! -- ___ Python tracker <https://bugs.python.org/issue37011> ___ ___ Python-bugs-list mailing list Unsub

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2019-05-23 Thread daniel hahler
New submission from daniel hahler : Given: ``` class BadRepr: def __repr__(self): raise Exception('repr_exc') obj = BadRepr() __import__('pdb').set_trace() ``` ``` (Pdb) p obj (Pdb) pp obj (Pdb) ``` Possible patch - clumsy due to `self._getval` both printing any error already

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2019-05-24 Thread daniel hahler
daniel hahler added the comment: Thanks for the feedback. What do you think of refactoring the common block (also used in other places) into a method? +except: +exc_info = sys.exc_info()[:2] +self.error(traceback.format_exception_only(*exc_info)[-1].strip

[issue36969] pdb: do_args: display/handle keyword-only arguments

2019-05-19 Thread daniel hahler
New submission from daniel hahler : With a program like the following, `args` will not display the keyword-only argument: ``` def f1(arg=None, *, kwonly=None): __import__('pdb').set_trace() f1() ``` ``` (Pdb) args arg = 'arg' kw = 'kw' ``` Related code: https://github.com/python

[issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput

2019-05-16 Thread daniel hahler
daniel hahler added the comment: It was added in 477c8d5e702 (a huge svn merge commit), with this reference: r45955 | georg.brandl | 2006-05-10 19:13:20 +0200 (Wed, 10 May 2006) | 4 lines Patch #721464: pdb.Pdb instances can now be given explicit stdin and stdout

[issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput

2019-05-16 Thread daniel hahler
daniel hahler added the comment: Just for reference and searchability: this causes tab completion to not work with `debug foo()` also. -- ___ Python tracker <https://bugs.python.org/issue31

[issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput

2019-05-16 Thread daniel hahler
daniel hahler added the comment: > I think a good alternative patch might be: This however makes it behave different in tests, where stdout might be mocked/wrapped intentionally. Therefore I think using the parent's `use_rawinput` is the better fix for this (the originally proposed pa

[issue36663] pdb: store whole exception information in locals (via user_exception)

2019-04-18 Thread daniel hahler
New submission from daniel hahler : Currently Pdb.user_exception does not store the traceback in "user_exception", but only passes it to `interaction`: def user_exception(self, frame, exc_info): """This function is called if an exception occurs, b

[issue14788] Pdb debugs itself after ^C and a breakpoint is set anywhere

2019-04-19 Thread daniel hahler
daniel hahler added the comment: I think this issue itself might be fixed already / changed since 3.5. I've came up with something similar in this area though, which is only triggered when using Ctrl-C while pdb is waiting for the next statement: https://github.com/python/cpython/pull/12880

[issue36667] pdb: restore SIGINT handler in sigint_handler already

2019-04-19 Thread daniel hahler
New submission from daniel hahler : Without this, and additional SIGINT while waiting for the next statement (e.g. during `time.sleep`) will stop at `sigint_handler`. With this patch: > …/t-pdb-sigint-in-sleep.py(10)() -> sleep() (Pdb) c ^C Program interrupted. (Use

[issue36667] pdb: restore SIGINT handler in sigint_handler already

2019-04-19 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12804 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36667> ___ ___ Py

[issue22135] allow to break into pdb with Ctrl-C for all the commands that resume execution

2019-04-19 Thread daniel hahler
daniel hahler added the comment: Would be nice to have this indeed. Please consider creating a PR with an updated patch then for easier review. -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue22

[issue20766] reference leaks in pdb

2019-04-19 Thread daniel hahler
daniel hahler added the comment: Please see https://bugs.python.org/issue36667 for a followup. It does not look like moving it to `interaction` is relevant for fixing the leak, is it? I think it should be restored in both places. -- nosy: +blueyed

[issue35824] http.cookies._CookiePattern modifying regular expressions

2019-05-02 Thread daniel hahler
daniel hahler added the comment: I seems like http.cookiejar should be used for clients, which includes more relaxed parsing of cookies. This is mentioned in the docs at https://github.com/python/cpython/blame/443fe5a52a3d6a101795380227ced38b4b5e0a8b/Doc/library/http.cookies.rst#L63-L65

[issue23163] pdb docs need to contain a statement on threads/multithreaded debugging

2019-04-27 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue23163> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21281] DEBUGGING: Simultaneous stopping of all threads on breakpoint and switching between threads

2019-04-27 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue21281> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21281] DEBUGGING: Simultaneous stopping of all threads on breakpoint and switching between threads

2019-04-27 Thread daniel hahler
daniel hahler added the comment: This is a good idea. I am currently leaning towards using a threading.Lock around `Pdb.interaction`, or `pdb.set_trace` with pdb++. This would at least mitigate the issue where `pdb.set_trace` is used in some code that gets executed again, and two pdb

[issue26967] argparse: allow_abbrev=False stops -vv from working

2019-07-02 Thread daniel hahler
daniel hahler added the comment: https://github.com/python/cpython/pull/14316 has a fix. -- nosy: +blueyed versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue26

[issue35824] http.cookies._CookiePattern modifying regular expressions

2019-04-22 Thread daniel hahler
daniel hahler added the comment: Another example of a value that fails to parse is if "-" is used instead of "GMT", which is the case with GitHub: > Set-Cookie: has_recent_activity=1; path=/; expires=Mon, 22 Apr 2019 23:27:18 > - So using a regular exp

[issue35824] http.cookies._CookiePattern modifying regular expressions

2019-04-22 Thread daniel hahler
daniel hahler added the comment: http.cookiejar parses this correctly, using http2time: >>> import http.cookiejar >>> http.cookiejar.parse_ns_headers(["has_recent_activity=1; path=/; expires=Mon, 22 Apr 2019 23:27:18 -"]) [[('has_re

[issue5215] change value of local variable in debug

2019-04-23 Thread daniel hahler
daniel hahler added the comment: @Andrei That is something different, caused by "y" only being defined later. But it would be nice if it would work. Should be a separate/new issue though. -- nosy: +blueyed ___ Python track

[issue5215] change value of local variable in debug

2019-04-23 Thread daniel hahler
daniel hahler added the comment: This works however (Python 3.7), but is just buggy in pdbpp (another project). -- ___ Python tracker <https://bugs.python.org/issue5

[issue9633] pdb go stack up/down

2019-04-23 Thread daniel hahler
Change by daniel hahler : -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue9633> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21161] list comprehensions don't see local variables in pdb in python3

2019-07-31 Thread daniel hahler
daniel hahler added the comment: Georg, please consider re-opening. This patch here appears to fix this after all. -- nosy: +blueyed versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue21

[issue37803] "python -m pdb --help" does not work

2019-08-09 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +14925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15193 ___ Python tracker <https://bugs.python.org/issu

[issue37803] "python -m pdb --help" does not work

2019-08-09 Thread daniel hahler
New submission from daniel hahler : The long options passed to `getopt.getopt` should not include the leading dashes: % python -m pdb --help Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__ma

[issue21161] list comprehensions don't see local variables in pdb in python3

2019-08-09 Thread daniel hahler
Change by daniel hahler : -- pull_requests: +14926 pull_request: https://github.com/python/cpython/pull/15194 ___ Python tracker <https://bugs.python.org/issue21

[issue37634] doc: "module" of a warning might be its filename

2019-07-19 Thread daniel hahler
New submission from daniel hahler : With e.g. DeprecationWarnings for "invalid escape sequence" the "module" part is the file name (with ".py" removed), because it calls PyErr_WarnExplicitObject directly: https://github.com/python/cpython/blob/3cba3d3c55f230a59

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2019-07-19 Thread daniel hahler
daniel hahler added the comment: Note that "module" might also be the filename (with ".py" removed). I've just created issue37634 - might be worth including in your PR if it makes sense to only document this. -- nosy: +blueyed __

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-11-14 Thread daniel hahler
daniel hahler added the comment: This was fixed / can be closed (https://github.com/python/cpython/pull/12064). -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue36

[issue38806] "pdb.Pdb(skip=…).set_trace()" should always stop on calling frame

2019-11-14 Thread daniel hahler
New submission from daniel hahler : The following will not stop for debugging: python3.8 -c 'import pdb; pdb.Pdb(skip=["__main__"]).set_trace()' The example is contrived, the real case would be to have some "noisy" module being excluded in general, but when you add an

[issue38806] "pdb.Pdb(skip=…).set_trace()" should always stop on calling frame

2019-11-14 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +16668 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17159 ___ Python tracker <https://bugs.python.org/issu

[issue17446] doctest test finder doesnt find line numbers of properties

2019-10-28 Thread daniel hahler
daniel hahler added the comment: The PR appears to need a better test according to https://github.com/python/cpython/pull/3419#issuecomment-350570083. -- nosy: +blueyed ___ Python tracker <https://bugs.python.org/issue17

[issue24565] the f_lineno getter is broken

2019-12-05 Thread daniel hahler
daniel hahler added the comment: This is likely covered by existing/linked issues already, but wanted to leave it here nonetheless: Given t-pdb.py: ``` import sys def main(): sys.stdout.write("main...\n") assert 0 if __name__ == "__main__": main() ```

[issue39766] unittest's assertRaises removes locals from tracebacks

2020-02-26 Thread daniel hahler
daniel hahler added the comment: The test for issue9815 passes since bbd3cf8f1e (bpo-23890). It seems like `traceback.clear_frames(tb)` should probably removed altogether? -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue39

[issue39766] unittest's assertRaises removes locals from tracebacks

2020-02-26 Thread daniel hahler
New submission from daniel hahler : I was a bit surprised to find that unittest's assertRaises clears the locals on the traceback, which e.g. prevents pytest to display them in case of failures. This was done via https://bugs.python.org/issue9815 (https://github.com/python/cpython/commit

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2020-01-25 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +17564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18180 ___ Python tracker <https://bugs.python.org/issu

[issue39649] bdb.Bdb.format_stack_entry: checks for obsolete __args__

2020-02-16 Thread daniel hahler
New submission from daniel hahler : It does: ``` if '__args__' in frame.f_locals: args = frame.f_locals['__args__'] else: args = None if args: s += reprlib.repr(args) else: s += '()' ``` However that appears

[issue39649] bdb.Bdb.format_stack_entry: checks for obsolete __args__

2020-02-16 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +17907 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18531 ___ Python tracker <https://bugs.python.org/issu

[issue39649] bdb.Bdb.format_stack_entry: checks for obsolete __args__

2020-02-16 Thread daniel hahler
daniel hahler added the comment: Sure: https://github.com/python/cpython/pull/18531 -- ___ Python tracker <https://bugs.python.org/issue39649> ___ ___ Python-bug

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2019-12-24 Thread daniel hahler
daniel hahler added the comment: > And changing this to have to check every time import runs if an entry in > sys.path is absolute would be costly (that's not a insignificant number of > stat calls which we always try to avoid during import when possible). This could be done when

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2020-01-05 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +17276 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17855 ___ Python tracker <https://bugs.python.org/issu

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2020-01-05 Thread daniel hahler
New submission from daniel hahler : Exceptions within `__repr__` methods of captured locals (e.g. via the `capture_locals` argument of `TracebackException`) are not handled: ``` import traceback class CrashingRepr: def __repr__(self): raise RuntimeError("

[issue39913] Document warnings.WarningMessage ?

2020-03-09 Thread daniel hahler
New submission from daniel hahler : I've noticed that `warnings.WarningMessage` is not documented, i.e. it does not show up in the intersphinx object list. I'm not sure how to document it best, but maybe just describing its attributes? Ref: https://github.com/blueyed/cpython/blob

[issue39967] bdb calls linecache.checkcache, resulting in source being different from code

2020-03-15 Thread daniel hahler
New submission from daniel hahler : `Bdb.reset` calls `linecache.checkcache`, which will clear the cache for any updated source files. This however might result in displayed source code being different from the actual code, in case you are editing the file being currently debugged. I think

[issue39967] bdb calls linecache.checkcache, resulting in source being different from code

2020-03-15 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +18360 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19013 ___ Python tracker <https://bugs.python.org/issu

  1   2   >