Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

[mod] upgrade requests to version 2.24.0. pyopenssl becomes optional. #2199

Merged
merged 1 commit into from Sep 26, 2020

Conversation

dalf
Copy link
Contributor

@dalf dalf commented Sep 15, 2020

from requests 2.24.0 changelog:

pyOpenSSL TLS implementation is now only used if Python either doesn’t have an ssl module or doesn’t support SNI.

What does this PR do?

  • upgrade requests to version 2.24.0
  • requirements.txt: pyopenssl is still required to install searx as a fallback.
  • searx log a critical message if ssl modules doesn't support SNI, and pyOpenSSL is not installed.
  • The message is logged from searx.poolrequests instead of searx.webapp.

Why is this change important?

See

SNI is supported by Python version 3.2.

How to test this PR locally?

check HTTPS connection are working in the following scenarios:

  • upgrade with requests and pyopenssl
  • requests 2.24.0, and without pyopenssl

Author's checklist

Related issues

requirements.txt Outdated Show resolved Hide resolved
requests 2.24.0 uses the ssl module except if it doesn't support SNI, in this case searx fallbacks to pyopenssl.
searx logs a critical message and exit if the ssl modules doesn't support SNI and pyOpenSSL is not installed.
searx logs a critical message and exit if the ssl version is older than 1.0.2.
in requirements.txt, pyopenssl is still required to install searx as a fallback.
@dalf dalf merged commit 93f7f7e into searx:master Sep 26, 2020
@dalf dalf deleted the upgrade-requests branch September 28, 2020 19:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants