Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b753306f1240
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dca44ef501db
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 27, 2016

  1. pyon: handle \r

    sbourdeauducq committed Jan 27, 2016
    Copy the full SHA
    590354d View commit details
  2. Copy the full SHA
    170b438 View commit details
  3. Copy the full SHA
    dca44ef View commit details
Showing with 7 additions and 4 deletions.
  1. +1 −1 artiq/gui/experiments.py
  2. +1 −1 artiq/protocols/logging.py
  3. +4 −1 artiq/protocols/pyon.py
  4. +1 −1 artiq/test/serialization.py
2 changes: 1 addition & 1 deletion artiq/gui/experiments.py
Original file line number Diff line number Diff line change
@@ -240,7 +240,7 @@ def restore_state(self, state):
class _ExperimentDock(dockarea.Dock):
def __init__(self, manager, expurl):
dockarea.Dock.__init__(self, "Exp: " + expurl, closable=True)
self.setMinimumSize(QtCore.QSize(1100, 700))
self.setMinimumSize(QtCore.QSize(740, 470))
self.layout.setSpacing(5)
self.layout.setContentsMargins(5, 5, 5, 5)

2 changes: 1 addition & 1 deletion artiq/protocols/logging.py
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ async def stream_task(self, stream):
entry = (await stream.readline())
if not entry:
break
self.line_input(entry[:-1].decode())
self.line_input(entry.decode().rstrip("\r\n"))
except:
logger.debug("exception in log forwarding", exc_info=True)
break
5 changes: 4 additions & 1 deletion artiq/protocols/pyon.py
Original file line number Diff line number Diff line change
@@ -74,7 +74,10 @@ def encode_number(self, x):

def encode_str(self, x):
# Do not use repr() for JSON compatibility.
tt = {ord("\""): "\\\"", ord("\\"): "\\\\", ord("\n"): "\\n"}
tt = {
ord("\""): "\\\"", ord("\\"): "\\\\",
ord("\n"): "\\n", ord("\r"): "\\r"
}
return "\"" + x.translate(tt) + "\""

def encode_bytes(self, x):
2 changes: 1 addition & 1 deletion artiq/test/serialization.py
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ def test_encdec(self):
_json_test_object = {
"a": "b",
"x": [1, 2, {}],
"foo\nbaz\\qux\"": ["bar", 1.2, {"x": "y"}],
"foo\nbaz\\qux\"\r2": ["bar", 1.2, {"x": "y"}],
"bar": [True, False, None]
}