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

chore: test with Python 3.12 #2270

Merged
merged 5 commits into from
Jul 31, 2023
Merged

Conversation

mayeut
Copy link
Contributor

@mayeut mayeut commented Jun 25, 2023

Summary

Description

Update cibuildwheel
Test with Python 3.12
Fix comparison of sum of floats
Remove usage of PyArg_ParseTuple "u" on Python 3

@mayeut
Copy link
Contributor Author

mayeut commented Jun 25, 2023

@giampaolo, the "bsd-tests / openbsd" failure seems unrelated to the modifications in this PR.

@mayeut mayeut marked this pull request as ready for review June 25, 2023 14:00
@mayeut
Copy link
Contributor Author

mayeut commented Jul 30, 2023

@giampaolo,
tests failures in CI are unrelated to the changes in this PR & seems to be transient failures (https://github.com/mayeut/psutil/actions runs are green).

Getting Python 3.12 working is more & more important with rc1 just around the corner.
Please do tell if I can help in any other way.

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
There can be some small rounding errors due to float precision and how the sum gets computed.
Use assertAlmostEqual with default parameters (allows for 1e-7 absolute error).

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
From https://docs.python.org/3/c-api/arg.html

Deprecated since version 3.3, will be removed in version 3.12: Part of the old-style Py_UNICODE API; please migrate to using PyUnicode_AsWideCharString().

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
The test was relying on a context switch to happen given a number of iterations of a specific code.
The test began to fail on python 3.12 on macOS.
Use time.sleep to force a context switch.

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
@giampaolo giampaolo merged commit fc85c02 into giampaolo:master Jul 31, 2023
15 checks passed
@giampaolo
Copy link
Owner

Thank you Matthieu.

ddelange added a commit to ddelange/psutil that referenced this pull request Jul 31, 2023
* 'master' of https://github.com/giampaolo/psutil:
  fix var unbound (giampaolo#2245)
  Fix a dead link in the documentation (giampaolo#2280)
  chore: test with Python 3.12 (giampaolo#2270)
  chore(ci): fix linters job warning (giampaolo#2269)
  make flake8 happy
  add a fix-unittests make target to fix unit tests
@mayeut mayeut deleted the update-cibuildwheel branch July 31, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants