Page MenuHomeFreeBSD

First cut at bumping Python dependencies to 3.8+
AbandonedPublic

Authored by rene on Jun 15 2023, 8:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 3:04 AM
Unknown Object (File)
Mon, Apr 29, 10:47 PM
Unknown Object (File)
Mon, Apr 29, 10:47 PM
Unknown Object (File)
Mon, Apr 29, 10:47 PM
Unknown Object (File)
Mon, Apr 29, 10:47 PM
Unknown Object (File)
Mon, Apr 29, 10:47 PM
Unknown Object (File)
Mon, Apr 29, 10:47 PM
Unknown Object (File)
Mon, Apr 29, 10:47 PM

Details

Summary

TODO:

  • sanity-check some patches that show up in bump.txt (automatically generated todo list)
  • check for obsolete PYREL ea checks
  • test a few ports that claim to be py3.7 only
  • check more files than just *Makefile* ?
  • send to Phabricator

*: These build fine with py38

finance/quickfix: mark BROKEN with PYTHON

libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++ -DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable -Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi -Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings -Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x -MT _quickfix_la-QuickfixPython.lo -MD -MP -MF .deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o .libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found

^~~~~~~~~~

1 warning and 1 error generated.

*: cleanup/simplify some logic in Makefiles

Mk/Uses: simplify USES=python a bit

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 52300
Build 49191: arc lint + arc unit

Event Timeline

rene requested review of this revision.Jun 15 2023, 8:49 PM

To build INDEX you will need to move lang/python37 out of the way.

For stuff that is declared compatible (upstream that is) with at least our (soon-to) minimum Python version, we may be better off discarding the explicit USES=python:3.8+ etc, since it will have already been defined in python.mk.

Mk/Uses/python.mk
758

Even though this doesn't affect anything currently, this change is not correct, since only Python 3.2 and later introduced PEP-3147 conformity for bytecode files.

Mk/Uses: undo change to USES=python related to PEP-3147

rene marked an inline comment as done.Jun 16 2023, 6:26 PM

Python : what do you think of vishwin's idea to leave out the version in USES=python if it is 3.8+ ?

This would be another huge commit in this review.

In D40568#923939, @rene wrote:

Python : what do you think of vishwin's idea to leave out the version in USES=python if it is 3.8+ ?

This would be another huge commit in this review.

Personally, I like that USES=python:3.8+ is explicit in what the port supports (i.e. NOT Python 2.7 which we still have around).
The fact that USES=python skips 2.7 is a bit of inside knowledge.

In D40568#924210, @rene wrote:

The fact that USES=python skips 2.7 is a bit of inside knowledge.

Inside knowledge ports framework-wise, but not so much in public. It has long been known that Python 2 is EOL, practically no newer-than-2020 Python projects will use Python 2, and we don't allow any more Python 2 ports than the ones we kept in the tree for reasons (until we can finally remove them).

add yuri@ as I seem to touch a bunch of his ports during rebases.

  • devel/py-flake8-future-annotations: restore unintented automatic COMMENT update
  • rebase
antoine requested changes to this revision.Jun 25 2023, 8:52 PM
antoine added a subscriber: antoine.

I think those ports should be converted to USES=python , you don't want to have to touch 100 ports everytime you expire a python3.x port

This revision now requires changes to proceed.Jun 25 2023, 8:52 PM

I think those ports should be converted to USES=python , you don't want to have to touch 100 ports everytime you expire a python3.x port

Yes, all ports with USES=python:3.8+ can be converted to just USES=python. I'll also update https://docs.freebsd.org/en/books/porters-handbook/uses/#uses-python to mention that 2.7 needs to be requested explicitly.

Remove "3.8+" from all USES=python instances, this is implicit.

Accept to close after commit, all concerns have been addressed.