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

test warning with python3.12 #410

Closed
asarubbo opened this issue Apr 2, 2024 · 1 comment · Fixed by #412
Closed

test warning with python3.12 #410

asarubbo opened this issue Apr 2, 2024 · 1 comment · Fixed by #412
Assignees
Labels

Comments

@asarubbo
Copy link

asarubbo commented Apr 2, 2024

By packaging 3.5.0 on Gentoo Linux I see the following warning that come from test with python-3.12:

=============================== warnings summary ===============================
pgactivity/utils.py::pgactivity.utils.csv_write
  /var/tmp/portage/dev-db/pg_activity-3.5.0/work/pg_activity-3.5.0/pgactivity/utils.py:283: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    dt = datetime.utcnow().strftime("%Y-%m-%dT%H:%m:%SZ")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
@dlax
Copy link
Member

dlax commented Apr 2, 2024

Indeed, the warnings also show up in our CI: https://github.com/dalibo/pg_activity/actions/runs/8112276447/job/22173151102#step:6:109; we should turn them into errors.

Thanks for the report.

@dlax dlax self-assigned this Apr 2, 2024
@dlax dlax added the bug label Apr 3, 2024
@dlax dlax closed this as completed in #412 Apr 3, 2024
@dlax dlax mentioned this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants