Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of dirs to ignore in trace.py is applied only for the first file #50915

Closed
bogdanopanchuk mannequin opened this issue Aug 7, 2009 · 3 comments
Closed

List of dirs to ignore in trace.py is applied only for the first file #50915

bogdanopanchuk mannequin opened this issue Aug 7, 2009 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@bogdanopanchuk
Copy link
Mannequin

bogdanopanchuk mannequin commented Aug 7, 2009

BPO 6666
Nosy @akuchling
Files
  • trace.diff: patch for trace.py
  • 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:

    assignee = None
    closed_at = <Date 2010-02-22.22:21:49.837>
    created_at = <Date 2009-08-07.09:50:13.420>
    labels = ['type-bug', 'library']
    title = 'List of dirs to ignore in trace.py is applied only for the first file'
    updated_at = <Date 2010-02-22.22:21:49.836>
    user = 'https://bugs.python.org/bogdanopanchuk'

    bugs.python.org fields:

    activity = <Date 2010-02-22.22:21:49.836>
    actor = 'akuchling'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-02-22.22:21:49.837>
    closer = 'akuchling'
    components = ['Library (Lib)']
    creation = <Date 2009-08-07.09:50:13.420>
    creator = 'bogdan.opanchuk'
    dependencies = []
    files = ['14672']
    hgrepos = []
    issue_num = 6666
    keywords = ['patch']
    message_count = 3.0
    messages = ['91399', '91544', '99857']
    nosy_count = 3.0
    nosy_names = ['akuchling', 'ggenellina', 'bogdan.opanchuk']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6666'
    versions = ['Python 3.1', 'Python 3.2']

    @bogdanopanchuk
    Copy link
    Mannequin Author

    bogdanopanchuk mannequin commented Aug 7, 2009

    When creating a trace.Trace object or running trace.py one can specify
    list of directories to ignore (ignoredirs or --ignore-dir
    correspondingly). It is passed to trace.Ignore constructor, which stores
    iterator to map(), applied to this list, in self._dirs. So, when
    Ignore.names() execution passes to the block "for d in self._dirs:" for
    the first time, iterator saves its state (in the end of the list) and
    next times the code in this block is completely ignored. The result is
    that 'ignoredirs' parameter does not actually work (except for the one
    lucky file).

    Proposed patch is attached.

    @bogdanopanchuk bogdanopanchuk mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 7, 2009
    @ggenellina
    Copy link
    Mannequin

    ggenellina mannequin commented Aug 14, 2009

    That's exactly the change 2to3 would suggest for that line. The guy
    doing the conversion must have missed it.

    @akuchling
    Copy link
    Member

    Applied to 3.2 trunk in rev78340, and backported to 31-maint in rev78341. Thanks for your patch!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant