Skip to content

Conversation

@emmanuel-ferdman
Copy link
Contributor

Description

This small PR resolves the deprecation warnings on datetime in Python3.12+. You can find them in the CI logs:

  /home/runner/work/opentelemetry-python-contrib/opentelemetry-python-contrib/exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/__init__.py:71: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    ts = datetime.datetime.utcfromtimestamp(nanoseconds / 1e9)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

run tests

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@emmanuel-ferdman emmanuel-ferdman requested a review from a team as a code owner April 18, 2025 15:59
@xrmx xrmx moved this to Easy to review / merge / close in @xrmx's Python PR digest Apr 28, 2025
@xrmx
Copy link
Contributor

xrmx commented Apr 28, 2025

@emmanuel-ferdman Please setup ruff locally and fix formatting :)

@xrmx xrmx added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Apr 30, 2025
@xrmx xrmx enabled auto-merge (squash) April 30, 2025 13:59
@xrmx xrmx merged commit dec311f into open-telemetry:main Apr 30, 2025
720 checks passed
@github-project-automation github-project-automation bot moved this from Easy to review / merge / close to Done in @xrmx's Python PR digest Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants