Skip to content

Tracking issue of os.utime regression #4053

Closed

Description

@youknowone

std::time::Duration::from_secs_f64 behavior is changed in Rust 1.63.

related python test:

  • test_os::test_utime_by_indexed
  • test_os::test_utime_by_times

test command:

  • cargo +stable run Lib/test/test_os.py -k utime -v
  • cargo +1.62.1 run Lib/test/test_os.py -k utime -v

Rust issue including minimal reproducible code

To-do

We will stay on 1.62.1 until checking if it is a rust bug or intended change.

Once it is resolved:

Activity

  1. youknowone commented on Aug 13, 2022

    @youknowone
    MemberAuthor

    In CPython, _PyTime_DoubleToDenominator provides rounding option. floor option is passed for this path.

  2. youknowone commented on Aug 17, 2022

    @youknowone
    MemberAuthor

    It was an intended behavior change from Rust. we need to implement rounding option like cpython.

  3. youknowone commented on Dec 25, 2025

    @youknowone
    MemberAuthor

    The test is changed not to check nanosecond drift #6501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

C-bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions