bpo-44554: refactor pdb targets (and internal tweaks) (GH-26992)

- Refactor module/script handling to share an interface (check method).
- Import functools and adjust tests for the new line number for find_function.
- Use cached_property for details.
- Add blurb.

Automerge-Triggered-By: GH:jaraco
This commit is contained in:
Jason R. Coombs 2021-07-18 21:00:35 -04:00 committed by GitHub
parent 35b98e38b6
commit 2c20558844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 111 additions and 66 deletions

View file

@ -222,7 +222,11 @@ class PyclbrTest(TestCase):
cm('pickle', ignore=('partial', 'PickleBuffer'))
cm('aifc', ignore=('_aifc_params',)) # set with = in module
cm('sre_parse', ignore=('dump', 'groups', 'pos')) # from sre_constants import *; property
cm('pdb')
cm(
'pdb',
# pyclbr does not handle elegantly `typing` or properties
ignore=('Union', 'ModuleTarget', 'ScriptTarget'),
)
cm('pydoc', ignore=('input', 'output',)) # properties
# Tests for modules inside packages