Skip to content
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

lint: Make sure we read the command line inputs using utf-8 decoding in python #14128

Merged
merged 1 commit into from Sep 4, 2018

Conversation

@ken2812221
Copy link
Contributor

@ken2812221 ken2812221 commented Sep 1, 2018

Make sure we read the command line inputs using utf-8 decoding in python

occurred from travis cron job:

contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)

@laanwj laanwj added the Tests label Sep 1, 2018
@laanwj
Copy link
Member

@laanwj laanwj commented Sep 1, 2018

I think it would be better to fix the .py script to always read as utf-8, this should be independent of the system locale

(we've done this for the other ones)
apparently this was the intent here too:

    revsig_allowed = open(dirname + "/allow-revsig-commits", "r", encoding="utf-8").read().splitlines()
    unclean_merge_allowed = open(dirname + "/allow-unclean-merge-commits", "r", encoding="utf-8").read().splitlines()
    incorrect_sha512_allowed = open(dirname + "/allow-incorrect-sha512-commits", "r", encoding="utf-8").read().splitlines()

Do you know where it fails?

@ken2812221 ken2812221 force-pushed the travis-cron-fix branch 2 times, most recently from 000a54a to eb360ff Sep 1, 2018
@ken2812221
Copy link
Contributor Author

@ken2812221 ken2812221 commented Sep 1, 2018

Do you know where it fails?

It is check_output

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Sep 1, 2018

No more conflicts as of last run.

@ken2812221 ken2812221 force-pushed the travis-cron-fix branch 3 times, most recently from fbbf17e to 3e7978f Sep 2, 2018
@fanquake
Copy link
Member

@fanquake fanquake commented Sep 2, 2018

concept ACK

@ken2812221 Can you update the commit message, PR title and description to match the current changes.

@ken2812221 ken2812221 changed the title travis: Fix cron job fail lint: Make sure we read the command line inputs using utf-8 decoding in python Sep 2, 2018
@ken2812221
Copy link
Contributor Author

@ken2812221 ken2812221 commented Sep 2, 2018

@fanquake Thanks, updated

@practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Sep 2, 2018

utACK 5d62dcf

Nice linter improvement!

@fanquake
Copy link
Member

@fanquake fanquake commented Sep 2, 2018

@ken2812221 Thanks, utACK 5d62dcf.

@laanwj
Copy link
Member

@laanwj laanwj commented Sep 4, 2018

thanks!
utACK 5d62dcf

@laanwj laanwj merged commit 5d62dcf into bitcoin:master Sep 4, 2018
2 checks passed
laanwj added a commit that referenced this issue Sep 4, 2018
…tf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d
@ken2812221 ken2812221 deleted the travis-cron-fix branch Sep 4, 2018
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue May 6, 2020
Summary:
Backport of core [[bitcoin/bitcoin#14128 | PR14128]].

Extend our python encodings linter to cover check_output.

Test Plan:
  arc lint --everything
Remove one of the encodings arguments and run `arc lint`. Check the
linter returns an error.

Run the scripts.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5957
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 1, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 2, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 3, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
UdjinM6 added a commit to UdjinM6/dash that referenced this issue Jul 3, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 3, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
UdjinM6 added a commit to UdjinM6/dash that referenced this issue Jul 3, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 7, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 8, 2021
…using utf-8 decoding in python

5d62dcf lint: Make sure we read the command line inputs using utf-8 decoding in python (Chun Kuan Lee)

Pull request description:

  Make sure we read the command line inputs using utf-8 decoding in python

  occurred from travis cron job:

  contrib/verify-commits/verify-commits.py should run with utf-8, otherwise it would raise UnicodeDecodeError
  `UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 744: ordinal not in range(128)`

Tree-SHA512: 90e4ad57fdbbbecb0a21fc2d2b03a04f5ef125e54124719ef36e5a85326930b732b47534757a7c3a8730096f3947b009ec898191928b5c2d38f9f4b3e37db48d

# Conflicts:
#	contrib/devtools/optimize-pngs.py
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants