oi-userland icon indicating copy to clipboard operation
oi-userland copied to clipboard

Python 3.12: Add 3.12.2

Open Bill-Sommerfeld opened this issue 1 year ago • 16 comments

~~This is a very very very rough first draft; it makes it all the way through gmake package and passes most of the tests.~~ ~~patches-todo has patches I haven't dealt with yet.~~ patches has a bunch of hacks that need to be cleaned up.

Bill-Sommerfeld avatar Feb 05 '24 15:02 Bill-Sommerfeld

Just first suggestion: please switch to components/python/python-312. This is to align with other versioned components. Thank you.

mtelka avatar Feb 05 '24 15:02 mtelka

now down to three main loose ends:

  1. _curses_panel isn't being built; need to get to the bottom of why configure doesn't think it could work.
  2. 08-py_db.patch needs rework as the underlying python internals have changed
  3. need to look more closely at 35-20142.patch and figure out if it's actually been fixed in 3.12 in some different way.

and then need to go over all the patches and clean up warts (particularly the 00*.patch hacks).

Bill-Sommerfeld avatar Feb 05 '24 22:02 Bill-Sommerfeld

Tests are happy.

Congrats!

mtelka avatar Feb 06 '24 21:02 mtelka

At this point, the one remaining loose end is 08-py_db.patch which enables MDB python support (including ::pystack); this is likely to be tricky as the interpreter structures used by this patch have changed significantly since Python 3.9 was released and it's going to require a rewrite. I don't see lack of this feature as a reason to delay adding Python 3.12 - at this point it would make sense to squash the commits and start review.

Thoughts?

Bill-Sommerfeld avatar Feb 06 '24 21:02 Bill-Sommerfeld

FYI, there is refresh-patches make target.

mtelka avatar Feb 06 '24 22:02 mtelka

Thank you for working on python 3.12. I do not have any comments for your recent question. Is there a reason that openssl1.1 needs to be used? Please consider changing "USE_OPENSSL11= yes" to 'OPENSSL_VERSION= 3.1" in the Makefile.

iigs avatar Feb 06 '24 22:02 iigs

I would do not bother with 08-py_db.patch unless it is easily portable from https://github.com/oracle/solaris-userland/blob/master/components/python/python311/patches/08-py_db.patch. If it is not portable then just add a note somewhere (in Makefile likely) so we should look at solaris-userland to see whether the debugger support is available for Python 3.12.

Thank you!

mtelka avatar Feb 06 '24 22:02 mtelka

Is there a reason that openssl1.1 needs to be used? Please consider changing "USE_OPENSSL11= yes" to 'OPENSSL_VERSION= 3.1" in the Makefile.

Fixed as you suggested. I started with python39/Makefile, so USE_OPENSSL11 was in there all along; there are likely other stale things in the Makefile.

Bill-Sommerfeld avatar Feb 06 '24 22:02 Bill-Sommerfeld

FYI, there is refresh-patches make target.

Done.

Bill-Sommerfeld avatar Feb 07 '24 00:02 Bill-Sommerfeld

I would not bother with 08-py_db.patch unless it is easily portable from https://github.com/oracle/solaris-userland/blob/master/components/python/python311/patches/08-py_db.patch. If it is not portable then just add a note somewhere (in Makefile likely) so we should look at solaris-userland to see whether the debugger support is available for Python 3.12.

The equivalent file in the solaris-userland patch has an odd copyright statement in it that grants rights only to the PSF so I'm not touching it.

I took a closer look at the data structure differences between 3.9 and 3.12 and it didn't look that bad. I've managed to tweak our version into building; to run it I'll need to build a corresponding /usr/lib/mdb/proc/amd64/libpython3.12.so from illumos-gate, which I think can wait for a bit.

Bill-Sommerfeld avatar Feb 07 '24 06:02 Bill-Sommerfeld

@Bill-Sommerfeld, please do NOT squash yet. The history contains valuable information that might be needed during review.

Thank you.

mtelka avatar Feb 07 '24 07:02 mtelka

@Bill-Sommerfeld, you probably already noticed, but if not, then: https://github.com/Bill-Sommerfeld/oi-userland/pulls

mtelka avatar Feb 07 '24 20:02 mtelka

I think it would be better to mark this as draft so it is not merged accidentally :-).

mtelka avatar Feb 08 '24 12:02 mtelka

Once #16009 is merged please rebase on top of it and generate new sample-manifest.

mtelka avatar Feb 08 '24 13:02 mtelka

Once #16009 is merged please rebase on top of it and generate new sample-manifest.

Done.

Bill-Sommerfeld avatar Feb 09 '24 03:02 Bill-Sommerfeld

Any news here?

AndWac avatar May 04 '24 16:05 AndWac