29
loading...
This website collects cookies to deliver better user experience
This is a cross-post from my blog. If you enjoy my content you can subscribe via Email or RSS.
requests[security]
extra into a no-op. Can be safely removed for v2.24.0+ for almost all users (OpenSSL 1.1.1+ and not relying on specific features in pyOpenSSL)chardet
to charset_normalizer
requests[security]
and instead install just requests
pip-tools
, poetry
, or pipenv
bytes
to str
when responses don't define what encoding to use via Content-Type
. This feature only gets used when you call the Response.text()
API.chardet
which is licensed LGPL-2.1.chardet
for a different library which causes a problem with LGPL.charset_normalizer
which is MIT licensed. The library itself is relatively young so a lot of work has gone into making sure users aren't broken with this change including extensive tests against real-life websites and comparing the results against chardet
to ensure better performance and accuracy in every case.chardet
if the library is installed in your environment. To take advantage of charset_normalizer
you must uninstall chardet
from your environment. If you want to continue using chardet
with Requests on Python 3 you can install chardet
or install Requests using requests[use_chardet_on_py3]
:$ python -m pip install requests chardet
- OR -
$ python -m pip install requests[use_chardet_on_py3]
ssl
module) or if the OpenSSL version that Python was compiled against didn't support SNI. Basically the two rare scenarios where pyOpenSSL was actually useful!requests[security]
extra and in v2.26.0 the [security]
extra will be a no-op. Instead of installing pyOpenSSL
and cryptography
no dependencies will be installed.requests[security]
you can remove the [security]
and only install requests
. If you have a lock file via a tool like pip-tools
or poetry
you can regenerate the lock file and potentially see pyOpenSSL
and cryptography
removed from your lock file. Woo!brotli
library or the brotlicffi
library (previously named brotlipy
).Accept-Encoding
header with br
signaling Brotli support even if urllib3
would have been able to decode the response. Now Requests will use urllib3's feature detection for Brotli and emit Accept-Encoding: gzip, deflate, br
. This is great news for servers that support Brotli on pre-compressed static resources like fonts, CSS, and JavaScript. Woo!$ python -m pip install urllib3[brotli]