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

Fix file.line line endings #49026

Merged
merged 5 commits into from Aug 13, 2018

Conversation

Projects
None yet
3 participants
@dwoz
Contributor

dwoz commented Aug 9, 2018

What does this PR do?

Fix extra CR in file.line line endings on windows PY3.

What issues does this PR fix or reference?

#48557

Previous Behavior

Extra CR in line endings.

New Behavior

Proper CRLF line endings.

Tests written?

Yes

Commits signed with GPG?

Yes

@dwoz dwoz requested a review from garethgreenaway Aug 9, 2018

@dwoz dwoz force-pushed the dwoz:issue_48557 branch from 387ff77 to baf291b Aug 9, 2018

@dwoz dwoz force-pushed the dwoz:issue_48557 branch from f590429 to 2cf80c1 Aug 9, 2018

@rallytime

This comment has been minimized.

Contributor

rallytime commented Aug 10, 2018

@dwoz This change is not happy in Python 3:

-> unit.returners.test_local_cache.Local_CacheTest.test_not_clean_new_jobs  .
19:15:11        Traceback (most recent call last):
19:15:11          File "/tmp/kitchen/testing/tests/unit/returners/test_local_cache.py", line 285, in test_not_clean_new_jobs
19:15:11            self._add_job()
19:15:11          File "/tmp/kitchen/testing/tests/unit/returners/test_local_cache.py", line 261, in _add_job
19:15:11            add_job = salt.utils.job.store_job(opts, load)
19:15:11          File "/tmp/kitchen/testing/salt/utils/job.py", line 110, in store_job
19:15:11            mminion.returners[fstr](load)
19:15:11          File "/tmp/kitchen/testing/salt/returners/local_cache.py", line 169, in returner
19:15:11            os.path.join(hn_dir, RETURN_P), 'w+b'
19:15:11          File "/tmp/kitchen/testing/salt/utils/atomicfile.py", line 168, in atomic_open
19:15:11            ntf = tempfile.NamedTemporaryFile(mode, **kwargs)
19:15:11          File "/usr/lib/python3.5/tempfile.py", line 691, in NamedTemporaryFile
19:15:11            newline=newline, encoding=encoding)
19:15:11        ValueError: binary mode doesn't take a newline argument

As one example ^

Can you take a look here?

dwoz added some commits Aug 10, 2018

@rallytime rallytime merged commit 338ecb7 into saltstack:2018.3 Aug 13, 2018

6 of 8 checks passed

jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
WIP ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details

@dwoz dwoz deleted the dwoz:issue_48557 branch Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment