2020.1.7 source distribution release contains \r\n line endings

Create issue
Issue #359 resolved
Former user created an issue

When attempting to install regex == 2020.1.7 on Solaris, noticed a spew of :

 "regex_3/_regex.c", line 40: warning: invalid white space character in directive

Upon inspection of the uploaded source distribution, it appears there are DOS (\r\n) line endings.

>od -c regex-2020.1.7/regex_3/_regex.c  | head
0000000   /   *       S   e   c   r   e   t       L   a   b   s   '
0000020   R   e   g   u   l   a   r       E   x   p   r   e   s   s   i
0000040   o   n       E   n   g   i   n   e  \r  \n       *  \r  \n

Comments (5)

  1. Eric Vander Weele

    I didn’t realize that I could create an issue without an account. For this issue, I’m the one who created it 😄.

  2. Matthew Barnett repo owner

    The CRLFs are a side-effect of switching to Git. It looks like Git is configured to use native line endings, and the control is greyed out! It’s kind of annying that Windows is tolerant when it comes to line endings, but Linux isn't…

    I don’t know why that hex dump is going up in steps of 0x20, though, because I can’t see that in the file here; the “R” of “Regular” is at byte offset 0x10.

  3. Eric Vander Weele

    When switching to git, I recommend adding a .gitattributes with the contents:

    # Normalize line-endings for all text files.
    * text=auto
    
    # Check out in the working directory as LF.
    *.py eol=lf
    *.c eol=lf
    *.h eol=lf
    

    Then, a renormalization of line endings needs to happen to sync everything up git add --renormalize && git commit.

    https://git-scm.com/docs/gitattributes

    If you want, I can contribute a change.

  4. Matt Wozniski

    I don’t know why that hex dump is going up in steps of 0x20, though, because I can’t see that in the file here; the “R” of “Regular” is at byte offset 0x10.

    od is counting lines in octal, not decimal - it’s 020, not 0x20 (but yes, that’s surprising).

    It’s kind of annying that Windows is tolerant when it comes to line endings, but Linux isn't…

    FWIW, Linux actually is - as are most other Unix-alikes. Apparently not Solaris, though. 🤷‍♂️

    Thanks for the quick turnaround on this!

  5. Log in to comment