Fix two bugs, see commit messages.
test: Ignore UTF-8 errors in assert_debug_log #28035
pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2307-test-utf8- changing 2 files +6 −6-
maflcko commented at 10:13 AM on July 6, 2023: member
-
DrahtBot commented at 10:13 AM on July 6, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK theStack If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label Tests on Jul 6, 2023
- DrahtBot added the label CI failed on Jul 6, 2023
- maflcko force-pushed on Jul 6, 2023
- maflcko force-pushed on Jul 6, 2023
- DrahtBot removed the label CI failed on Jul 6, 2023
- fanquake requested review from theStack on Jul 7, 2023
-
www222fff commented at 5:44 AM on July 10, 2023: none
Is this fix applied to both for python2 and python3?
-
fanquake commented at 8:09 AM on July 10, 2023: member
Is this fix applied to both for python2 and python3?
We only support Python 3.
- maflcko added this to the milestone 26.0 on Jul 14, 2023
-
fa63326fbc
test: Fix debug_log_size helper
debug_log_bytes returned "an opaque number when in text mode" (https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects), not the number of bytes. Fix this by using binary mode or text mode (with the same encoding) consistently when opening the file for ftell() and read().
-
fa6bb85cd2
test: Ignore UTF-8 errors in assert_debug_log
read() fails in text mode when the unicode hasn't been fully written yet. Fixes: "wallet_importdescriptors.py: can't decode bytes in position 228861-228863: unexpected end of data" (https://github.com/bitcoin/bitcoin/issues/28030)
-
fa3d72960b
lint: Ignore check_fileopens failure on **kwargs
This fixes a bug in the linter: """ Python's open(...) seems to be used to open text files without explicitly specifying encoding='utf8': test/functional/test_framework/test_node.py: with open(self.debug_log_path, **kwargs) as dl: """
- maflcko force-pushed on Jul 20, 2023
-
maflcko commented at 12:46 PM on July 20, 2023: member
Split into more commits
- theStack approved
- fanquake merged this on Jul 26, 2023
- fanquake closed this on Jul 26, 2023
- maflcko deleted the branch on Jul 26, 2023
- sidhujag referenced this in commit 15c76989ff on Aug 9, 2023
- kwvg referenced this in commit 7ea387eab2 on Aug 24, 2023
- bitcoin locked this on Jul 25, 2024