Merge #2877: [Tests][Scripts] Bump Python version to 3.8 and add more linting
c340533f152426106e33df9f3e78bd9c55b726bb Bump python version to 3.8 (Fuzzbawls)
17bc5bf7bc96044ddcba2620f12eed8008212704 tests: remove redundant function (Fuzzbawls)
ec22835f134551c143b23afe1d9fd1bb7459e34a scripted-diff: test: Use py3.5 bytes::hex() method (Fuzzbawls)
139ae9d9ac182a20b53c89d215c86988099c4827 lint: more python linting (Fuzzbawls)
c757ce3aca4d23ec5240dfc13ff9edce567b1111 scripts: clean github-merge.py and symbol-check.py (Fuzzbawls)
6f822aea436e1dfe9b3b0d44a8e4a644f812e3cc scripts: additional E275 fixups (Fuzzbawls)
07d1c56c1221072dd57206fd653dca288ef2afb8 scripted-diff: test: Remove brackets after assert (Fuzzbawls)
ef83f5b5f4cc99856e9f571c636c315558801870 tests: Avoid using mutable default parameter values (Fuzzbawls)
77b42a262f8e863c7b1dd39c724769c15fcb8df1 Lint: enable mypy linting for python files (Fuzzbawls)
19862fd60050de4e296271838026f371d843576e scripts: exclude wallet_bumpfee.py from linting (Fuzzbawls)
8c0dd38534d06b03ebc4e1bcdd387569942b140b scripts: remove outdated python3 workaround in scrypt.py (Fuzzbawls)
56198916ff01cdc8e50dbc61d0b4d3b31472ca39 scripts: remove NONFATAL from security-check.py (fanquake)
457f2a8a620fbc607d51ec21262c78cbbb9a2379 scripts: no-longer check for 32 bit windows in security-check.py (fanquake)
036ab88a23a65c1879fa7367c02ee50c54270aed tests: add type hints to the test framework's script.py (Fuzzbawls)
a560910fd6e3bbbb18f5922bf13330fa9c54bb20 Strictly enforce instance attrs in critical functional test classes. (Justin Turner Arthur)
f46217b5269f0d9eb18d45a0a86af80fbf49c6b3 test: Remove python3.4 workaround in feature_dbcrash (MarcoFalke)
Pull request description:
This PR offers a bit of an overhaul to our python test suite and python standards. The high level information is that we:
- migrate from the EOL'd Python 3.5 to a more recent version (3.8)
- strip out some ancient workaround code that is no longer necessary
- add new linters that will provide an early warning if new python code is not up to standards
The bulk of the changes here are via scripted-diff commits, or adapted cherry-picks from upstream.
ACKs for top commit:
Liquid369:
ACK c340533f152426106e33df9f3e78bd9c55b726bb
panleone:
re tACK c340533f152426106e33df9f3e78bd9c55b726bb
export RE_B_0="[^()]*" # match no bracket
export RE_B_1="${RE_B_0}\(${RE_B_0}\)${RE_B_0}" # match exactly one ()
export RE_B_2="${RE_B_0}\(${RE_B_1}\)${RE_B_0}" # match wrapped (())