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

Memory leak in the replace() method of datetime and time objects #74139

Closed
serhiy-storchaka opened this issue Mar 31, 2017 · 3 comments
Closed
Labels
3.7 (EOL) end of life extension-modules C modules in the Modules dir performance Performance or resource usage

Comments

@serhiy-storchaka
Copy link
Member

BPO 29953
Nosy @abalkin, @serhiy-storchaka
PRs
  • bpo-29953: Fix memory leaks in the replace() method of datetime and time #927
  • bpo-29953: Fix memory leaks in the replace() method of datetime and t… #933
  • 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-03-31.20:24:49.074>
    created_at = <Date 2017-03-31.13:44:25.573>
    labels = ['extension-modules', '3.7', 'performance']
    title = 'Memory leak in the replace() method of datetime and time objects'
    updated_at = <Date 2017-03-31.20:24:49.074>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-03-31.20:24:49.074>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-03-31.20:24:49.074>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2017-03-31.13:44:25.573>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29953
    keywords = []
    message_count = 3.0
    messages = ['290913', '290936', '290938']
    nosy_count = 2.0
    nosy_names = ['belopolsky', 'serhiy.storchaka']
    pr_nums = ['927', '933']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue29953'
    versions = ['Python 3.6', 'Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    When pass out of bound keyword argument fold to datetime.datetime.replace() or datetime.time.replace(), ValueError is raised and just allocated object is leaked. Proposed patch fixes the leaks.

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life extension-modules C modules in the Modules dir performance Performance or resource usage labels Mar 31, 2017
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 314d6fc by Serhiy Storchaka in branch 'master':
    bpo-29953: Fix memory leaks in the replace() method of datetime and time (#927)
    314d6fc

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 7d5d13d by Serhiy Storchaka in branch '3.6':
    bpo-29953: Fix memory leaks in the replace() method of datetime and t… (#933)
    7d5d13d

    @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 extension-modules C modules in the Modules dir performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant