Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix💥: Plugin-friendly method of implementing delete_if_overridden #707

Merged
merged 1 commit into from
Oct 30, 2022

Conversation

silasary
Copy link
Collaborator

@silasary silasary commented Oct 29, 2022

What type of pull request is this?

  • Non-breaking code change
  • Breaking code change
  • Documentation change/addition
  • Tests change

Description

(Breaking for 2.x, not breaking compared to dev)

The existing method for unregistering library-provided Listeners introduced in #641 didn't really work well with off-the-shelf extensions, such as Sentry or NaffTrack.

This PR replaces delete_if_overridden with two separate parameters:

  • is_default_listener for declaring library-defined listeners
  • override_default_listeners for explicitly wanting to opt-out of the default listener.

Checklist

  • I've formatted my code with Black
  • I've ensured my code works on Python 3.10.x
  • I've tested my code

@silasary silasary changed the title fix: Plugin-friendly method of implementing delete_if_overridden fix💥: Plugin-friendly method of implementing delete_if_overridden Oct 29, 2022
@LordOfPolls LordOfPolls merged commit cff89a1 into 2.x Oct 30, 2022
@LordOfPolls LordOfPolls deleted the default-listeners-redux branch October 30, 2022 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants