gidgethub / gidgethub

An async GitHub API library for Python

Home Page:https://gidgethub.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

release a new version that support jwt.encode returning str (PyJWT 2.0.0)

shikloshi opened this issue · comments

gidgethub 4.2.0 tries to "encode" str type returned from new PyJWT version
currently get_jwt in apps.py tries to:

    encoded = jwt.encode(payload, private_key, algorithm="RS256") <-- now really returns a string
    bearer_token = encoded.decode("utf-8")

and the new returned type for jwt.encode is str and not bytes as it used to be, although this is already fixed on master it's not been released yet making 4.2.0 potentially broken on newly builded docker images for instance due to the fact it was not pinned under requirements.txt.

Yes this is fixed in the unreleased v5.0.0. I will cut a release now.

And thanks for the report!