Partially resolving a deprecation warning