twilio / twilio-python

A Python module for communicating with the Twilio API and generating TwiML.
MIT License
1.83k stars 699 forks source link

chore: prefer unittest.mock from the standard library for Python >=3.8 #793

Open a-detiste opened 3 months ago

a-detiste commented 3 months ago

This keeps compatibility with Python3.7

tiwarishubham635 commented 3 months ago

I see your changes. So that means if we want to support python 3.7, then mock can't be used directly? In a sense, we'll still have the dependency on unittest. Is that right?

a-detiste commented 3 months ago

Hi.

It s a partial dependency.

Distrubtions that don't support py3.7 can drop mock.

There s a special syntax for setup.py/requirements.txt to says this dependency only applies for Python version X, I don't use it actively but I can find examples in other projects

Le ven. 24 mai 2024, 09:10, Shubham @.***> a écrit :

I see your changes. So that means if we want to support python 3.7, then mock can't be used directly? In a sense, we'll still have a dependency. Is that right?

— Reply to this email directly, view it on GitHub https://github.com/twilio/twilio-python/pull/793#issuecomment-2128752446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB47WUFKU3EGCCWI7A3PAGTZD3RYDAVCNFSM6AAAAABIGMCJP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRYG42TENBUGY . You are receiving this because you authored the thread.Message ID: @.***>

a-detiste commented 2 months ago

@tiwarishubham635 unittest is part of the standard library