Bug 259745 - lang/python311: Interpreted object-oriented programming language (beta version)
Summary: lang/python311: Interpreted object-oriented programming language (beta version)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on: 259898 259899
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-09 20:14 UTC by Dmitry Marakasov
Modified: 2021-12-29 19:06 UTC (History)
5 users (show)

See Also:
lwhsu: maintainer-feedback+


Attachments
Patch (521.28 KB, patch)
2021-11-09 20:14 UTC, Dmitry Marakasov
no flags Details | Diff
Diff against python 3.10 (24.22 KB, text/plain)
2021-11-09 20:16 UTC, Dmitry Marakasov
no flags Details
Patch (519.87 KB, patch)
2021-11-17 13:00 UTC, Dmitry Marakasov
no flags Details | Diff
Diff against python 3.10 (34.74 KB, patch)
2021-11-17 13:01 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-09 20:14:01 UTC
Created attachment 229391 [details]
Patch

Add python 3.11.0a1. Having this port is crucial for testing the new version, new language features and ensuring compatibility of python consumers in the ports tree. FYI, I'm working on fixing some python tests on FreeBSD: https://bugs.python.org/issue45767.

I also request a permission to update this port to next devel versions without explicit approval.

QA passed:
- poudriere: 12/13/14 × i386/amd64 + NOPORT* + each bool option inverted + each hash variant.
- make test: one new failure compared to python310 (test_gdb which is caused by non-matching gdb output).
- runtest on my local projects
- poudriere build of some consumers
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-09 20:16:15 UTC
Created attachment 229392 [details]
Diff against python 3.10

Diff to 3.10 is trivial: only version and plist changes.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-11-09 23:00:44 UTC
Thanks for doing this Dmitry. Do we want an exp-run to identify build failures with 3.11 in advance of commit?
Comment 3 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-10 10:49:25 UTC
(In reply to Kubilay Kocak from comment #2)
I don't see a reason for an exp-run just now - as I understand this change does not affect any existing configurations. I expect consumer build failures to be plentiful on this stage, for instance cython does not support 3.11 yet. I plan to identify (most) failures and update USES=python version accordingly the same way I've recently (mostly) done for 3.10.

After that it would make sense to do an exp-run for both 3.10 and 3.11 to identify remaining failures (I currently only run on */py-* ports).
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-15 12:32:40 UTC
Ping
Comment 5 Li-Wen Hsu freebsd_committer freebsd_triage 2021-11-16 14:36:14 UTC
I also don't think whole exp-run is needed.  But I suggest check following ports:

- lang/python-doc-*
I somehow feel those ports are not very useful, but we need to updated them before they get deprecated.

- databases/py-gdbm
- databases/py-sqlite3
- x11-toolkits/py-tkinter
Above three are extracted from the official release and has "allflavors" in USE_PYTHON.

I am fine to add lang/python311 when above ports are checked.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-11-16 23:59:47 UTC
(In reply to Li-Wen Hsu from comment #5)

+1
Comment 7 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-17 12:59:37 UTC
- Updated to 3.11.0a2
- py-gdbm is OK
- Fixed py-sqlite3 with py3.11
- Docs for 3.11 are not available. For now I've limited supported python versions for python-doc-html with 3.10, however because of

https://cgit.freebsd.org/ports/tree/Mk/Uses/python.mk#n368

it falls back to python 2.7, so I've had to limit it from below as well.

I suggest to prepend ${PYTHON_DEFAULT} to that line in python.mk like it's done in other places.

- py-tkinter does not build as it depends on cython through tk and cython does not support 3.11 yet. My plans were to add cython-devel port and use it for USE_PYTHON=cython case for 3.11, I may include this into this PR or submit separately.
Comment 8 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-17 13:00:15 UTC
Created attachment 229550 [details]
Patch
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-17 13:01:02 UTC
Created attachment 229551 [details]
Diff against python 3.10
Comment 10 Li-Wen Hsu freebsd_committer freebsd_triage 2021-11-17 13:11:55 UTC
(In reply to Dmitry Marakasov from comment #7)
Thanks. All sounds good to me.

For py-tkinter, we can mark it IGNORE with python311 for now and put a notice or remove it from pkg-message.
Comment 11 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-17 15:02:03 UTC
The patches for pystemmer and cython in dependent bugs fix tkinter (and a lot of other ports) with python 3.11.
Comment 12 Dmitry Marakasov freebsd_committer freebsd_triage 2021-11-19 16:11:28 UTC
lwhsy@/koobs@, could you please OK 259898 which blocks this commit? And also my

> request a permission to update this port to next devel versions without explicit approval
Comment 13 commit-hook freebsd_committer freebsd_triage 2021-11-24 17:02:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=27f3f4018fbe293d3a12dd2fd8212a93c4619b9a

commit 27f3f4018fbe293d3a12dd2fd8212a93c4619b9a
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-11-10 20:27:02 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-11-24 17:00:33 +0000

    databases/py-sqlite3: fix build with python 3.11

    PR:             259745
    Approved by:    python

 databases/py-sqlite3/files/setup3.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2021-11-24 17:02:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d6f568cf8a0c57c1280efb31b1b2ab850a87267f

commit d6f568cf8a0c57c1280efb31b1b2ab850a87267f
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-10-28 12:26:49 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-11-24 17:00:33 +0000

    lang/python311: add port (at 3.11.0.alpha2)

    Python is an interpreted object-oriented programming language, and is
    often compared to Tcl, Perl or Scheme.

    WWW: https://www.python.org/

    PR:             259745
    Approved by:    python

 Mk/Uses/python.mk                                  |    2 +-
 Mk/bsd.default-versions.mk                         |    2 +-
 lang/Makefile                                      |    1 +
 lang/python311/Makefile (new)                      |  164 +
 lang/python311/Makefile.version (new)              |    5 +
 lang/python311/distinfo (new)                      |    3 +
 ...tch-Lib_distutils_command_install__lib.py (new) |   41 +
 ...Lib_distutils_tests_test__install__lib.py (new) |   33 +
 lang/python311/files/patch-Makefile.pre.in (new)   |   65 +
 .../files/patch-Misc__python-config.sh.in (new)    |   11 +
 lang/python311/files/pkg-message.in (new)          |   12 +
 lang/python311/pkg-descr (new)                     |    4 +
 lang/python311/pkg-plist (new)                     | 7497 ++++++++++++++++++++
 13 files changed, 7838 insertions(+), 2 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-11-24 17:02:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=898cf2800ce2fc23d96d2a4c82a261302292b230

commit 898cf2800ce2fc23d96d2a4c82a261302292b230
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-11-17 12:48:35 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-11-24 17:00:33 +0000

    python-doc-html: fix build with python 3.11

    There's no docs for alpha python 3.11 yet, so limit supported python
    versions with 3.10. Also limit from below to avoid falling back to
    python 2.7 docs.

    PR:             259745
    Approved by:    python

 lang/python-doc-html/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)