Bump minimum python version to 3.6 #19504

pull ajtowns wants to merge 2 commits into bitcoin:master from ajtowns:202007-python3.6 changing 7 files +15 −15
  1. ajtowns commented at 5:26 am on July 13, 2020: member

    Python 3.5 has reached end-of-life as of September 2020, and 3.6 has some moderately nice features:

    • f'x = {x}' as an alternative to 'x = {}'.format(x) format strings (cf #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.

  2. fanquake added the label Build system on Jul 13, 2020
  3. MarcoFalke commented at 5:40 am on July 13, 2020: member

    review ACK, but I am not sure if we need to push this into the upcoming release. Is there any reason this can’t wait 3.5 months? While xenial has a c++17 compiler, but lacks a c++17 compatible stdlib, xenial will die anyway. No strong opinion, though.

    Might need to update the travis yaml python linter version?

  4. DrahtBot commented at 5:51 am on July 13, 2020: 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:

    • #19179 (ci: Run ci configs on cirrus by MarcoFalke)

    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.

  5. ajtowns force-pushed on Jul 13, 2020
  6. ajtowns commented at 6:12 am on July 13, 2020: member
    No objection to letting it wait; mostly just thought it made more sense to do a PR directly than open a “python 3.5 is nearing eol” issue.
  7. practicalswift commented at 9:23 am on July 13, 2020: contributor
    Concept ACK: alive is better than end-of-life
  8. MarcoFalke added this to the milestone 0.21.0 on Jul 13, 2020
  9. MarcoFalke removed this from the milestone 0.21.0 on Jul 13, 2020
  10. MarcoFalke added this to the milestone 0.22.0 on Jul 13, 2020
  11. MarcoFalke commented at 9:40 am on July 13, 2020: member

    Assigned 0.22.0 milestone with proposed merge date of Nov 1st.

    If python 3.6 is needed to simplify mypy, then it can be merged sooner #19389 (comment)

  12. jnewbery commented at 10:31 am on July 13, 2020: member
    Concept ACK
  13. Sjors commented at 3:41 pm on July 14, 2020: member
    Concept ACK. No strong preference on when, but having it coincide with our C++17 bump makes sense.
  14. in .python-version:1 in 2b53176fd0 outdated
    0@@ -1 +1 @@
    1-3.5.6
    2+3.6.5
    


    Sjors commented at 3:42 pm on July 14, 2020:
    This is only used by PyEnv, which can install the more modern 3.6.11 just as well.

    ajtowns commented at 5:55 pm on October 1, 2020:
    updated to 3.6.12 released in August

    Sjors commented at 6:09 pm on October 1, 2020:
    Python 3.6.12 is not yet availabe via Homebrew’s PyEnv, but that should be fixed by the time this lands. I just manually switched to 3.6.11 for testing. https://github.com/pyenv/pyenv/pull/1680#issuecomment-701478171
  15. laanwj commented at 1:49 pm on July 15, 2020: member
    I like Python 3.6’s improvements a lot,1 concept ACK if/when the Linux distributions we support building on have it.
  16. in ci/test/00_setup_env_native_nowallet.sh:10 in 2b53176fd0 outdated
     6@@ -7,8 +7,8 @@
     7 export LC_ALL=C.UTF-8
     8 
     9 export CONTAINER_NAME=ci_native_nowallet
    10-export DOCKER_NAME_TAG=ubuntu:16.04  # Use xenial to have one config run the tests in python3.5, see doc/dependencies.md
    11-export PACKAGES="python3-zmq clang-3.8 llvm-3.8"  # Use clang-3.8 to test C++11 compatibility, see doc/dependencies.md
    12+export DOCKER_NAME_TAG=ubuntu:18.04  # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md (3.6 is not available in xenial/16.04)
    


    MarcoFalke commented at 4:47 am on July 16, 2020:
    the travis yaml will need to be updated as well (name of the config)

    ajtowns commented at 5:55 pm on October 1, 2020:
    updated travis yaml
  17. troygiorshev commented at 6:22 pm on July 16, 2020: contributor

    Concept ACK

    If python 3.6 is needed to simplify mypy, then it can be merged sooner #19389 (comment)

    From what I can tell right now, I don’t think this will be the case. I think we’ll be ok with 3.5.

  18. fjahr commented at 9:05 am on July 17, 2020: member

    tested ACK 2b53176fd0a2d594ee7833397d3b32c59d1bbae0

    Agree this can wait a bit and be done with c++17.

  19. fanquake commented at 6:46 am on July 28, 2020: member
    Concept ACK. No mention of 3.6+ related typing improvements in the op, which is probably what I’m most interested in. I wouldn’t be overly concerned about CentOS 7 or Xenial support here.
  20. DrahtBot added the label Needs rebase on Aug 5, 2020
  21. theStack commented at 0:42 am on September 6, 2020: member
    Strong concept ACK (no need to rush though, as others already stated doing this along with the C++17 bump seems reasonable).
  22. kristapsk commented at 6:27 pm on September 7, 2020: contributor
    Concept ACK
  23. MarcoFalke commented at 7:17 am on October 1, 2020: member
    @ajtowns Are you still working on this? Would be good to rebase and address the feedback
  24. ajtowns force-pushed on Oct 1, 2020
  25. Sjors commented at 6:18 pm on October 1, 2020: member
    tACK ef0b760 on macOS 10.15.7
  26. DrahtBot removed the label Needs rebase on Oct 1, 2020
  27. kristapsk commented at 7:07 pm on October 1, 2020: contributor
    • Use f'{x}' for string formatting in preference to '{}'.format(x) or '%s' % x.

    This PR changes this in test/functional/feature_block.py, but there are other places where .format is still used, shouldn’t it be changed everywhere then?

    Also, maybe some linter script could be added that checks .py files for this?

    But probably that’s out of scope of this PR and can be done in follow-up PR(s).

  28. ajtowns commented at 7:41 pm on October 1, 2020: member
    • Use f'{x}' for string formatting in preference to '{}'.format(x) or '%s' % x.

    This PR changes this in test/functional/feature_block.py, but there are other places where .format is still used, shouldn’t it be changed everywhere then?

    It’s changed there so that CI tests that it works (eg, failing if an older version of python is being used) and as an example for what the style looks like. General policy is to update code to new style guidelines only when the code is touched for other reasons, so really even doing that is pushing it :)

  29. in ci/test/00_setup_env_native_nowallet.sh:14 in ef0b7604cb outdated
    12+export DOCKER_NAME_TAG=ubuntu:18.04  # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md (3.6 is not available in xenial/16.04)
    13+export PACKAGES="python3-zmq clang-3.9 llvm-3.9"  # Use clang-3.9 to test C++11 compatibility, see doc/dependencies.md (3.8 is not available in bionic)
    14 export DEP_OPTS="NO_WALLET=1"
    15 export GOAL="install"
    16-export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CC=clang-3.8 CXX=clang++-3.8 --with-boost-process"
    17+export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CC=clang-3.8 CXX=clang++-3.9 --with-boost-process"
    


    fanquake commented at 5:51 am on October 2, 2020:
    0export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CC=clang-3.9 CXX=clang++-3.9 --with-boost-process"
    

    MarcoFalke commented at 9:54 am on October 16, 2020:
    @ajtowns Mind fixing the typo, so that ci passes here?

    ajtowns commented at 2:38 pm on October 17, 2020:
    Thought I’d done that already… Done now anyway
  30. practicalswift commented at 1:51 pm on October 16, 2020: contributor
    ACK modulo fix for CI failure :)
  31. ajtowns force-pushed on Oct 17, 2020
  32. MarcoFalke commented at 9:21 am on October 19, 2020: member

    ACK 9bc4cdf0beb95072ab33b418349df8f7217b329d

    for 0.22

  33. in .travis.yml:86 in ea39d8bc9e outdated
    109@@ -110,7 +110,7 @@ jobs:
    110         FILE_ENV="./ci/test/00_setup_env_native_multiprocess.sh"
    111 
    112     - stage: test
    113-      name: 'x86_64 Linux  [GOAL: install]  [xenial]  [no wallet]'
    114+      name: 'x86_64 Linux  [GOAL: install]  [bionic]  [no wallet]'
    


    MarcoFalke commented at 7:54 pm on November 4, 2020:

    in commit ea39d8bc9e1b7c23486abc5b28a20d4660fe93dd:

    Sorry this needs a rebase. I tried to avoid that, but it seems git merge isn’t as smart as patch when it comes to line-offsets.

     0$ git show ea39d8bc9e1b7c23486abc5b28a20d4660fe93dd | patch -p1 --dry-run 
     1checking file .python-version
     2checking file .travis.yml
     3Hunk [#2](/bitcoin-bitcoin/2/) succeeded at 90 with fuzz 1 (offset -20 lines).
     4checking file ci/test/00_setup_env_native_nowallet.sh
     5checking file configure.ac
     6checking file doc/dependencies.md
     7
     8$ git merge ea39d8bc9e1b7c23486abc5b28a20d4660fe93dd
     9Auto-merging doc/dependencies.md
    10Auto-merging configure.ac
    11Auto-merging .travis.yml
    12CONFLICT (content): Merge conflict in .travis.yml
    13Automatic merge failed; fix conflicts and then commit the result.
    

    ajtowns commented at 9:21 am on November 18, 2020:
    Done
  34. MarcoFalke added the label Needs rebase on Nov 4, 2020
  35. Bump minimum python version to 3.6 8ae9d314e9
  36. [tests] Recommend f-strings for formatting, update feature_block to use them 97c738ff1b
  37. ajtowns force-pushed on Nov 9, 2020
  38. MarcoFalke commented at 8:20 am on November 9, 2020: member

    re-ACK 97c738ff1b

    for 22.0 only change is rebase

  39. DrahtBot removed the label Needs rebase on Nov 9, 2020
  40. MarcoFalke merged this on Nov 18, 2020
  41. MarcoFalke closed this on Nov 18, 2020

  42. sidhujag referenced this in commit 11a4e5aa0c on Nov 18, 2020
  43. barton2526 referenced this in commit f4c09518fb on Jul 12, 2021
  44. luke-jr referenced this in commit 1cd9a93a36 on Dec 14, 2021
  45. DrahtBot locked this on Feb 15, 2022

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-12-18 15:12 UTC

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