Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Dec 13, 2018

Python 3.4 is EOL after March 2019, so switch to 3.5. See https://devguide.python.org/#status-of-python-branches

This pull does the following in a bunch of commits:

  • scripted diff to use the bytes::hex() method in place of previous wrappers (b2x, bytes_to_hex_str, hexlify, ...)
  • Update the build system (gitian and travis) to remove python2.7 and replace it with python3.5
  • Another scripted-diff to remove brackets after assert. This is unrelated to the python3.5 switch, but a stylistic commit, so probably not worth to split up. The motivation behind it is to avoid asserting on data structures (such as tuples of length one), which never fails:
>>> assert(False,)   # with brackets
>>> assert False,    # without brackets
SyntaxError: invalid syntax
>>> assert False     # proper assertion
AssertionError
  • And then a final scripted diff to update the copyright headers in the test subfolder, since I touched most of the files anyway and it wouldn't make sense to split this commit out into a separate pull.

For reference (contributed by luke-jr):

Ubuntu LTS (bionic): 3.6.5
Debian stable (stretch): 3.5.3
RHEL 8 (expected before v0.19): 3.6.x
Gentoo stable: 3.6.5
Arch: 3.7.1

@luke-jr
Copy link
Member

luke-jr commented Dec 13, 2018

For reference:

Ubuntu LTS (bionic): 3.6.5
Debian stable (stretch): 3.5.3
RHEL 8 (expected before v0.19): 3.6.x
Gentoo stable: 3.6.5
Arch: 3.7.1

@maflcko maflcko force-pushed the Mf1811-buildPython3 branch from 409fd9c to 52da488 Compare December 13, 2018 21:16
@jnewbery
Copy link
Contributor

Concept ACK. Release notes for 3.5 are here: https://docs.python.org/3/whatsnew/3.5.html . I think for this project, the most interesting new features could be:

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 13, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15482 (Implement BIPXXX's new softfork rules (The Great Consensus Cleanup) by TheBlueMatt)
  • #15437 (p2p: Remove BIP61 reject messages by MarcoFalke)
  • #13541 (wallet/rpc: sendrawtransaction maxfeerate by kallewoof)
  • #12911 (wallet: Show fee in results for signrawtransaction* for segwit inputs by kallewoof)
  • #10443 (Add fee_est tool for debugging fee estimation code by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@practicalswift
Copy link
Contributor

Concept ACK

@fanquake
Copy link
Member

Concept ACK.
+1 on being able to start using Type Hints.

@maflcko maflcko force-pushed the Mf1811-buildPython3 branch from bd3c1d3 to 004d63c Compare January 29, 2019 18:45
@Sjors
Copy link
Member

Sjors commented Jan 30, 2019

Concept ACK

@maflcko maflcko force-pushed the Mf1811-buildPython3 branch from fac31b8 to fa27978 Compare March 4, 2019 23:17
@Sjors
Copy link
Member

Sjors commented Mar 5, 2019

tACK fa27978. It's a new commit on top of dddd1d0, not a rebase; the force push only replaced an earlier version of that new commit.

@maflcko maflcko merged commit fa27978 into bitcoin:master Mar 5, 2019
maflcko pushed a commit that referenced this pull request Mar 5, 2019
fa27978 test: Remove python3.4 workaround in feature_dbcrash (MarcoFalke)
dddd1d0 .python-version: Specify full version 3.5.6 (MarcoFalke)
faa7cdf scripted-diff: Update copyright in ./test (MarcoFalke)
fa0e65b scripted-diff: test: Remove brackets after assert (MarcoFalke)
fab5a1e build: Require python 3.5 (MarcoFalke)
fa6bf21 scripted-diff: test: Use py3.5 bytes::hex() method (MarcoFalke)

Pull request description:

  Python 3.4 is EOL after March 2019, so switch to 3.5. See https://devguide.python.org/#status-of-python-branches

  This pull does the following in a bunch of commits:
  * scripted diff to use the `bytes::hex()` method in place of previous wrappers (`b2x`, `bytes_to_hex_str`, `hexlify`, ...)
  * Update the build system (gitian and travis) to remove python2.7 and replace it with python3.5
  * Another scripted-diff to remove brackets after `assert`. This is unrelated to the python3.5 switch, but a stylistic commit, so probably not worth to split up. The motivation behind it is to avoid asserting on data structures (such as tuples of length one), which never fails:
  ```py
  >>> assert(False,)   # with brackets
  >>> assert False,    # without brackets
  SyntaxError: invalid syntax
  >>> assert False     # proper assertion
  AssertionError
  ```
  * And then a final scripted diff to update the copyright headers in the `test` subfolder, since I touched most of the files anyway and it wouldn't make sense to split this commit out into a separate pull.

  For reference (contributed by luke-jr):

  Ubuntu LTS (bionic): 3.6.5
  Debian stable (stretch): 3.5.3
  RHEL 8 (expected before v0.19): 3.6.x
  Gentoo stable: 3.6.5
  Arch: 3.7.1

Tree-SHA512: 643c28cd2d5b9543ce4bf8ad2a8b282bc79b37dc5b25c9c8358e6ce201e2a67a546463e5f3430b16652eb2489d7c3ed4b0772cd2e2bf790fe68a5e3cc8a25029
@maflcko maflcko deleted the Mf1811-buildPython3 branch March 5, 2019 14:17
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Mar 17, 2019
fa0f92a build: depends: Switch to python3 (MarcoFalke)

Pull request description:

  Actually try to switch to python3 after the incomplete attempts:

  *  Remove Python2 support bitcoin#11881
  *  build: Require python 3.5 bitcoin#14954
  * ...

Tree-SHA512: ba689c3788f2dd91c15d4ff5f6a73219c1a73893c18d3bb8e6da5c35acfef9897c7e100439ce5cac05624c66f7619d13528b60065c36545608fb387aab25e117
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request May 29, 2019
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Nov 18, 2020
97c738f [tests] Recommend f-strings for formatting, update feature_block to use them (Anthony Towns)
8ae9d31 Bump minimum python version to 3.6 (Anthony Towns)

Pull request description:

  Python 3.5 has reached [end-of-life](https://devguide.python.org/#status-of-python-branches) as of September 2020, and 3.6 has some moderately nice [features](https://docs.python.org/3/whatsnew/3.6.html):

  - `f'x = {x}'` as an alternative to `'x = {}'.format(x)` format strings (cf bitcoin/bitcoin#13718 (comment))
  - underscore separators for large numbers, like `1_234_567`
  - improvements to async
  - improvements to typing module

  Note that 3.6 is not available in xenial (16.04), but is available in bionic (18.04), while focal (20.04) has 3.8. CentOS 7 and 8 have 3.6.8, Debian stable has 3.7.3, and [gentoo and arch already had 3.6 and 3.7 in 2018](bitcoin/bitcoin#14954 (comment)).

ACKs for top commit:
  MarcoFalke:
    re-ACK 97c738f

Tree-SHA512: ec7fce68845edde4d61a42de12c065fd49e5217311a6fda1323206f091a0afd50f293645dffc27d420127e4e5deb864e953f1b67eff735a0dfbbedd7899a9d60
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 24, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 25, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 26, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 27, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 30, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 31, 2021
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 11, 2021
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 11, 2021
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 12, 2021
0830d40 docs: add release note for 14954 (fanquake)

Pull request description:

  Adds a release note for bitcoin#14954: build: Require python 3.5.

ACKs for commit 0830d4:

Tree-SHA512: f647c065ef290fb2acb8f55390d8a8cb197372219700bd48777850646c2410b080e1878582ca08c59e6da37ea1dc2d51724e826894dbb7d8a2b218a3b5464a77
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants