Merge pull request #3853 from 9rnsr/hdrgen_test

Slim up test cases for header generation
Merge pull request #3907 from 9rnsr/fix12567

[enh] Issue 12567 - Modules can't be marked as deprecated
Conflicts:
	src/hdrgen.c
	src/module.c