Skip to content

Replace legacy UTC aliases and enable Ruff UP017 #323

Closed

Description

@andystaples

Summary

Replace existing datetime.timezone.utc usage with datetime.UTC (or UTC imports following each file's import style), then remove the temporary Ruff UP017 exclusion.

The initial modernization inventory contains 126 findings across core, Azure Managed, Functions, tests, and examples. datetime.UTC is available in Python 3.11, so this cleanup does not require raising any package's minimum Python version or introducing version-dependent fallbacks.

Completion criteria

  • Update hand-written code without changing timestamp values, timezone awareness, serialization, or replay-visible behavior.
  • Keep generated protobuf files excluded.
  • Remove the Ruff UP017 exclusion once the repository-wide check passes.

Until that exclusion is removed, Ruff does not prevent new occurrences of this pattern.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions