I have a Django app written in Python 2.5 and I plan to upgrade it to be compatible with Python 2.6. It contains hundreds of .py files. Is there a simple way to find all deprecated functions in those files?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure what you mean by "deprecated functions" when upgrading from Python 2.5 to Python 2.6.
The release notes are very specific.
There aren’t any deprecated functions. A few whole modules are deprecated, and one attribute of the Exception class.
You have grep (or find) and you have Python which you can use to search 100’s of files of Python source.
When we made the change from 2.5 to 2.6 we had zero issues with deprecated functions.
Deprecated means "still works".
We had exactly one deprecated module, and it was reported during our unit testing via a warning message. We simply read the log for deprecation messages and replaced the module. (It was
md5, by the way.) Eventually, we did a grep for all uses ofmd5and replaced them.