This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 bar.harel
收信人 bar.harel, docs@python, giampaolo.rodola, josh.r, pitrou, rhettinger, serhiy.storchaka, vstinner
日期 2020-06-19.17:12:08
SpamBayes Score -1.0
Marked as misclassified
Message-id <1592586728.23.0.558308559501.issue19270@roundup.psfhosted.org>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2020-06-19 17:12:08bar.harel修改recipients: + bar.harel, rhettinger, pitrou, vstinner, giampaolo.rodola, docs@python, serhiy.storchaka, josh.r
2020-06-19 17:12:08bar.harel修改messageid: <1592586728.23.0.558308559501.issue19270@roundup.psfhosted.org>
2020-06-19 17:12:08bar.harel链接issue19270 messages
2020-06-19 17:12:08bar.harel创建