Skip to content

Conversation

@fjahr
Copy link
Contributor

@fjahr fjahr commented Jan 9, 2022

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.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@maflcko maflcko added this to the 24.0 milestone Jan 10, 2022
@maflcko
Copy link
Member

maflcko commented Jan 10, 2022

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.

@ajtowns
Copy link
Contributor

ajtowns commented Jan 10, 2022

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?

@fanquake
Copy link
Member

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

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

@fjahr
Copy link
Contributor Author

fjahr commented Jan 11, 2022

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.

@maflcko
Copy link
Member

maflcko commented Jan 11, 2022

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?

@maflcko
Copy link
Member

maflcko commented Jan 11, 2022

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

@fjahr
Copy link
Contributor Author

fjahr commented Jan 11, 2022

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.

@fjahr fjahr closed this Jan 11, 2022
@dunxen
Copy link
Contributor

dunxen commented Apr 24, 2022

I think we could look at bumping to at least 3.8 now if you'd like to reopen this?

@fanquake
Copy link
Member

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

Why?

@dunxen
Copy link
Contributor

dunxen commented Apr 24, 2022

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).

@maflcko maflcko modified the milestones: 24.0, 25.0 Apr 24, 2022
@maflcko
Copy link
Member

maflcko commented Apr 24, 2022

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?

@dunxen
Copy link
Contributor

dunxen commented Apr 24, 2022

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?

@maflcko
Copy link
Member

maflcko commented Apr 24, 2022

Bionic ships with clang-10: See e7db4e2

@fanquake
Copy link
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.

@dunxen
Copy link
Contributor

dunxen commented Apr 25, 2022

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 🙂

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work, but #26226 should work

export DOCKER_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
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
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic clang-7 can compile our C++17, see doc/dependencies.md
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3-zmq installs python3 (3.6), which is picked by the functional tests (shebang python3), so this doesn't actually work

fanquake added a commit to bitcoin-core/gui that referenced this pull request Apr 28, 2023
fac395e ci: Bump ci/lint/Dockerfile (MarcoFalke)
fa6eb65 test: Use python3.8 pow() (MarcoFalke)
88881cf Bump python minimum version to 3.8 (MarcoFalke)

Pull request description:

  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 bitcoin/bitcoin#27340 (comment))
  * Compiling python 3.7 from source is also unsupported on at least macos, according to bitcoin/bitcoin#24017 (comment)
  * Recent versions of lief require 3.8, see bitcoin/bitcoin#27507 (comment)

  Fix all maintenance issues by bumping the minimum.

ACKs for top commit:
  RandyMcMillan:
    ACK fac395e
  fjahr:
    ACK fac395e
  fanquake:
    ACK fac395e

Tree-SHA512: c198decdbbe29d186d73ea3f6549d8a38479383495d14a965a2f9211ce39637b43f13a4c2a5d3bf56e2d468be4bbe49b4ee8e8e19ec69936ff43ddf2b714c712
@bitcoin bitcoin locked and limited conversation to collaborators Oct 11, 2023
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