HomePhabricator

Change all python files to use Python3

Description

Change all python files to use Python3

Summary:

It's easier for maintainers if all python tools/scripts support only a
single version of Python. There are only a few scripts that aren't
explicitly python3 at this point, so this PR changes those remaining
scripts to explicitly require python3.

Backport of core PR11881
https://github.com/bitcoin/bitcoin/pull/11881/files

Depends on D3555

Test Plan:
Should execute with no python error from build dir:

../test/lint/check-doc.py
../contrib/devtools/optimize-pngs.py
../contrib/devtools/security-check.py src/bitcoind
../contrib/devtools/symbol-check.py src/bitcoind
../contrib/testgen/gen_base58_test_vectors.py valid 10 >

/tmp/test.json

../share/rpcauth/rpcauth.py foo

Should execute with no python error from project root:

./contrib/devtools/update-translations.py

Should execute with no python error from src/:

../share/qt/extract_strings_qt.py ../src/init.cpp

macdeploy/ scripts not tested

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3556

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Dec 12 2017, 19:47
FabienCommitted on Jul 8 2019, 10:27
FabienPushed on Jul 8 2019, 12:08
Reviewer
Restricted Project
Differential Revision
D3556: Change all python files to use Python3
Parents
rSTAGING478709f20ec8: Rename rpcuser.py to rpcauth.py
Branches
Unknown
Tags
Unknown