fix Issue 12567 - Modules can't be marked as deprecated
Merge pull request #3907 from 9rnsr/fix12567

[enh] Issue 12567 - Modules can't be marked as deprecated