Changelogs » Gidgethub

PyUp Safety actively tracks 232,000 Python packages for vulnerabilities and notifies you when to upgrade.



  - Fix func:`abc.GitHubAPI.graphql` to accept response content types lacking
  spaces; affects GitHub Enterprise
  (`Issue 122 <>`_)
  - Specify PyJWT[crypto] as a dependency, and dropped the explicit dependency to
  ``cryptography`` (`Issue 116 <>`_).


  - Introduce :mod:`gidgethub.apps`.
  - Introduce :meth:`gidgethub.apps.get_installation_access_token`
  for obtaining an installation access token that can be used to authenticate as
  a GitHub App installation. (`Issue 71 <>`_).
  - Introduce :meth:`gidgethub.apps.get_jwt` for constructing the JSON Web Token
  that can be used to access endpoints that require it.


  - Add :meth:`` and related exceptions.
  - Add :exc:`gidgethub.BadRequestUnknownError` when something other than JSON is
  returned for a 422 response.
  - Remove `gidgethub.treq`; tests were not passing and a request for help on
  Twitter came back with no response (happy to add back if someone steps forward
  to help out).
  - Remove `gidgethub.test` from the distribution.
  - Introduce :mod:`gidgethub.actions`.
  - Add :exc:`gidgethub.ValidationError` for when the HTTP response is a 422 but not
  field-related. (`83 <>`_;
  thanks `John Hossler <>`_)
  - Allow GitHub Enterprise users to specify a base URL, by passing in **base_url**
  to the :meth:`` constructor.


  - Adapt to the new ``httpx`` API to support
  `versions >= 0.11.0 <>`_
  (thanks `Dave Hirschfeld <>`_)


  - Fix mypy warnings about the :class:`typing.Dict` and :class:`typing.Mapping`
  generic types lacking type parameters.
  - Add :mod:`gidgethub.httpx` backend.
  - Add a ``py.typed`` file to mark the project as fully typed.


  - :meth:`` now works with
  `GitHub's search API <>`_
  (thanks `Pablo Galindo <>`_).


  - :meth:`gidgethub.sansio.RateLimit.from_http` returns ``None`` if ratelimit is
  not found in the headers.
  - Allow authenticating as a GitHub App by using JSON web token.
  :func:`gidgethub.sansio.create_headers` now accepts
  ``jwt`` argument. ````,
  :meth:``, :meth:``,
  :meth:``, :meth:``,
  :meth:``, and :meth:`` now
  accept ``jwt`` and ``oauth_token`` arguments.
  - gidgethub is now packaged using `flit <>`_.


  - Tighten type hints for parameters that have a default of ``None``
  but were not typed as :data:`typing.Optional`.
  - Tweak code to not change semantics but reach 100% coverage.
  - Provide a human-readable string representation of
  - Use the ``message`` data as the error message
  if the ``errors`` object was not returned.
  - Add the *data* keyword argument to :meth:``.


  - Tighten up protections against caching ineligible responses.


  - Expand :meth:`gidgethub.routing.Router.dispatch`.


  - Add support for ``application/x-www-form-urlencoded`` webhook event payloads.
  (This also allows for API calls to return this content type, although GitHub
  currently does not do that.)
  - Introduce :mod:`gidgethub.routing` to help route webhook events to registered
  asynchronous callbacks.
  - Add type hints.
  - Add a *cache* argument to :class:``.


  - Introduce :mod:`gidgethub.tornado` to support
  `Tornado <>`_ (thanks to
  Matthias Bussonnier and A. Jesse Jiryu Davis for the PR reviews).


  - The default value for the *data* argument of :meth:``
  was changed from ``""`` to ``b""``.
  - All type hints were removed (due to mypy not supporting yield in an async
  function, they were not being tested as being valid).


  - Renamed ```` to
  :meth:`` to make the method public.
  - Renamed the "test" extra to "tests" and added the "dev" extra.
  - Introduced the :exc:`gidgethub.RateLimitExceeded` exception.
  - Methods on :class:`` no longer automatically sleep when it's
  possible that the call will exceed the user's rate limit (it's now up to the
  user to prevent from going over the rate limit).
  - Made the ``[treq]`` install extra depend on ``Twisted[tls]``.


  - :meth:`gidgethub.sansio.Event.from_http` raises a :exc:`gidgethub.BadRequest` of ``415``
  instead of ``400`` when a content-type other than ``application/json``
  is provided.
  - More robustly decode the body in :meth:`gidgethub.sansio.Event.from_http`
  (i.e. if the ``content-type`` doesn't specify ``charset``, assume ``UTF-8``).
  - Changed the signature of :class:`gidgethub.sansio.Event` to accept
  :data:`typing.Any` for the *data* argument.
  - Fixed signature verification.


  - Introduced ``gidgethub.treq`` (thanks to Cory Benfield).


  Initial release.