Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.7 #8025

Closed
OscarL opened this issue Mar 20, 2023 · 18 comments
Closed

Drop support for Python 3.7 #8025

OscarL opened this issue Mar 20, 2023 · 18 comments

Comments

@OscarL
Copy link
Contributor

OscarL commented Mar 20, 2023

As beta4 uses Python 3.9 as default, and as Python versions 3.7 and 3.8 are in "Source-only security fix releases" mode (with even less than 3 months of that for 3.7), we should drop support for the older ones (adding support for Python 3.10 where possible). Edit: scope for this issue has changed following discussion on comments below.

As beta4 uses Python 3.9 as default, and as Python versions 3.7 is nearing EOL, we'll be dropping support for it (and also for Python 2.7 package that might still remain), while adding support for Python 3.10 where possible.

To help keep track of the progress on this regard, I'll add some tasks list:

Regular packages (recipes not under dev-python/):

List of *. recipes that contain either of:

- "cmd:python3.7"
- "_python3$"
- "libpython.*m"

(and for Python 2.x: _python$, cmd:python$ and libpython2)

Python packages (recipes under dev-python/):

List of *.recipe files for Python packages that contain either of:

- "PYTHON_VERSIONS*=(3.7"
- "(python)"
- "PYTHON_PACKAGES*=(python3)"
- "PYTHON_PACKAGES*=(python python3"
- "_python3$".

(and for Python 2.x: _python$ and cmd:python$)

@korli
Copy link
Contributor

korli commented Mar 21, 2023

python 3.8 is still supported whatever you understand.

@OscarL
Copy link
Contributor Author

OscarL commented Mar 21, 2023

You mean supported by PSF, or in Haiku?

I asked on IRC if we should move away from both 3.7 and 3.8, and @pulkomandy, at least, said yes,

I understand that lots of stuff still depend on Py 3.7 and 3.8 (thus the lists), and my intention was start moving forward the packages with low impact. I wasn't planning to remove Python 3.7 and Python 3.8 right away (breaking things), if that's the concern.

In any case, I'll wait for confirmation on how to proceed.

@korli
Copy link
Contributor

korli commented Mar 21, 2023

You wrote "Python versions 3.7 and 3.8 are in "Source-only security fix releases" mode" as a reason for this issue. But only 3.7 is soon EOL. We switched to 3.9 only three months ago, please give users some time before removing anything.

@OscarL
Copy link
Contributor Author

OscarL commented Mar 21, 2023

Alright.

Guess moving low impact packages from 3.7 to 3.9 would still be OK? Or would you rather prefer to see PRs that only add 3.9/3.10 support if missing?

@korli
Copy link
Contributor

korli commented Mar 21, 2023

Alright.

Guess moving low impact packages from 3.7 to 3.9 would still be OK? Or would you rather prefer to see PRs that only add 3.9/3.10 support if missing?

Sure, moving away from 3.7 when upgrading versions is OK.

@pulkomandy
Copy link
Member

We switched to 3.9 only three months ago

My reasoning for saying it's ok to remove 3.7 and 3.8:

  • Beta 4 introduced Python 3.9 as the new default
  • The previous default was 3.7 in beta3

As a result, Python 3.8 does not need to be supported in the long term. And PYthon 3.7 is replaced by 3.9 so there is no need to support it anymore.

Is this moving too fast? If so, what is the correct timelin for this? Should we keep Python 3.7 as "deprecated" until the next beta release of Haiku? Or is it just "wait a few months"? Are there reasons to keep Python 3.8 a little longer?

@korli
Copy link
Contributor

korli commented Mar 21, 2023

IMO it's irrelevant when Beta 4 switched to Python 3.9 as the new default. If users use Python 3.8 and vendor packages for their own python scripts, they should be given some time to upgrade (6 months seem reasonable). Python 3.7 won't be supported long upstream, so that's another case.
Issuing a warning on the forums is also an idea.

@OscarL OscarL changed the title Drop support for Python 3.7 and Python 3.8 Drop support for Python 3.7 Mar 22, 2023
korli added a commit that referenced this issue Mar 23, 2023
Recipes with only 3.7 are left alone. Help with #8025.
@Begasus
Copy link
Contributor

Begasus commented Mar 30, 2023

@threedeyes most of the qt packages are still using python3.7, did a few already (see list above), any reason why python is involved in them? (haven't seen any mention in the configure/build process?)

For qmdnsengine I can't find any reference to python aside from some doxygen references?
https://github.com/nitroshare/qmdnsengine/search?q=python

@Begasus
Copy link
Contributor

Begasus commented Apr 7, 2023

libcec (removed python dependency): #8302

win8linux pushed a commit to win8linux/haikuports that referenced this issue Apr 14, 2023
Recipes with only 3.7 are left alone. Help with haikuports#8025.
@OscarL
Copy link
Contributor Author

OscarL commented May 14, 2023

All the qt6* ones are off the list today... thanks a lot @threedeyes!!!

@OscarL
Copy link
Contributor Author

OscarL commented May 26, 2023

@pulkomandy: Tried to run a build for u-boot (trying to see if it builds OK after changing setuptools_python3 to setuptools_python39). Ran into 2 issues:

  • Haikuporter complains that the there's a patchset file not being referenced from the recipe. ("solved" it temporarily by renaming it, just to test).
  • The build fails with the following errors:
runtime_loader: Cannot open file libmpfr.so.4 (needed by /boot/system/develop/tools/arm-none-eabi/lib/gcc/arm-none-eabi/6.4.0/cc1): No such file or directory
Kconfig:66: syntax error
Kconfig:65: invalid option
scripts/kconfig/Makefile:96: recipe for target 'mk802ii_defconfig' failed

Tried manually installing all the available "mpfr" packages, and verifying the lib is where it is supposed to... same result.

Questions:

Besides this libmpfr.so.4 issue that might be a new issue with the arm-none-eabi-gcc package... Is the recipe a WIP, or it should be buildable?

If the later, do you think we can just switch to setuptools_python39 instead of the 3.7 one? (saw some Python 3.9 references in the work-dir but... just trying to be sure, as I can't build it locally).

TIA.

@pulkomandy
Copy link
Member

Haikuporter complains that the there's a patchset file not being referenced from the recipe. ("solved" it temporarily by renaming it, just to test).

It seems I just forgot the PATCHES in the recipe and that should be added, rather than ignoring the patch?

I had this working when I pushed it, otherwise I would have marked the recipe as broken. I have used the resulting uboot binaries on an ARM system and managed to get haiku_loader running with it.

The first problem appears to be a missing dependency of arm-none-eabi-gcc to lib:libmpfr$secondaryArchSuffix.

Also I'm a bit confused why you ask this in a thread about Python 3.7?

@OscarL
Copy link
Contributor Author

OscarL commented May 26, 2023

Also I'm a bit confused why you ask this in a thread about Python 3.7?

Because the u-boot recipe has the mentioned dependency on setuptools_python3 (besides the one for cmd:python3, that one's ok, but the setuptools_python3 is 3.7).

And because we're trying to switch away from 3.7 in this thread. (u-boot being one of the few remaining on the list above, and the one I was trying to work on).

@pulkomandy
Copy link
Member

From the list in the initial post I think "only" scribus and libreoffice are still on Python 3.7? Is there anything else?

@OscarL
Copy link
Contributor Author

OscarL commented Aug 13, 2023

Noup, you're right. Only Scribus and LO 6.4 remain using Python 3.7.

The rest are all Python 2.x

@OscarL
Copy link
Contributor Author

OscarL commented Aug 14, 2023

Just in case... I'm attempting to re-build Scribus with Python 3.10 on 64 bits right now (edit: build seems fine... will open PR).

After many network-related issues, managed to get all the necessary dependencies.

I'm affraid Scribus is as big as a project as I can tackle with my slow PC/network. Some other kind soul will have to try with LibreOffice 6.4 :-)

@Begasus
Copy link
Contributor

Begasus commented Aug 17, 2023

I think this can be closed, yielding with "inrecipe ..." doesn't show up anything for python3.7, cmd:python3 is only used in BUILD_PREREQUIRES so installing those packages shouldn't be a problem, rebuilding them for a newer version will use python3.10 at this moment.

@OscarL
Copy link
Contributor Author

OscarL commented Aug 17, 2023

Closing.

Remaining 2.7 cleanup tasks either have active PRs, or could be handled individually when the time comes to update each particular package.

Thanks, everyone!

With most the recipes in good shape now, dropping 3.8 next should be far less work.

@OscarL OscarL closed this as completed Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants