python / cpython

The Python programming language
https://www.python.org
Other
63.12k stars 30.22k forks source link

Factor out / add bdb.Bdb.is_skipped_frame #80516

Open 1f7c169c-a6ad-45ae-b614-0d40d962c776 opened 5 years ago

1f7c169c-a6ad-45ae-b614-0d40d962c776 commented 5 years ago
BPO 36335
Nosy @blueyed
PRs
  • python/cpython#12392
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = None created_at = labels = ['3.8', 'type-feature', 'library'] title = 'Factor out / add bdb.Bdb.is_skipped_frame' updated_at = user = 'https://github.com/blueyed' ``` bugs.python.org fields: ```python activity = actor = 'blueyed' assignee = 'none' closed = False closed_date = None closer = None components = ['Library (Lib)'] creation = creator = 'blueyed' dependencies = [] files = [] hgrepos = [] issue_num = 36335 keywords = ['patch'] message_count = 1.0 messages = ['338159'] nosy_count = 1.0 nosy_names = ['blueyed'] pr_nums = ['12392'] priority = 'normal' resolution = None stage = 'patch review' status = 'open' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue36335' versions = ['Python 3.8'] ```

    1f7c169c-a6ad-45ae-b614-0d40d962c776 commented 5 years ago

    In https://bugs.python.org/issue36130 is_skippedmodule 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 implementation would call is_skipped_module if there are any skip patterns, and return False otherwise.