Skip to content

Deprecation of abstract/protocol methods #3898

@balopat

Description

@balopat

We need a better way to deprecate abstract methods.

Context (#3860):

@balopat This ends up being a breaking change though for any simulator that was overriding _simulator_iterator. This is why I had left the call to _simulator_iterator there in the original PR #3650. Otherwise I'd have just inlined and deleted _simulator_iterator outright: it's a private method and it's unused elsewhere.

It doesn't sound like anyone has been broken by this, so maybe it's okay. (We can just delete _simulator_iterator in that case; it's not called by anyone). I think there's still an unmet need for cleanly deprecate abstract methods, or methods that were intended to be overridden. The base class has to continue calling them until the deadline or it will break child classes. I like the error-by-default, but maybe there's a way to silence these errors when retaining the call to a deprecated method is required, like here.

Originally posted by @daxfohl in #3860 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/interoparea/protocolskind/healthFor CI/testing/release process/refactoring/technical debt itemsstatus/needs-agreed-designWe want to do this, but it needs an agreed upon design before implementationtriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions