Author bar.harel
Recipients bar.harel, docs@python, giampaolo.rodola, josh.r, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2020-06-19.17:12:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I've just encountered this bug as well.

Although this issue is old, #1 should be fixed whether we like it or not. Cancelling an unintended event instead of the one we wanted is a bug, and prevents me from using the library at all (I schedule events based on absolute time).

To be honest, I do not believe anyone uses scheduler.cancel(Event(time, priority, ...)) in order to cancel an event based on the given time and priority.

Even if they do so, Event itself is undocumented and is being treated mostly as an ID for a currently scheduled event.

A good solution would be to add a DeprecationWarning to the ordering functions, so people won't use them, and remove __eq__ at 3.12.

The only issue that will arise is that an event1 might be >= than event2, <= than event 2, and != to event 2, as the other ordering will stay. We can fix this by implementing a slower lookup but I believe it isn't a real issue.
Date User Action Args
2020-06-19 17:12:08bar.harelsetrecipients: + bar.harel, rhettinger, pitrou, vstinner, giampaolo.rodola, docs@python, serhiy.storchaka, josh.r
2020-06-19 17:12:08bar.harelsetmessageid: <>
2020-06-19 17:12:08bar.harellinkissue19270 messages
2020-06-19 17:12:08bar.harelcreate