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

Sort only when needed in TimedRotatingFileHandler's getFilesToDelete #75172

Closed
lovesh mannequin opened this issue Jul 22, 2017 · 3 comments
Closed

Sort only when needed in TimedRotatingFileHandler's getFilesToDelete #75172

lovesh mannequin opened this issue Jul 22, 2017 · 3 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@lovesh
Copy link
Mannequin

lovesh mannequin commented Jul 22, 2017

BPO 30989
Nosy @vsajip, @lovesh
PRs
  • bpo-30989: Sort in TimedRotatingFileHandler only when needed. #2812
  • [3.6] bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812) #4466
  • 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 2017-11-19.22:28:03.729>
    created_at = <Date 2017-07-22.07:17:22.771>
    labels = ['3.7', 'type-feature', 'library']
    title = "Sort only when needed in TimedRotatingFileHandler's getFilesToDelete"
    updated_at = <Date 2017-11-19.22:28:03.728>
    user = 'https://github.com/lovesh'

    bugs.python.org fields:

    activity = <Date 2017-11-19.22:28:03.728>
    actor = 'vinay.sajip'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-19.22:28:03.729>
    closer = 'vinay.sajip'
    components = ['Library (Lib)']
    creation = <Date 2017-07-22.07:17:22.771>
    creator = 'Lovesh Harchandani'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30989
    keywords = ['patch']
    message_count = 3.0
    messages = ['298839', '305104', '306508']
    nosy_count = 2.0
    nosy_names = ['vinay.sajip', 'Lovesh Harchandani']
    pr_nums = ['2812', '4466']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue30989'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @lovesh
    Copy link
    Mannequin Author

    lovesh mannequin commented Jul 22, 2017

    At /Lib/logging/handlers.py in TimedRotatingFileHandler's getFilesToDelete method, filenames are sorted using result.sort() regardless of len(result), if len(result) < backupCount, sorting is not required.

    @lovesh lovesh mannequin added 3.7 (EOL) end of life type-feature A feature request or enhancement stdlib Python modules in the Lib dir labels Jul 22, 2017
    @vsajip
    Copy link
    Member

    vsajip commented Oct 27, 2017

    New changeset afad147 by Vinay Sajip (Lovesh Harchandani) in branch 'master':
    bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812)
    afad147

    @vsajip
    Copy link
    Member

    vsajip commented Nov 19, 2017

    New changeset 65dffe5 by Vinay Sajip (Miss Islington (bot)) in branch '3.6':
    bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812) (GH-4466)
    65dffe5

    @vsajip vsajip closed this as completed Nov 19, 2017
    @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
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant