BUG: `line terminator` and '\n to \r\n' problem in Windows(Issue #20353)
- [ ] closes #20353
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
