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

2020-02-23 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-23 Thread miss-islington


miss-islington  added the comment:


New changeset c97fc564a6c76ba5287f1b16bc841a1765820b0c by Miss Islington (bot) 
in branch '3.8':
bpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry 
(GH-18531)
https://github.com/python/cpython/commit/c97fc564a6c76ba5287f1b16bc841a1765820b0c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-23 Thread miss-islington


miss-islington  added the comment:


New changeset 097612a3f711f5a6a3aec207cad78a35eb3a756d by Miss Islington (bot) 
in branch '3.7':
bpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry 
(GH-18531)
https://github.com/python/cpython/commit/097612a3f711f5a6a3aec207cad78a35eb3a756d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18002
pull_request: https://github.com/python/cpython/pull/18636

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-23 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +18001
pull_request: https://github.com/python/cpython/pull/18635

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 4015d1cda3cdba869103779eb6ff32ad798ff885 by Daniel Hahler in 
branch 'master':
bpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry 
(GH-18531)
https://github.com/python/cpython/commit/4015d1cda3cdba869103779eb6ff32ad798ff885


--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

That seems to be a correct observation. @blueyed, do you want to submit a PR to 
gt rid of the redundant check?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-02-16 Thread SilentGhost


Change by SilentGhost :


--
nosy: +gvanrossum
versions:  -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to be wrong/unnecessary since the following likely, but
maybe also others:

commit 75bb54c3d8
Author: Guido van Rossum 
Date:   Mon Sep 28 15:33:38 1998 +

Don't set a local variable named __args__; this feature no longer
works and Greg Ward just reported a problem it caused...

diff --git a/Lib/bdb.py b/Lib/bdb.py
index 3ca25adbbf..f2cf4caa36 100644
--- a/Lib/bdb.py
+++ b/Lib/bdb.py
@@ -46,7 +46,7 @@ def dispatch_line(self, frame):
return self.trace_dispatch

def dispatch_call(self, frame, arg):
-   frame.f_locals['__args__'] = arg
+   # XXX 'arg' is no longer used
if self.botframe is None:
# First call of dispatch since reset()
self.botframe = frame

Code ref: 
https://github.com/python/cpython/blob/1ed61617a4a6632905ad6a0b440cd2cafb8b6414/Lib/bdb.py#L551-L558.

So it should either get removed, or likely be replaced with actually displaying
the args.

For this the part could be factored out of `do_args` maybe, adjusting it for
handling non-current frames.

Of course somebody might inject/set `__args__` still (I've thought about doing 
that initially for pdb++, but will rather re-implement/override 
`format_stack_entry` instead), so support for this could be kept additionally.

--
components: Library (Lib)
messages: 362070
nosy: blueyed
priority: normal
severity: normal
status: open
title: bdb.Bdb.format_stack_entry: checks for obsolete __args__
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com