Skip to content
Myr

Warn user about possible slowdown when using cryptography version <

Before adoption: this commit came in with the history the project adopted, so no landing records it.

1.3.4

authored by Taylor Rose · committed by Prim Rose · parent 9713289 · Browse files · 3 files+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+18 added−0 removed

  • other:+18 added−0 removed

3 files+18 added−0 removed

modified:requests/__init__.py+15 added
69 unmodified lines
70 assert minor < 171 assert patch >= 2727374def _check_cryptography(cryptography_version):75 # cryptography < 1.3.476 try:77 cryptography_version = list(map(int, cryptography_version.split('.')))78 except ValueError:79 return8081 if cryptography_version < [1, 3, 4]:82 warning = 'Old version of cryptography ({0}) may cause slowdown.'.format(cryptography_version)83 warnings.warn(warning, RequestsDependencyWarning)8485# Check imported dependencies for compatibility.86try:87 check_compatibility(urllib3.__version__, chardet.__version__)88except (AssertionError, ValueError):
4 unmodified lines
93# Attempt to enable urllib3's SNI support, if possible94try:95 from urllib3.contrib import pyopenssl96 pyopenssl.inject_into_urllib3()9798 # Check cryptography version99 from cryptography import __version__ as cryptography_version100 _check_cryptography(cryptography_version)101except ImportError:102 pass103104# urllib3's DependencyWarnings should be silenced.
32 unmodified lines
modified:AUTHORS.rst+1 added
176 unmodified lines
177- Gary Wu (`@garywu <https://github.com/garywu>`_)178- Ryan Pineo (`@ryanpineo <https://github.com/ryanpineo>`_)179- Ed Morley (`@edmorley <https://github.com/edmorley>`_)180- Matt Liu <liumatt@gmail.com> (`@mlcrazy <https://github.com/mlcrazy>`_)181- Taylor Hoff <primdevs@protonmail.com> (`@PrimordialHelios <https://github.com/PrimordialHelios>`_)
modified:HISTORY.rst+2 added
6 unmodified lines
7+++89**Improvements**1011- Warn user about possible slowdown when using cryptography version < 1.3.41213**Bugfixes**1415- Parsing empty ``Link`` headers with ``parse_header_links()`` no longer return one bogus entry16
1522 unmodified lines