jpadilla / pyjwt

JSON Web Token implementation in Python
https://pyjwt.readthedocs.io
MIT License
5k stars 675 forks source link

Release 2.7.0 #867

Closed sk- closed 1 year ago

sk- commented 1 year ago

Could it be possible to prepare a release 2.7.0? Just 5 days after 2.6.0 was released there were changes to the classifiers to indicate the package is 3.11 ready, which would make pyjwt to be ready in https://pyreadiness.org/3.11/

Here are the changes between master and the latest release https://github.com/jpadilla/pyjwt/compare/2.6.0...master

tdg5 commented 1 year ago

Can I also advocate for a new release? PyJWKClient uses urllib for making requests and there seem to be a good number of sites on the web that respond to requests that come from the urllib User-Agent with a 403 response. The PyJWKClient class made its headers configurable 3 months ago and there has been no release in that time.

Here's an example... Seems like a lot of DNS handled by cloudflare would run into this issue:

>>> from urllib import request; request.urlopen(request.Request(url="https://cloudflare.com"))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 555, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

but with an alternative user agent:

>>> from urllib import request; request.urlopen(request.Request(url="https://cloudflare.com", headers={"User-Agent": "something-else"}))

<http.client.HTTPResponse object at 0xffffa6643cd0>
Viicos commented 1 year ago

This can now be closed, 2.7.0 has been released