Remove annoying deprecation warnings by doing what they say.