• 
      

    Fix a regression with the new log_timed backport on Python < 3.11.

    Review Request #14944 — Created March 18, 2026 and submitted

    Information

    ReviewBot
    release-4.x

    Reviewers

    The new log_timed() backport that was just committed included an
    import that was only valid on Python 3.11+: datetime.UTC. This was
    fixed in Djblets recently, but that fix didn't make it into the
    backport.

    This change updates the code to use datetime.timezone.utc instead.

    Unit tests pass on all versions of Python.

    Summary ID
    Fix a regression with the new log_timed backport on Python < 3.11.
    The new `log_timed()` backport that was just committed included an import that was only valid on Python 3.11+: `datetime.UTC`. This was fixed in Djblets recently, but that fix didn't make it into the backport. This change updates the code to use `datetime.timezone.utc` instead.
    f63b6704ad05f576d99f3bd1d5fcb2bb28dc77a2
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.x (3151a48)