This will explicitly mark most strings as bytes. (Required for py3)
[qa] py2: Unfiddle strings into bytes explicitly #7853
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1604-qaBytes changing 28 files +205 −213-
MarcoFalke commented at 3:25 PM on April 10, 2016: member
-
[qa] py2: Unfiddle strings into bytes explicitly faa41ee204
- MarcoFalke force-pushed on Apr 10, 2016
- laanwj added the label Tests on Apr 11, 2016
-
laanwj commented at 11:00 AM on April 11, 2016: member
Awesome, this is the shittiest part of porting to Python 3. Concept ACK.
-
laanwj commented at 3:41 PM on April 14, 2016: member
tACK faa41ee
- laanwj merged this on Apr 14, 2016
- laanwj closed this on Apr 14, 2016
- laanwj referenced this in commit 6ef5e000a2 on Apr 14, 2016
-
mruddy commented at 4:54 PM on April 14, 2016: contributor
i noticed a new error when running
make check:Running test/bitcoin-util-test.py... Traceback (most recent call last): File "./test/bitcoin-util-test.py", line 12, in <module> "bitcoin-util-test.json",buildenv) File "/home/black/Desktop/bitcoin/src/test/bctest.py", line 52, in bctester bctest(testDir, testObj, buildenv.exeext) File "/home/black/Desktop/bitcoin/src/test/bctest.py", line 30, in bctest outs = proc.communicate(input=inputData) File "/usr/lib/python3.4/subprocess.py", line 962, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/usr/lib/python3.4/subprocess.py", line 1601, in _communicate self._save_input(input) File "/usr/lib/python3.4/subprocess.py", line 1677, in _save_input self._input = self._input.encode(self.stdin.encoding) AttributeError: 'bytes' object has no attribute 'encode'this makes the error go away, but is probably not what you want since it only undoes one of this PR's changes:
diff --git a/src/test/bctest.py b/src/test/bctest.py index fc59152..dbff278 100644 --- a/src/test/bctest.py +++ b/src/test/bctest.py @@ -17,7 +17,7 @@ def bctest(testDir, testObj, exeext): inputData = None if "input" in testObj: filename = testDir + "/" + testObj['input'] - inputData = open(filename, 'rb').read() + inputData = open(filename).read() stdinCfg = subprocess.PIPE outputFn = None - MarcoFalke deleted the branch on Apr 14, 2016
-
MarcoFalke commented at 5:35 PM on April 14, 2016: member
@mruddy Thanks for reporting, I will take a look...
- MarcoFalke referenced this in commit 551a38b1e5 on Apr 15, 2016
- MarcoFalke referenced this in commit f1f1b82033 on Apr 15, 2016
- nomnombtc referenced this in commit a8f2079c8e on Nov 11, 2016
- nomnombtc referenced this in commit 2386dd3087 on Nov 12, 2016
- nomnombtc referenced this in commit f8a577cea9 on Nov 13, 2016
- sickpig referenced this in commit 5236cc16e7 on Nov 14, 2016
- str4d referenced this in commit 5ed8edcf3d on Jan 31, 2017
- str4d referenced this in commit c7cb3c13ea on Feb 8, 2017
- zkbot referenced this in commit 36df5a92f8 on Feb 9, 2017
- zkbot referenced this in commit dd8b38316f on Feb 9, 2017
- zkbot referenced this in commit 253c610783 on Feb 9, 2017
- codablock referenced this in commit 147e9c96a7 on Sep 16, 2017
- codablock referenced this in commit c4589a5071 on Sep 19, 2017
- codablock referenced this in commit ac53190bfe on Dec 20, 2017
- zkbot referenced this in commit 19a8c45f42 on Aug 13, 2021
- zkbot referenced this in commit 8e9f44cbe2 on Aug 13, 2021
- zkbot referenced this in commit cf9a0799b4 on Aug 17, 2021
- MarcoFalke locked this on Sep 8, 2021