Merge pull request #5517 from lichesser/fix_set_depreciation_warning

Fixes #5513. set is built-in since 2.4 and deprecated since 2.6