Deprecated functions in Python: How can I make sure...
...that my codes will work with future Python versions? Let's pretend I'm a professional Python developer (I am not) and have written and distributed dozens, maybe hundreds of codes to several clients. Some of them use functions like time.clock() that worked fine up to version 3.3 and now raise an ugly DeprecationWarning, telling me that "time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead". Doesn't that mean that I have to monitor all of the codes I ever wrote and check if they're still compatible with the recent python versions? Should I ask my fictional clients to stay with out of date python versions in order to not risk a DeprecationWarning? Should I pack my whole code in a try/except block and catch/suppress all DeprecationWarnings? Is there any way to handle this professionally? /Edit: try/except doesn't seem to work for DeprecationWarnings (which probably makes sense)