build: Require python 3.5 #14954

pull MarcoFalke wants to merge 6 commits into bitcoin:master from MarcoFalke:Mf1811-buildPython3 changing 88 files +492 −621
  1. MarcoFalke commented at 8:51 pm on December 13, 2018: member

    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:
    0>>> assert(False,)   # with brackets
    1>>> assert False,    # without brackets
    2SyntaxError: invalid syntax
    3>>> assert False     # proper assertion
    4AssertionError
    
    • 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

  2. MarcoFalke added the label Build system on Dec 13, 2018
  3. MarcoFalke added the label Needs release notes on Dec 13, 2018
  4. MarcoFalke added this to the milestone 0.19.0 on Dec 13, 2018
  5. luke-jr commented at 8:59 pm on December 13, 2018: member

    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

  6. MarcoFalke force-pushed on Dec 13, 2018
  7. jnewbery commented at 9:20 pm on December 13, 2018: member

    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:

  8. DrahtBot commented at 9:38 pm on December 13, 2018: member

    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.

  9. practicalswift commented at 8:55 am on December 14, 2018: contributor
    Concept ACK
  10. DrahtBot added the label Needs rebase on Dec 28, 2018
  11. MarcoFalke force-pushed on Dec 28, 2018
  12. DrahtBot removed the label Needs rebase on Dec 28, 2018
  13. fanquake commented at 10:33 am on December 31, 2018: member
    Concept ACK. +1 on being able to start using Type Hints.
  14. MarcoFalke force-pushed on Jan 29, 2019
  15. Sjors commented at 10:32 am on January 30, 2019: member
    Concept ACK
  16. MarcoFalke added the label Needs gitian build on Feb 5, 2019
  17. DrahtBot removed the label Needs gitian build on Feb 6, 2019
  18. MarcoFalke added the label Needs gitian build on Feb 14, 2019
  19. MarcoFalke deleted a comment on Feb 14, 2019
  20. MarcoFalke force-pushed on Feb 14, 2019
  21. DrahtBot removed the label Needs gitian build on Feb 15, 2019
  22. MarcoFalke force-pushed on Feb 18, 2019
  23. MarcoFalke force-pushed on Feb 18, 2019
  24. MarcoFalke force-pushed on Feb 20, 2019
  25. MarcoFalke force-pushed on Feb 20, 2019
  26. MarcoFalke force-pushed on Feb 21, 2019
  27. MarcoFalke force-pushed on Feb 21, 2019
  28. MarcoFalke force-pushed on Feb 21, 2019
  29. MarcoFalke force-pushed on Feb 21, 2019
  30. MarcoFalke force-pushed on Feb 21, 2019
  31. MarcoFalke force-pushed on Feb 21, 2019
  32. MarcoFalke force-pushed on Feb 21, 2019
  33. MarcoFalke force-pushed on Feb 21, 2019
  34. MarcoFalke force-pushed on Feb 21, 2019
  35. MarcoFalke force-pushed on Feb 21, 2019
  36. MarcoFalke force-pushed on Feb 21, 2019
  37. MarcoFalke renamed this:
    WIP: build: Require python 3.5
    build: Require python 3.5
    on Feb 21, 2019
  38. MarcoFalke force-pushed on Feb 21, 2019
  39. MarcoFalke deleted a comment on Feb 21, 2019
  40. MarcoFalke commented at 3:15 pm on February 21, 2019: member
    @jnewbery You might be interested in reviewing this, since it removes some python2.7 leftovers from “Remove Python2 support” in #11881
  41. jnewbery commented at 3:25 pm on February 21, 2019: member

    Looks good. I especially like scripted-diff: test: Remove brackets after assert :100: Is there a flake warning we can add to enforce in that in future?

    This is for inclusion in v0.19, so I’ll review after v0.18 is forked.

  42. DrahtBot added the label Needs rebase on Feb 26, 2019
  43. MarcoFalke force-pushed on Mar 2, 2019
  44. MarcoFalke force-pushed on Mar 2, 2019
  45. DrahtBot removed the label Needs rebase on Mar 2, 2019
  46. scripted-diff: test: Use py3.5 bytes::hex() method
    -BEGIN VERIFY SCRIPT-
    sed -i -e "s/def bytes_to_hex_str/def b_2_x/g" $(git grep -l bytes_to_hex_str)
    
    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 (())
    
    export RE_M="(b2x|bytes_to_hex_str)\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\)"
    
    sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g"      $(git grep -l -E '(b2x|bytes_to_hex_str)')
    
    sed -i --regexp-extended -e "/  +bytes_to_hex_str( as b2x)?,/d"    $(git grep -l bytes_to_hex_str)
    sed -i --regexp-extended -e "s/ +bytes_to_hex_str( as b2x)?,//g"   $(git grep -l bytes_to_hex_str)
    sed -i --regexp-extended -e "s/, bytes_to_hex_str( as b2x)?//g"    $(git grep -l bytes_to_hex_str)
    
    export RE_M="(binascii\.)?hexlify\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\).decode\(${RE_B_0}\)"
    
    sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l hexlify -- ':(exclude)share')
    
    sed -i --regexp-extended -e  "/from binascii import hexlify$/d" $(git grep -l hexlify -- ':(exclude)share')
    sed -i --regexp-extended -e "s/(from binascii import) .*hexlify/\1 unhexlify/g" $(git grep -l hexlify -- ':(exclude)share')
    
    sed -i -e 's/ignore-names "/ignore-names "b_2_x,/g' ./test/lint/lint-python-dead-code.sh
    -END VERIFY SCRIPT-
    fa6bf21f5e
  47. build: Require python 3.5 fab5a1e0f4
  48. MarcoFalke force-pushed on Mar 2, 2019
  49. scripted-diff: test: Remove brackets after assert
    -BEGIN VERIFY SCRIPT-
    sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test)
    -END VERIFY SCRIPT-
    fa0e65b772
  50. MarcoFalke force-pushed on Mar 2, 2019
  51. scripted-diff: Update copyright in ./test
    -BEGIN VERIFY SCRIPT-
    ./contrib/devtools/copyright_header.py update ./test/
    -END VERIFY SCRIPT-
    faa7cdf764
  52. MarcoFalke force-pushed on Mar 2, 2019
  53. MarcoFalke commented at 4:02 pm on March 2, 2019: member
    Rebased
  54. practicalswift commented at 4:36 pm on March 2, 2019: contributor
    utACK faa7cdf764a651975fa3c780df7df206a08254c2
  55. Sjors commented at 4:50 pm on March 2, 2019: member
    tACK faa7cdf except PyEnv needs a full version number, i.e. 3.5.6. With that, I was able to run make check and the functional test suite on macOS 10.14.3, but I didn’t try the various linters and other tools.
  56. .python-version: Specify full version 3.5.6 dddd1d05d3
  57. MarcoFalke added the label Needs gitian build on Mar 2, 2019
  58. Sjors commented at 6:11 pm on March 2, 2019: member
    utACK dddd1d0. Travis failure on p2p_invalid_messages.py seems spurious.
  59. jnewbery commented at 6:12 pm on March 2, 2019: member

    Travis failure on p2p_invalid_messages.py seems spurious.

    I restarted the job.

  60. practicalswift commented at 9:29 am on March 3, 2019: contributor
    utACK dddd1d05d3df06865f5e0b1442d7425c0955de4e
  61. DrahtBot commented at 12:24 pm on March 3, 2019: member

    Gitian builds for commit 789b0bbf2afcbaa5ce2b99945aa4b02866a61972 (master):

    Gitian builds for commit 22b1bf35ab988d7f45150fbef9c7be4615899cc8 (master and this pull):

  62. DrahtBot removed the label Needs gitian build on Mar 3, 2019
  63. test: Remove python3.4 workaround in feature_dbcrash fa2797808e
  64. MarcoFalke force-pushed on Mar 4, 2019
  65. Sjors commented at 9:38 am on March 5, 2019: member
    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.
  66. MarcoFalke merged this on Mar 5, 2019
  67. MarcoFalke closed this on Mar 5, 2019

  68. MarcoFalke referenced this in commit a74d588f21 on Mar 5, 2019
  69. MarcoFalke deleted the branch on Mar 5, 2019
  70. MarcoFalke referenced this in commit acbbb7bf0d on Mar 17, 2019
  71. MarcoFalke removed the label Needs release note on May 17, 2019
  72. MarcoFalke referenced this in commit abcce46a33 on May 29, 2019
  73. MarcoFalke referenced this in commit 4b24c3962f on Nov 18, 2020
  74. PastaPastaPasta referenced this in commit 4587f39aa5 on Jun 27, 2021
  75. PastaPastaPasta referenced this in commit cef26f46b7 on Jun 28, 2021
  76. PastaPastaPasta referenced this in commit dcfe04d92c on Jun 29, 2021
  77. kittywhiskers referenced this in commit da1597e296 on Aug 24, 2021
  78. kittywhiskers referenced this in commit 3ec7f2fdef on Aug 24, 2021
  79. kittywhiskers referenced this in commit e124eedeac on Aug 25, 2021
  80. kittywhiskers referenced this in commit 7dd062e9bb on Aug 26, 2021
  81. kittywhiskers referenced this in commit e73e88fde2 on Aug 26, 2021
  82. kittywhiskers referenced this in commit e4a75b6682 on Aug 27, 2021
  83. kittywhiskers referenced this in commit c2913e13d9 on Aug 30, 2021
  84. kittywhiskers referenced this in commit 0b13db2ac5 on Aug 31, 2021
  85. PastaPastaPasta referenced this in commit 4529d03f4c on Sep 11, 2021
  86. PastaPastaPasta referenced this in commit 158f93a721 on Sep 11, 2021
  87. PastaPastaPasta referenced this in commit 721b38c056 on Sep 12, 2021
  88. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-06 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me