requests / toolbelt

A toolbelt of useful classes and functions to be used with python-requests
https://toolbelt.readthedocs.org
Other
998 stars 186 forks source link

Switch to unittest.mock instead of mock #307

Closed flo-renaud closed 3 years ago

flo-renaud commented 3 years ago

mock is now part of the python standard library, and python-mock will be deprecated in Fedora34 (see https://fedoraproject.org/wiki/Changes/DeprecatePythonMock)

Follow the recommendation to use from unittest import mock instead of import mock and conditionalize the dependency.

Signed-off-by: Florence Blanc-Renaud flo@redhat.com

sigmavirus24 commented 3 years ago

Duplicate of https://github.com/requests/toolbelt/issues/301

sigmavirus24 commented 3 years ago

Actually this is reasonably done. I'll merge it once CI passes

flo-renaud commented 3 years ago

Hi @sigmavirus24 I checked the travis-CI failures and they look unrelated to my PR (the same errors were seen for instance in PR304.

Is anything additional required on my side? Is a green CI run expected?