Bump python minimum version to 3.8 #27483

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2304-py38- changing 9 files +16 −26
  1. maflcko commented at 11:06 AM on April 18, 2023: member

    There is no pressing reason to drop support for 3.7, however there are several maintenance issues:

    • There is no supported operating system that ships 3.7 by default. (debian:buster is EOL and unmaintained to the extent that it doesn't run in the CI environment. See #27340 (comment))
    • Compiling python 3.7 from source is also unsupported on at least macos, according to #24017 (comment)
    • Recent versions of lief require 3.8, see #27507 (comment)

    Fix all maintenance issues by bumping the minimum.

  2. DrahtBot commented at 11:06 AM on April 18, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake, RandyMcMillan, fjahr
    Concept ACK stickies-v, jamesob
    Stale ACK TheCharlatan

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26222 (Introduce field element and group element classes to test_framework/key.py by sipa)
    • #25797 (build: Add CMake-based build system by hebasto)
    • #24005 (test: add python implementation of Elligator swift by stratospher)

    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.

  3. DrahtBot renamed this:
    Bump python minimum version to 3.8
    Bump python minimum version to 3.8
    on Apr 18, 2023
  4. maflcko added this to the milestone 26.0 on Apr 18, 2023
  5. in doc/dependencies.md:13 in fa45a082b4 outdated
       9 | @@ -10,7 +10,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
      10 |  | [Automake](https://www.gnu.org/software/automake/) | [1.13](https://github.com/bitcoin/bitcoin/pull/18290) |
      11 |  | [Clang](https://clang.llvm.org) | [8.0](https://github.com/bitcoin/bitcoin/pull/24164) |
      12 |  | [GCC](https://gcc.gnu.org) | [8.1](https://github.com/bitcoin/bitcoin/pull/23060) |
      13 | -| [Python](https://www.python.org) (tests) | [3.7](https://github.com/bitcoin/bitcoin/pull/26226) |
      14 | +| [Python](https://www.python.org) (scripts, tests) | [3.8](https://github.com/bitcoin/bitcoin/pull/xyz) |
    


    stickies-v commented at 11:30 AM on April 18, 2023:
    | [Python](https://www.python.org) (scripts, tests) | [3.8](https://github.com/bitcoin/bitcoin/pull/27483) |
    

    maflcko commented at 1:00 PM on April 18, 2023:

    thx, done

  6. stickies-v commented at 11:44 AM on April 18, 2023: contributor

    Concept ACK

    I'm not sure why we're switching to focal instead of bullseye for the qt5 ci, but I don't really have a view either way. Just pointing it out.

  7. maflcko commented at 11:49 AM on April 18, 2023: member

    I'm not sure why we're switching to focal instead of bullseye

    The reason is that bullseye does not have a single of the needed packages:

    (Also, bullseye will be EOL a year earlier than focal)

  8. fanquake commented at 12:59 PM on April 18, 2023: member

    Concept ACK

  9. maflcko force-pushed on Apr 18, 2023
  10. maflcko force-pushed on Apr 18, 2023
  11. maflcko force-pushed on Apr 18, 2023
  12. maflcko force-pushed on Apr 18, 2023
  13. DrahtBot cross-referenced this on Apr 18, 2023 from issue Introduce secp256k1 module with field and group classes to test framework by sipa
  14. maflcko commented at 4:36 PM on April 18, 2023: member

    Unrelated: Looks like there are a few bugs with GCC libstdc++-9:

    So I worked around them.

  15. maflcko referenced this in commit fadb318398 on Apr 18, 2023
  16. maflcko force-pushed on Apr 18, 2023
  17. maflcko referenced this in commit fa677b769d on Apr 18, 2023
  18. maflcko force-pushed on Apr 18, 2023
  19. maflcko referenced this in commit fafa1f09b2 on Apr 18, 2023
  20. maflcko force-pushed on Apr 18, 2023
  21. maflcko referenced this in commit fa04592312 on Apr 18, 2023
  22. maflcko force-pushed on Apr 18, 2023
  23. DrahtBot cross-referenced this on Apr 18, 2023 from issue test: add python implementation of Elligator swift by stratospher
  24. maflcko referenced this in commit faf23a47db on Apr 18, 2023
  25. maflcko force-pushed on Apr 18, 2023
  26. maflcko referenced this in commit fa762d7f52 on Apr 18, 2023
  27. maflcko force-pushed on Apr 18, 2023
  28. DrahtBot added the label CI failed on Apr 19, 2023
  29. DrahtBot removed the label CI failed on Apr 19, 2023
  30. DrahtBot added the label CI failed on Apr 19, 2023
  31. DrahtBot removed the label CI failed on Apr 19, 2023
  32. DrahtBot added the label CI failed on Apr 19, 2023
  33. DrahtBot removed the label CI failed on Apr 19, 2023
  34. DrahtBot added the label CI failed on Apr 19, 2023
  35. DrahtBot removed the label CI failed on Apr 19, 2023
  36. DrahtBot cross-referenced this on Apr 20, 2023 from issue build: Add CMake-based build system by hebasto
  37. jamesob commented at 6:07 PM on April 20, 2023: member

    Concept ACK

  38. jamesob commented at 6:11 PM on April 20, 2023: member

    It looks like the commit message on https://github.com/bitcoin/bitcoin/pull/27483/commits/fa762d7f52db9c65df967f9cb22c6be963ce0300 is out of date, which suggests we're swiching from g++-8 to clang, but the contents of the commit suggest we're going to g++-9 instead.

  39. Bump python minimum version to 3.8
    Also, switch ci_native_qt5 to g++-9 (from g++-8) to work around bugs.
    This should be fine, because the i686_centos task still checks for g++-8
    compatibility.
    
    See
    https://github.com/bitcoin/bitcoin/pull/27483#issuecomment-1513477050
    for the list of bugs.
    88881cf7ac
  40. test: Use python3.8 pow() fa6eb65167
  41. maflcko force-pushed on Apr 21, 2023
  42. maflcko force-pushed on Apr 21, 2023
  43. maflcko commented at 8:20 AM on April 21, 2023: member

    Thanks, fixed typo in commit message

  44. fanquake cross-referenced this on Apr 21, 2023 from issue lint: stop ignoring LIEF imports by fanquake
  45. TheCharlatan approved
  46. TheCharlatan commented at 9:59 AM on April 21, 2023: contributor

    utACK fa6eb6516727a8675dc6e46634d8343e282528ab

  47. fanquake commented at 10:45 AM on April 21, 2023: member

    Should also bump the lint Dockerfile to python:3.8-buster?

  48. maflcko commented at 12:17 PM on April 21, 2023: member

    Should also bump the lint Dockerfile to python:3.8-buster?

    buster is EOL and unmaintained, which is one of the reasons I created this pull, as can be seen in the pull request description. I don't really understand why the lint Dockerfile isn't simply using the exact same distro and setup like the lint CI. Using something else is just going to make it less reproducible and harder to maintain. Though, those changes should probably be made in a separate follow-up pull.

  49. ci: Bump ci/lint/Dockerfile
    This bump should not be needed, see discussion starting at
    https://github.com/bitcoin/bitcoin/pull/27483#issuecomment-1517739626
    fac395e5eb
  50. fanquake commented at 12:32 PM on April 21, 2023: member

    buster is EOL and unmaintained,

    In this context, I don't think that makes any difference, as the container is just an interpreter, so as long as it's downloadable, it should work (no apt installing packages etc).

    I don't really understand why the lint Dockerfile isn't simply using the exact same distro and setup like the lint CI.

    No idea. Maybe ask @jamesob.

    I was mostly pointing it out because it seemed odd to not just bump it as well. Not a blocker if someone else is going to followup.

  51. fanquake approved
  52. fanquake commented at 12:36 PM on April 21, 2023: member

    ACK fac395e5eb2cd3210ba6345f777a586a9bec84e3

  53. DrahtBot requested review from TheCharlatan on Apr 21, 2023
  54. maflcko commented at 12:38 PM on April 21, 2023: member

    it should work (no apt installing packages etc).

    It calls RUN /install.sh, which installs packages

  55. fanquake commented at 12:43 PM on April 21, 2023: member

    It calls RUN /install.sh, which installs packages

    Right. Although it doesn't actually need to do that, as all the packages we need are already available in the base python3.8-buster image.

  56. fanquake referenced this in commit 6f7ece282d on Apr 21, 2023
  57. fanquake referenced this in commit 8f9e1d4a07 on Apr 21, 2023
  58. maflcko requested review from fjahr on Apr 27, 2023
  59. maflcko requested review from stickies-v on Apr 27, 2023
  60. RandyMcMillan commented at 2:43 PM on April 27, 2023: contributor

    ACK fac395e

    #27130 (comment)

  61. fjahr commented at 5:36 PM on April 27, 2023: contributor

    ACK fac395e5eb2cd3210ba6345f777a586a9bec84e3

    This is ok to merge but when I wrote that comment I meant to remove the modinv() function completely, e.g. https://github.com/fjahr/bitcoin/commit/75b8ba524d3dc957910bc8c0a4d1dd2b8ceaa426. You can pull this commit in here or we merge this now and I will open it as a follow-up. I think the comment in modinv() isn't accurate anymore after this change because python seems to use Exponentiation by Squaring and we don't really need a one-line function that and we also don't need to test native python code.

  62. DrahtBot removed review request from fjahr on Apr 27, 2023
  63. maflcko commented at 9:03 AM on April 28, 2023: member

    Thanks. I think it is best for you to open a follow-up, unless people want me to push the commit here.

  64. fanquake commented at 9:09 AM on April 28, 2023: member

    I think it is best for you to open a follow-up,

    Lets do that.

  65. fanquake merged this on Apr 28, 2023
  66. fanquake closed this on Apr 28, 2023

  67. maflcko deleted the branch on Apr 28, 2023
  68. fjahr cross-referenced this on Apr 28, 2023 from issue test: Remove modinv python util helper function by fjahr
  69. sidhujag referenced this in commit 6eba6b1050 on Apr 28, 2023
  70. fanquake referenced this in commit be0325c6a6 on May 1, 2023
  71. kwvg referenced this in commit c0061a353a on May 10, 2023
  72. kwvg referenced this in commit f559b49925 on May 10, 2023
  73. kwvg referenced this in commit 9089511363 on May 10, 2023
  74. PastaPastaPasta referenced this in commit 0b9500f3e9 on May 11, 2023
  75. RandyMcMillan referenced this in commit 3f36723330 on May 27, 2023
  76. RandyMcMillan referenced this in commit 63f0e72e69 on May 27, 2023
  77. janus referenced this in commit e45700a367 on Sep 3, 2023
  78. janus referenced this in commit 32538dcc91 on Sep 3, 2023
  79. knst referenced this in commit 63bea741ce on Oct 19, 2023
  80. knst referenced this in commit 09b8836dc0 on Oct 19, 2023
  81. knst cross-referenced this on Oct 19, 2023 from issue backport: bitcoin#23416,#18997,#18996, partial #27483 (TODO cleanup) by knst
  82. PastaPastaPasta referenced this in commit 6e7b402fe9 on Oct 23, 2023
  83. PastaPastaPasta referenced this in commit dab44cd0b0 on Oct 23, 2023
  84. Fabcien referenced this in commit 364cb01e0a on Feb 5, 2024
  85. Fabcien referenced this in commit 4d6a1ae51b on Feb 5, 2024
  86. bitcoin locked this on Apr 27, 2024

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: 2026-05-20 06:53 UTC