Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newlines are changed from LF to CRLF #105

Closed
Hasenpfote opened this issue Dec 14, 2022 · 5 comments
Closed

Newlines are changed from LF to CRLF #105

Hasenpfote opened this issue Dec 14, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@Hasenpfote
Copy link

Hasenpfote commented Dec 14, 2022

Hi!
I tried poetry-dynamic-versioning v0.21.1 on Windows 10 64bit version.

  1. Prepare pyproject.toml and __init__.py files and set newlines to LF.
  2. automatically or manually run poetry-dynamic-versioning.
  3. poetry-dynamic-versioning modifies the version and __version__ variables.

At this time, newlines in files modified by poetry-dynamic-versioning are changed from LF to CRLF.
I was confused because I was expecting it to remain LF.
By the way, the sdist setup.py file generated by poetry build was LF.
The poetry version command, on the other hand, keeps LF after conversion.

In this case, is there an option to not change from LF?

Thank you.

@mtkennerly mtkennerly added the bug Something isn't working label Dec 15, 2022
@mtkennerly
Copy link
Owner

Hi! It looks like this is the default behavior of pathlib's write_text. Line endings are apparently preserved with write_bytes, so I'll switch to that.

mtkennerly added a commit that referenced this issue Dec 15, 2022
@mtkennerly mtkennerly added this to the v0.21.2 milestone Dec 15, 2022
@mtkennerly
Copy link
Owner

I just released 0.21.2. Could you let me know if you still see any issues?

@Hasenpfote
Copy link
Author

v0.21.2 worked perfectly as expected for me.
Thanks for the quick response!

@Hasenpfote
Copy link
Author

Oops, I accidentally closed the issue.
I will re-open it for your release work.

@Hasenpfote Hasenpfote reopened this Dec 17, 2022
@mtkennerly
Copy link
Owner

It was alright to close the ticket :) Thanks for confirming that it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants