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

Fixed tests regenerating using CRLF when running it on Windows #80033

Closed
addonszz mannequin opened this issue Jan 29, 2019 · 2 comments
Closed

Fixed tests regenerating using CRLF when running it on Windows #80033

addonszz mannequin opened this issue Jan 29, 2019 · 2 comments
Labels
3.8 only security fixes stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@addonszz
Copy link
Mannequin

addonszz mannequin commented Jan 29, 2019

BPO 35852
Nosy @serhiy-storchaka, @addonszz
PRs
  • bpo-35852: Fixed tests regenerating using CRLF when running it on Windows #11697
  • bpo-35852: Fixed tests regenerating using CRLF when running it on Windows #11697
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-02-17.14:23:43.472>
    created_at = <Date 2019-01-29.16:27:01.952>
    labels = ['tests', '3.8', 'type-feature', 'library']
    title = 'Fixed tests regenerating using CRLF when running it on Windows'
    updated_at = <Date 2019-02-17.14:23:43.472>
    user = 'https://github.com/addonszz'

    bugs.python.org fields:

    activity = <Date 2019-02-17.14:23:43.472>
    actor = 'addons_zz'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-17.14:23:43.472>
    closer = 'addons_zz'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2019-01-29.16:27:01.952>
    creator = 'addons_zz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35852
    keywords = ['patch', 'patch']
    message_count = 2.0
    messages = ['334529', '335766']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'addons_zz']
    pr_nums = ['11697', '11697']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue35852'
    versions = ['Python 3.8']

    @addonszz
    Copy link
    Mannequin Author

    addonszz mannequin commented Jan 29, 2019

    When generating the file on Windows by running

    python test/test_profile.py -r
    

    The file has its line ending converted from LF to CRLF, creating noise on the git diff.

    @addonszz addonszz mannequin added 3.8 only security fixes stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Jan 29, 2019
    @serhiy-storchaka
    Copy link
    Member

    PR 11697 keeps existing CRLFs in unmodified part, by writes bare LFs for auto-generated part. The result can contain mixed newlines.

    The current code looks correct to me. Just git should be configured to convert LF to platform specific newlines in source files.

    @addonszz addonszz mannequin closed this as completed Feb 17, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant