Skip to content

v3.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Jun 04:22

Added

  • Add an __all__ to the prawcore package to explicitly define its public API.
  • Add a py.typed marker (:PEP:561) so that downstream projects can type check
    against prawcore's inline annotations.
  • Add read-only :attr:.Session.authorizer, :attr:.Session.rate_limiter, and
    :attr:.Session.requestor properties, a :attr:.BaseAuthorizer.authenticator
    property, and a :attr:.BaseAuthenticator.requestor property, so that downstream code
    can reach these objects without accessing protected attributes.

Changed

  • Widen the authorizer parameter of :func:.session to BaseAuthorizer to match
    :class:.Session, so that passing an :class:.ImplicitAuthorizer or
    :class:.DeviceIDAuthorizer type checks.
  • Widen the data, files, json, and params parameter annotations of
    :meth:.Session.request to reflect the values it already accepts at runtime (for
    example a non-dict data body, a list json payload, and any IO file
    object), so that callers no longer need to cast these arguments.