Skip to content

Deprecation for private and semi-private callables #38211

Open
@kryzar

Description

Problem Description

The Developer Guide, Section Deprecation does not specify if the deprecation process applies to semi-private (name starts with exactly one underscore) or private (name starts with exactly two underscores) callables (functions, methods, attributes, classes, etc).

Proposed Solution

I think the following two options are both valid:

  • Semi-private or private methods are for devs and are not part of the interface; users should not use them, which is a Python-wide convention, and the devs should not have to worry about keeping compatibility for semi-private and private callables.

  • However, it seems the developer guide deprecation process applies to those as well, and not all users are aware of the _ and __ convention.

Both options are fine to me and I believe this is a minor issue. However, I think the community should pick a single approach and make it somewhat official but explicitly putting it in the developer guide.

Alternatives Considered

See above.

Additional Information

No response

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions