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

os.utime doesn't allow a atime (Last Access) which is 27 years in the future. #52525

Closed
ramson mannequin opened this issue Apr 1, 2010 · 9 comments
Closed

os.utime doesn't allow a atime (Last Access) which is 27 years in the future. #52525

ramson mannequin opened this issue Apr 1, 2010 · 9 comments
Assignees
Labels

Comments

@ramson
Copy link
Mannequin

ramson mannequin commented Apr 1, 2010

BPO 8278
Nosy @loewis, @amauryfa, @ericvsmith, @sandrotosi
Files
  • utime_test.py: code to reproduce this behaviour
  • timet_64.patch
  • timet_64-2.patch
  • 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 = 'https://github.com/amauryfa'
    closed_at = <Date 2011-01-03.00:52:06.832>
    created_at = <Date 2010-04-01.07:46:04.624>
    labels = ['expert-IO']
    title = "os.utime doesn't allow a atime (Last Access) which is 27 years in the future."
    updated_at = <Date 2011-01-03.00:52:06.831>
    user = 'https://bugs.python.org/ramson'

    bugs.python.org fields:

    activity = <Date 2011-01-03.00:52:06.831>
    actor = 'amaury.forgeotdarc'
    assignee = 'amaury.forgeotdarc'
    closed = True
    closed_date = <Date 2011-01-03.00:52:06.832>
    closer = 'amaury.forgeotdarc'
    components = ['IO']
    creation = <Date 2010-04-01.07:46:04.624>
    creator = 'ramson'
    dependencies = []
    files = ['16717', '16725', '20237']
    hgrepos = []
    issue_num = 8278
    keywords = ['patch']
    message_count = 9.0
    messages = ['102069', '102109', '102139', '125010', '125115', '125127', '125129', '125143', '125146']
    nosy_count = 5.0
    nosy_names = ['loewis', 'amaury.forgeotdarc', 'eric.smith', 'sandro.tosi', 'ramson']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue8278'
    versions = ['Python 2.6']

    @ramson
    Copy link
    Mannequin Author

    ramson mannequin commented Apr 1, 2010

    Error Message is:
    OverflowError: long int too large to convert to int
    ---
    Python Version:
    Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32
    ---
    Sample Code attached.

    @ramson ramson mannequin added the topic-IO label Apr 1, 2010
    @amauryfa
    Copy link
    Member

    amauryfa commented Apr 1, 2010

    On Windows, time_t is 64bit, but various functions convert it to a 32bit long.
    Attached patch uses time_t instead of long in various places, this fixes the proposed test.

    Martin, do you think it's a viable approach? If so, I'll go and add some tests for the modified functions.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 1, 2010

    The patch looks fine to me, please apply.

    @amauryfa amauryfa self-assigned this Apr 2, 2010
    @sandrotosi
    Copy link
    Contributor

    Hi Amaury, Martin ack'ed the patch: is there something else you want to do?

    @amauryfa
    Copy link
    Member

    amauryfa commented Jan 2, 2011

    Here is a renewed patch against py3k, with a test.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jan 2, 2011

    The patch looks still fine. The only concern is that the test probably fails on FAT, but I think that's acceptable.

    @amauryfa
    Copy link
    Member

    amauryfa commented Jan 2, 2011

    The only concern is that the test probably fails on FAT
    The patch does not show it, but I've put the test under a
    'if get_file_system(support.TESTFN) == "NTFS"'

    @amauryfa
    Copy link
    Member

    amauryfa commented Jan 3, 2011

    Committed r87666 (py3k), I'll backport to 3.1 and 2.7.

    @amauryfa
    Copy link
    Member

    amauryfa commented Jan 3, 2011

    Merged into release31-maint (r87668) and release27-maint (r87669)

    @amauryfa amauryfa closed this as completed Jan 3, 2011
    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants