> A better solution for a case like this would be to import the function from the Python standard library into the Flask namespace, so old code would still work.
For as long as the functionality does not change. Which it didn't when the function was removed; the Python standard library function had the same functionality as the former Flask function that was removed.