/
niceSOFT
/
python3-requests
Обзор
Документация
Войти
/
niceSOFT
/
python3-requests
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/__init__.py
14 строк
469 B
Quentin Pradet
Support missing SNIMissingWarning in tests (#6336)
21 янв 2023, 11:44
Не верифицирован
21 янв 2023, 11:44
1558590
Код
Авторство
О чём код?
"""Requests test package initialisation.""" import warnings try: from urllib3.exceptions import SNIMissingWarning # urllib3 1.x sets SNIMissingWarning to only go off once, # while this test suite requires it to always fire # so that it occurs during test_requests.test_https_warnings warnings.simplefilter("always", SNIMissingWarning) except ImportError: # urllib3 2.0 removed that warning and errors out instead SNIMissingWarning = None