Skip to content

Conversation

@jonmcevoy
Copy link

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."

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."
@datastax-bot
Copy link

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,
DataStax Bot.

@aholmberg
Copy link
Contributor

Good catch. Thanks for the fix.

@aholmberg
Copy link
Contributor

(ping for CLA)

@jonmcevoy
Copy link
Author

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.

@kohei-cbd
Copy link

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.

@aboudreault
Copy link
Contributor

@jonmcevoy Any news from the cla?

@datastax-bot
Copy link

Thank you @jonmcevoy for signing the Contribution License Agreement.

Cheers,
DataStax Bot.

@jonmcevoy
Copy link
Author

We're all good now. Sorry for the delay.

@aboudreault
Copy link
Contributor

Thanks!

aboudreault added a commit that referenced this pull request Feb 22, 2016
Fix Python3 bug with Timers and heaps
@aboudreault aboudreault merged commit 6777b98 into apache:master Feb 22, 2016
@kohei-cbd
Copy link

Any chance we could get this backported to the 3.1 branch?

@aholmberg
Copy link
Contributor

Yes! We were just talking about that internally. I'll get it there today.

@kohei-cbd
Copy link

@aholmberg Thanks! Much appreciated.

aholmberg added a commit that referenced this pull request Feb 22, 2016
aholmberg added a commit that referenced this pull request Feb 22, 2016
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.

5 participants