Line ending handling broken on Win32 platform
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
Research direction
Inspect the filename path in Template.init and compare it with the text argument path, focusing on the mentioned rb versus rU file-opening modes. Reproduce the issue with a CR-LF template on Windows and verify that the output preserves each line ending without adding an extra carriage return.
Written by the indexing model from the issue text.
Description
Migrated issue, originally created by Anonymous
Version 0.3.4
Line ending handling of templates is broken on Windows:
For each "CR-LF" sequence in the template file you get "CR-CR-LF" in the output.
This only happens when using the filename argument to Template.init(), not if the text argument is used to supply the template.
I think this is due to opening file with mode "rb" where mode "rU" should be used to automatically convert line endings to the correct internal format on all platforms.
- Dominant language
- Python
- Stars
- 459
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sqlalchemy/mako
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
sqlalchemy/mako#432 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sqlalchemy/mako#417 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
sqlalchemy/mako#392 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
sqlalchemy/mako#382 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
sqlalchemy/mako#376 · 9 comments ·
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Harmony OPeNDAP SubSetter (HOSS) Geographic LARC_CLOUD PREFIRE_SAT2_AUX-SAT R01 production
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nasa/harmony-autotester#245 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Deltares/imod-python#1928 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 66/100