CLN: clear up some cython warnings
CLN: eliminate bootstrapping issue form generate_code.py
Merge pull request #6176 from y-p/PR_cython_warnings

CLN: clear up some cython warnings