Change by daniel hahler :
--
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issue41033>
___
___
Python-bugs-list mailing list
Unsubscribe:
daniel hahler added the comment:
Yes, the example also does not segfault for me either (also with Python 3.8.12
I have now as `python3.8`), so this was likely only happening in the more
complex setup, and/or maybe with some specific version of readline back then.
--
title
Change by daniel hahler :
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue45249>
___
___
Python-bugs-list mailing list
Unsubscribe:
daniel hahler added the comment:
I've noticed a regression/change with the code change for this issue.
When not catching the exception from `compile("invalid(", "", "single")`
it has a caret below the opening parenthesis:
```
Traceback (most recent
daniel hahler added the comment:
Given code like the following the try/except handling of Pdb (via `Cmd.onecmd`,
see https://github.com/python/cpython/pull/4666) will mess with
`sys.exc_info()`, which could be avoided:
```
try:
raise ValueError()
except Exception as exc:
e = exc
Change by daniel hahler :
--
versions: -Python 3.9
___
Python tracker
<https://bugs.python.org/issue43798>
___
___
Python-bugs-list mailing list
Unsubscribe:
daniel hahler added the comment:
@Pablo: the problem (referenced in the pytest issue) is that `ast.alias` has
new required arguments now (see also the adjusted test in
https://github.com/python/cpython/commit/75a06f067bd0a2687312e5f8e78f9075be76ad3a#diff
Change by daniel hahler :
--
nosy: +blueyed
___
Python tracker
<https://bugs.python.org/issue35212>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Hahler added the comment:
Brett, thanks for the reference.
I've found
https://discuss.python.org/t/coverage-report-in-github-ci-for-standard-library/2836/11,
and https://bugs.python.org/issue40993 through it.
--
___
Python tracker
&
Change by Daniel Hahler :
--
nosy: +blueyed -blueyed2
___
Python tracker
<https://bugs.python.org/issue39041>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Hahler added the comment:
Is it planned to enable coverage uploads for PRs?
This would really help with seeing if code (to be merged) is covered etc.
--
nosy: +blueyed2
___
Python tracker
<https://bugs.python.org/issue39
Change by daniel hahler :
--
nosy: +blueyed
nosy_count: 2.0 -> 3.0
pull_requests: +22665
pull_request: https://github.com/python/cpython/pull/23805
___
Python tracker
<https://bugs.python.org/issu
Change by daniel hahler :
--
pull_requests: +22102
pull_request: https://github.com/python/cpython/pull/23202
___
Python tracker
<https://bugs.python.org/issue36
Change by daniel hahler :
--
nosy: +blueyed
nosy_count: 4.0 -> 5.0
pull_requests: +21943
pull_request: https://github.com/python/cpython/pull/23025
___
Python tracker
<https://bugs.python.org/issu
Change by daniel hahler :
--
nosy: +blueyed
nosy_count: 7.0 -> 8.0
pull_requests: +21942
pull_request: https://github.com/python/cpython/pull/23025
___
Python tracker
<https://bugs.python.org/issu
Change by daniel hahler :
--
nosy: +blueyed
nosy_count: 18.0 -> 19.0
pull_requests: +21884
pull_request: https://github.com/python/cpython/pull/22968
___
Python tracker
<https://bugs.python.org/iss
Change by daniel hahler :
--
nosy: +blueyed
nosy_count: 11.0 -> 12.0
pull_requests: +21883
pull_request: https://github.com/python/cpython/pull/22967
___
Python tracker
<https://bugs.python.org/issu
Change by daniel hahler :
--
title: Decorator breaks inspect.getsource -> Decorator with paren tokens in
arguments breaks inspect.getsource
___
Python tracker
<https://bugs.python.org/issu
Change by daniel hahler :
--
components: +Library (Lib)
type: -> behavior
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issu
daniel hahler added the comment:
91e1bc18bd (bpo-41194) reminded me of this.
Maybe the same mechanism could be used here.
--
___
Python tracker
<https://bugs.python.org/issue41
daniel hahler added the comment:
This adds overhead, since it creates a formatter and uses it for formatting
only for validation purposes.
I think it is better to only have the error when the formatter is actually used
(i.e. the help is displayed - which is not the typical use case, and it
New submission from daniel hahler :
The following will crash due to the signal handler calling itself recursively:
```
import os, readline, signal, sys
del sys.modules["readline"]
import readline
os.kill(os.getpid(), signal.SIGWINCH)
```
This fixes it:
```
diff --git a/Modules/re
Change by daniel hahler :
--
nosy: +blueyed
nosy_count: 3.0 -> 4.0
pull_requests: +20102
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20924
___
Python tracker
<https://bugs.python.org/i
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
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
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/cp
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
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/c
daniel hahler added the comment:
Sure: https://github.com/python/cpython/pull/18531
--
___
Python tracker
<https://bugs.python.org/issue39649>
___
___
Python-bug
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
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 += '()'
`
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
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
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("
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
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()
```
With
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
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
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
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
Change by daniel hahler :
--
pull_requests: +14926
pull_request: https://github.com/python/cpython/pull/15194
___
Python tracker
<https://bugs.python.org/issue21
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
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
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
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
_
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
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
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
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
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
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 us
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
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 track
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: pdbpp
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
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 printi
daniel hahler added the comment:
Looks great, thanks!
--
___
Python tracker
<https://bugs.python.org/issue37011>
___
___
Python-bugs-list mailing list
Unsub
Change by daniel hahler :
--
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue37011>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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 c
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 propos
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
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
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
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
Change by daniel hahler :
--
nosy: +blueyed
___
Python tracker
<https://bugs.python.org/issue23163>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by daniel hahler :
--
nosy: +blueyed
___
Python tracker
<https://bugs.python.org/issue21281>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by daniel hahler :
--
nosy: +blueyed
___
Python tracker
<https://bugs.python.org/issue9633>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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 -"])
[[('h
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 express
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
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12804
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36667>
___
___
Py
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
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
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/
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
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12654
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36563>
___
___
Py
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 directory
Change by daniel hahler :
--
nosy: blueyed
priority: normal
severity: normal
status: open
title: pdbrc home twice
___
Python tracker
<https://bugs.python.org/issue36
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://
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12643
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36550>
___
___
Py
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
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12622
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue14841>
___
___
Py
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
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12572
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36494>
___
___
Py
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://
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/is
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
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
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12431
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36388>
___
___
Py
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.
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
Change by daniel hahler :
--
keywords: +patch
pull_requests: +12347
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36335>
___
___
Py
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
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
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
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
1 - 100 of 123 matches
Mail list logo