Skip to content

Expose most of trio._util and trio._deprecate for the benefit of the Trio ecosystem #1504

@oremanj

Description

@oremanj

Trio has great tools for dealing with some of the minutiae of making a polished Python package in general, but they're private; libraries that depend on Trio need to copy-paste or reimplement these tools if they want to offer equivalent functionality. If they reimplement, they probably won't do as good of a job.

I think we should add a new public Trio submodule (trio.libtools?) which provides:

  • From trio._util: Final, NoPublicConstructor, generic_function, fixup_module_metadata, async_wraps, ConflictDetector
  • A factory for creating modules like trio._deprecate, substituting a project's own deprecation warning, issue URL, and name.

Metadata

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