rpcuser.py: Use 'python' not 'python2'#11830
Conversation
|
Hmm, given the deprecation of rpcuser/rpcpassword in favor of the cookie auth, maybe we should simply remove rpcuser instead? |
|
@TheBlueMatt |
|
utACK. |
|
Thanks @laanwj. I've updated the PR description to show compatibility with both major Python versions. @achow101 @TheBlueMatt: I'd be happy to rename |
Thanks, clear.
Yes, let's leave that for a future PR, and not diffuse the scope of this trivial change. |
6d2f277 rpcuser.py: Use 'python' not 'python2' (Henrik Jonsson) Pull request description: Note that `rpcuser.py` seems to handle either version when called explicitly like `python2 rpcuser.py` / `python3 rpcuser.py`. This change allows the user's `python` to be used to interpret the script. There's not always a `python2` installed, e.g. if only Python 3.0+ is installed as `python` / `python3`, like on Arch Linux (https://github.com/hkjn/src/blob/master/bitcoin/Dockerfile#L14) but `python` is almost always present. # Tested Script is already compatible with both major versions: ``` $ python2 share/rpcuser/rpcuser.py foobar String to be appended to bitcoin.conf: rpcauth=foobar:2951d04c215769c8887c1fa4a8f712c$63c9a08e3b69f811e3837c0d5b6a355b7f798afc7094d80008f5c56a056c387f Your password: TV4I54T6W38v1sj3iF4Xsw7A-wYav-Cn8uTr8qv4xZ8= $ python3 share/rpcuser/rpcuser.py foobar String to be appended to bitcoin.conf: rpcauth=foobar:129afbbd214c1f85fb6b9941402506f$4c5af73a2f3fd0a1d8232c28bc5c36f9b0cffd62b7b139beb328d089b16028dc Your password: qqbeWrGHqbYL1tUDh1wHKkejzxiGvOa3SPkDbbCwBfs= $ python2 --version Python 2.7.12 $ python3 --version Python 3.5.2 ``` Tree-SHA512: b5d6de15507cfd8dbb520325cf0b67fa471fa4fe3661de4ea6841fadb6ec9ba65d0c4f545f58578168c9ce9f6e483d613cce31ab3dd28117510bf9cada3b7b91
|
I sent #11836 as the follow-up to rename the script to |
3121d76 doc: Update release notes for share/rpcauth/rpcauth.py rename (Henrik Jonsson) 3fdb297 Rename rpcuser.py to rpcauth.py (Henrik Jonsson) Pull request description: This script creates `rpcauth` entries for bitcoin.conf, not the deprecated `rpcuser` entry, so this changes the name of the script to match. As discussed in #11830. Tree-SHA512: cd71c2a4043ef1381d3810b057cc83be3fac612df576b91b683ef91fdb7998c534b3b97a3313845eb867dc4bf7cc42a1250474d2261ab3f9ed2f884ca8ebd9f4
6d2f277 rpcuser.py: Use 'python' not 'python2' (Henrik Jonsson) Pull request description: Note that `rpcuser.py` seems to handle either version when called explicitly like `python2 rpcuser.py` / `python3 rpcuser.py`. This change allows the user's `python` to be used to interpret the script. There's not always a `python2` installed, e.g. if only Python 3.0+ is installed as `python` / `python3`, like on Arch Linux (https://github.com/hkjn/src/blob/master/bitcoin/Dockerfile#L14) but `python` is almost always present. # Tested Script is already compatible with both major versions: ``` $ python2 share/rpcuser/rpcuser.py foobar String to be appended to bitcoin.conf: rpcauth=foobar:2951d04c215769c8887c1fa4a8f712c$63c9a08e3b69f811e3837c0d5b6a355b7f798afc7094d80008f5c56a056c387f Your password: TV4I54T6W38v1sj3iF4Xsw7A-wYav-Cn8uTr8qv4xZ8= $ python3 share/rpcuser/rpcuser.py foobar String to be appended to bitcoin.conf: rpcauth=foobar:129afbbd214c1f85fb6b9941402506f$4c5af73a2f3fd0a1d8232c28bc5c36f9b0cffd62b7b139beb328d089b16028dc Your password: qqbeWrGHqbYL1tUDh1wHKkejzxiGvOa3SPkDbbCwBfs= $ python2 --version Python 2.7.12 $ python3 --version Python 3.5.2 ``` Tree-SHA512: b5d6de15507cfd8dbb520325cf0b67fa471fa4fe3661de4ea6841fadb6ec9ba65d0c4f545f58578168c9ce9f6e483d613cce31ab3dd28117510bf9cada3b7b91
3121d76 doc: Update release notes for share/rpcauth/rpcauth.py rename (Henrik Jonsson) 3fdb297 Rename rpcuser.py to rpcauth.py (Henrik Jonsson) Pull request description: This script creates `rpcauth` entries for bitcoin.conf, not the deprecated `rpcuser` entry, so this changes the name of the script to match. As discussed in bitcoin#11830. Tree-SHA512: cd71c2a4043ef1381d3810b057cc83be3fac612df576b91b683ef91fdb7998c534b3b97a3313845eb867dc4bf7cc42a1250474d2261ab3f9ed2f884ca8ebd9f4
3121d76 doc: Update release notes for share/rpcauth/rpcauth.py rename (Henrik Jonsson) 3fdb297 Rename rpcuser.py to rpcauth.py (Henrik Jonsson) Pull request description: This script creates `rpcauth` entries for bitcoin.conf, not the deprecated `rpcuser` entry, so this changes the name of the script to match. As discussed in bitcoin#11830. Tree-SHA512: cd71c2a4043ef1381d3810b057cc83be3fac612df576b91b683ef91fdb7998c534b3b97a3313845eb867dc4bf7cc42a1250474d2261ab3f9ed2f884ca8ebd9f4
Note that
rpcuser.pyseems to handle either version when called explicitly likepython2 rpcuser.py/python3 rpcuser.py. This change allows the user'spythonto be used to interpret the script.There's not always a
python2installed, e.g. if only Python 3.0+ is installed aspython/python3, like on Arch Linux (https://github.com/hkjn/src/blob/master/bitcoin/Dockerfile#L14) butpythonis almost always present.Tested
Script is already compatible with both major versions: