Fix an error about line_terminator

Bug #1634755 reported by jian.song
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Incomplete
Undecided
jian.song

Bug Description

In Linux /n as a newline, and Windows is /r/n, so I will be the
default value is set to "/n" for line_terminator, in fact, the most intuitive
is solved test_operating_system.TestOperatingSystem.test_key_value_file
_codec problem.

before change:http://paste.openstack.org/show/585902/

We can see from the error message:
b"reference = {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}"
b"actual = {'key1': 'value1\\nkey2=value2\\nkey3=value3'}"

For this reason I think it's about time to split not the cut with a "/n"

maybe for py2,,/r/n and /n have same meaning for split,but in py3,
They doesn't look the same, /r/n does not transform file to make
the split on the line.The most intuitive reflect is when the parameter
is a/r/n can't correct the split, and parameters for/n, py3 and py2
test can be normal...

Into a /n can improve python3 support issues.

my development system is ubuntu14.04

jian.song (jiansong)
Changed in trove:
assignee: nobody → jian.song (jiansong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/388406

Changed in trove:
status: New → In Progress
jian.song (jiansong)
description: updated
Revision history for this message
Amrith Kumar (amrith) wrote :

What is the purpose of this bug?

Is it that:

- your development environment is Windows?
- you wish to deploy Trove on Windows?

To be clear, I don't believe that either of these are (currently) within scope for Trove though the former is a smaller ask than the latter.

Please describe the problem you are trying to solve (at a slightly higher level than CR-LF vs LF).

Changed in trove:
status: In Progress → Incomplete
Revision history for this message
jian.song (jiansong) wrote :

/r/n and /n have same meaning for split in py2 and py3,but in py3,
They doesn't look the same, /r/n does not transform file to make
the split on the line.The most intuitive reflect is when the parameter
is a/r/n can't correct the split, and parameters for/n, py3 and py2
test can be normal...

Into a /n can improve python3 support issues.

Revision history for this message
jian.song (jiansong) wrote :

about "a slightly higher level than CR-LF vs LF",I don't know much about it... But when I use '\ n' as an argument, all the test can pass...

Revision history for this message
jian.song (jiansong) wrote :

But use \ r \ n, py34 test_operating_system will have related error...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by amrith (<email address hidden>) on branch: master
Review: https://review.openstack.org/388406
Reason: "abandoned for inactivity, over 3 weeks old, has a negative review comment and is not currently marked as a WIP or WF-1. please restore the change if you wish to work on it."

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.