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

Fix test_executor failing tests when using python 3.14 #990

Closed
wants to merge 1 commit into from

Conversation

majamassarini
Copy link

Fedora is introducing python 3.14 and some tests are failing: https://bugzilla.redhat.com/show_bug.cgi?id=2325181

Should fix https://bugzilla.redhat.com/show_bug.cgi?id=2325181

Changes

As far as I can understand it, this are the issues:

  • The ProcessPoolExecutor is reusing the same worker to execute different tasks and for this reason the comparison between the tasks id is failing.
  • Some tests end before their task completion.
  • I have to adjust the misfire_grace_time to make some tasks execute (don't know why this wasn't needed before).

@agronholm
Copy link
Owner

I've pushed a ton of updates to the 3.x branch. Would you mind merging them to this branch?

@agronholm
Copy link
Owner

The root cause seems to have been that in 3.14, ProcessPoolExecutor uses the spawn method instead of fork, so the time freeze fixture could not affect the subprocess. I've adjusted the tests accordingly in the updated code, in addition to forcing the use of spawn instead of fork in the executor.

@agronholm
Copy link
Owner

I just ran the tests on 3.14.0a1 and the executor tests all passed after today's code changes, so doesn't look like this PR is necessary. I'm going to close it, but let me know if you find otherwise.

@agronholm agronholm closed this Nov 19, 2024
@majamassarini
Copy link
Author

Could you release a new apscheduler 3.10.5 (or whatever version you think is right) so I can package it downstream with your fixes?

Thank you.

@agronholm
Copy link
Owner

I'll make a release soon. I just have a few more changes to add to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants