-
Notifications
You must be signed in to change notification settings - Fork 569
Fix Python3 bug with Timers and heaps #466
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
Conversation
Add comparison operator to allow Timers with the same end time to be pushed into heaps. It's poorly documented, but the warning can be found here: https://docs.python.org/2/library/heapq.html#priority-queue-implementation-notes "In the future with Python 3, tuple comparison breaks for (priority, task) pairs if the priorities are equal and the tasks do not have a default comparison order."
|
Hi @jonmcevoy, thanks for your contribution! In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. Sincerely, |
|
Good catch. Thanks for the fix. |
|
(ping for CLA) |
|
I've contacted cla@datastax.com with some follow-up requests. It shouldn't take long to clear up. The issue being this is work of Trion Worlds, Inc (my employer) so they need to review the agreement. |
|
I was about to submit a pull request for the same fix, then I discovered this pending pull request. Glad to see this being addressed. |
|
@jonmcevoy Any news from the cla? |
|
Thank you @jonmcevoy for signing the Contribution License Agreement. Cheers, |
|
We're all good now. Sorry for the delay. |
|
Thanks! |
Fix Python3 bug with Timers and heaps
|
Any chance we could get this backported to the 3.1 branch? |
|
Yes! We were just talking about that internally. I'll get it there today. |
|
@aholmberg Thanks! Much appreciated. |
Add comparison operator to allow Timers with the same end time to be
pushed into heaps. It's poorly documented, but the warning can be found
here:
https://docs.python.org/2/library/heapq.html#priority-queue-implementation-notes
"In the future with Python 3, tuple comparison breaks for (priority,
task) pairs if the priorities are equal and the tasks do not have a
default comparison order."