Bump Python dependency version #24017

pull fjahr wants to merge 1 commits into bitcoin:master from fjahr:2022-01-python36 changing 8 files +10 −11
  1. fjahr commented at 6:14 pm on January 9, 2022: contributor

    Python 3.6 had it’s end-of-life in December 2021. While there are still versions available for download on the Python website, it has been removed from homebrew already for example and will not receive security updates going forward. It seems appropriate to bump the minimum version soon.

    While bumping to 3.7 would be completely fine it couldn’t see any major downsides to go straight to 3.8. 3.8 is the the default version in Ubuntu 20.04.

    The second commit resolves a TODO that is very straight forward when 3.8 is the minimum version.

  2. DrahtBot added the label Build system on Jan 9, 2022
  3. in ci/test/00_setup_env_native_nowallet.sh:10 in 702032223d outdated
     6@@ -7,7 +7,7 @@
     7 export LC_ALL=C.UTF-8
     8 
     9 export CONTAINER_NAME=ci_native_nowallet
    10-export DOCKER_NAME_TAG=ubuntu:18.04  # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
    


    fanquake commented at 1:17 am on January 10, 2022:
    I think we could still leave this as 18.04, so we’ve got GCC and Clang builds on Bionic.

    fjahr commented at 0:00 am on January 11, 2022:
    Ah, makes sense, I missed that this one was covering bionic + clang as well. Fixed and amended the comment too.
  4. fanquake commented at 1:19 am on January 10, 2022: member

    Could also need other docs changes, i.e apt install python3 would no longer be sufficient on Bionic.

    Unless there are some significant advantages to requiring 3.7 or 3.8, I don’t think there is a rush to do this.

  5. maflcko added this to the milestone 24.0 on Jan 10, 2022
  6. maflcko commented at 7:45 am on January 10, 2022: member
    EOL of python doesn’t really mean anything to us, as it is only used locally to run the tests and stuff. Python 3.6 is known to be functional to run the tests, so there is no rush to remove it. I think at the very least we can wait one more month and wait for 23.x to be branched off (#22969), in which case this could go into 24.x.
  7. ajtowns commented at 8:06 am on January 10, 2022: contributor

    18.04 bionic’s end of standard support is 2023-04, it has python 3.6, gcc 7.4 and clang 6.0 Debian 10 (buster/oldstable)’s end of support is 2022-08, it has python 3.7, gcc 8.3 and clang 7.0

    If we consider both of those distros as unsupported, I think we could assume minimum versions of python 3.8, g++ 9, clang, 10:

    Ubuntu 20.04 python 3.8 g++ 9.3 clang 10.0 Debian 11 python 3.9 g++ 10.2.1 clang 11.0 Apple XCode python (3.8?) 13.2.1 clang 12.0

    (RHEL8, FreeBSD, Arch, Gentoo all seem to support upgrading to the latest version via one method or another, as far as I can see?)

    If we want to keep supporting gcc 7.4 and clang 6, I think it makes sense to also keep supporting python 3.6 so we can easily use bionic as a test platform. I guess my preference would be to defer to 24.0 or 25.0, unless there’s some feature from newer versions of python/g++/clang that justify doing it earlier?

  8. fanquake commented at 8:13 am on January 10, 2022: member

    If we want to keep supporting gcc 7.4 and clang 6,

    We have already dropped support for both of those in master.

  9. Bump Python dependency to 3.7 dda45a5a81
  10. fjahr force-pushed on Jan 11, 2022
  11. fjahr commented at 0:14 am on January 11, 2022: contributor

    Could also need other docs changes, i.e apt install python3 would no longer be sufficient on Bionic.

    I did a quick grep and made some additional changes

    Unless there are some significant advantages to requiring 3.7 or 3.8, I don’t think there is a rush to do this.

    The new pow() function would have been nice for the second commit and there would have been some other nice to haves but as I mentioned in the initial description, not needed. So I changed to 3.7 and dropped the second commit.

    EOL of python doesn’t really mean anything to us, as it is only used locally to run the tests and stuff. Python 3.6 is known to be functional to run the tests, so there is no rush to remove it.

    Sure, but as it gets less and less likely that developers don’t have a newer version of python already available in their environment I also don’t see a reason not to upgrade which allows us to use new features.

  12. maflcko commented at 8:41 am on January 11, 2022: member

    Sure, but as it gets less and less likely that developers don’t have a newer version of python already available in their environment I also don’t see a reason not to upgrade which allows us to use new features.

    I couldn’t find any new features in python 3.7 that might affect us, so I don’t see a reason to bump the minimum. It is possible to run the tests with both python 3.7 and 3.6 before and after this pull request, so what is the point in bumping?

  13. maflcko commented at 8:50 am on January 11, 2022: member
    In the current state this pull is just a “clean” duplicate of https://github.com/bitcoin/bitcoin/pull/23270
  14. fjahr commented at 8:08 pm on January 11, 2022: contributor

    In the current state this pull is just a “clean” duplicate of #23270

    Ah, I was search for another PR that was doing the same but probably I was only looking at open PRs. I guess I will close this then, in case there is interest in this change in the future it can be reopened.

  15. fjahr closed this on Jan 11, 2022

  16. abjselfdestructive approved
  17. dunxen commented at 10:21 am on April 24, 2022: contributor
    I think we could look at bumping to at least 3.8 now if you’d like to reopen this?
  18. fanquake commented at 10:58 am on April 24, 2022: member

    I think we could look at bumping to at least 3.8 now

    Why?

  19. dunxen commented at 11:23 am on April 24, 2022: contributor

    I think we could look at bumping to at least 3.8 now

    Why?

    It looks like more recent versions of Apple Clang can’t build for 3.6, 3.7 when using pyenv install from source or the like which is useful for version management on macOS. Not sure if that’s a widespread enough reason though as there are more manual (albeit messy) alternatives. (I usually end up bumping .python-version) on my end locally because it’s easier.

    The 3.8 minimum was just suggested because of #24017 (comment).

  20. maflcko removed this from the milestone 24.0 on Apr 24, 2022
  21. maflcko added this to the milestone 25.0 on Apr 24, 2022
  22. maflcko commented at 11:49 am on April 24, 2022: member

    2023-04 is still a year out, so 25.0 seems the earliest?

    To work around the macos bugs with python 3.6/7 you can install 3.8 locally on your system?

  23. dunxen commented at 11:55 am on April 24, 2022: contributor

    2023-04 is still a year out, so 25.0 seems the earliest?

    To work around the macos bugs with python 3.6/7 you can install 3.8 locally on your system?

    But it seems the Bionic gcc and clang versions already have support dropped anyway as per #24017 (comment).

    So don’t think we need to wait for 25.0, unless I misunderstood?

  24. maflcko commented at 12:35 pm on April 24, 2022: member
  25. fanquake commented at 8:54 am on April 25, 2022: member

    It looks like more recent versions of Apple Clang can’t build for 3.6, 3.7 when using pyenv install from source

    I don’t think a single install method, on a single platform, no-longer working is grounds for bumping the project wide minimum. Especially since you can potentially use a different install method, or just install and use a newer version of Python. I’d suggest just pyenv-installing and using 3.10.

    (I usually end up bumping .python-version) on my end locally because it’s easier.

    If you don’t want to have to modify .python-version you can also set PYENV_VERSION when invoking Python inside the repo.

  26. dunxen commented at 10:09 am on April 25, 2022: contributor

    I don’t think a single install method, on a single platform, no-longer working is grounds for bumping the project wide minimum.

    Yeah, agreed 🙂

  27. in ci/test/00_setup_env_native_nowallet.sh:11 in dda45a5a81
     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:18.04  # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
    11-export PACKAGES="python3-zmq clang-7 llvm-7 libc++abi-7-dev libc++-7-dev"  # Use clang-7 to test C++17 compatibility, see doc/dependencies.md
    12+export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic clang-7 can compile our C++17, see doc/dependencies.md
    13+export PACKAGES="python3.7 python3-zmq clang-7 llvm-7 libc++abi-7-dev libc++-7-dev"  # Use clang-7 to test C++17 compatibility, see doc/dependencies.md
    


    maflcko commented at 1:28 pm on October 3, 2022:
    python3-zmq installs python3 (3.6), which is picked by the functional tests (shebang python3), so this doesn’t actually work
  28. maflcko commented at 1:28 pm on October 3, 2022: member
    This doesn’t work, but #26226 should work
  29. fanquake referenced this in commit d89aca1bdb on Apr 28, 2023
  30. bitcoin locked this on Oct 11, 2023

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-10-04 22:12 UTC

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