requests.session() was deprecated in requests v1.0.0.
By using requests.Session class directly we also rely on the default headers supplied by the requests.Session class and extend them rather than overriding when token was specified:
import requests requests.Session().headers {'User-Agent': 'python-requests/2.32.4', 'Accept-Encoding': 'gzip, deflate, br, zstd', 'Accept': '/', 'Connection': 'keep-alive'}
Fixes: https://pagure.io/libpagure/issue/52
Signed-off-by: Alexander Bokovoy abokovoy@redhat.com
Pull-Request has been merged by abbra
requests.session() was deprecated in requests v1.0.0.
By using requests.Session class directly we also rely on the default
headers supplied by the requests.Session class and extend them rather
than overriding when token was specified:
Fixes: https://pagure.io/libpagure/issue/52
Signed-off-by: Alexander Bokovoy abokovoy@redhat.com