Closed EwoutH closed 11 months ago
Thanks. I'd welcome any PR fixing the issue with Python 3.12. Have a look at the details here:
From the logs, it seems the issue is the change of location of ob_digit
native/common/jp_primitivetype.cpp: In member function 'PyObject* JPPrimitiveType::convertLong(PyTypeObject*, PyLongObject*)':
native/common/jp_primitivetype.cpp:50:25: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit'
50 | newobj->ob_digit[i] = tmp->ob_digit[i];
| ^~~~~~~~
native/common/jp_primitivetype.cpp:50:44: error: 'PyLongObject' {aka 'struct _longobject'} has no member named 'ob_digit'
50 | newobj->ob_digit[i] = tmp->ob_digit[i];
According to https://github.com/cython/cython/issues/5238#issuecomment-1415089110 ; changing it to ((PyLongObject*)op1)->long_value->ob_digit
should work.
It more complicated than this, since wstr is now removed: https://www.python.org/dev/peps/pep-0623
I was able to fix both the wstr and ob_digit error, but they also broke the jp_value memory hack which adds extra memory to all types of us to store the extra bytes needs for the wrapper. As a result we are getting random segmentation faults when the memory between the two collides. (the absolute worst kind of error to fix.) They promised a replacement that should be in 3.12 though I am still searching.
fixed by #1158
Awesome, thanks a lot!
When can we expect a release and wheels on n PyPI?
Starting the process after fixing all merge requests.
Python 3.12 is releasing in exactly one week, Monday 2023-10-02. It would be great if JPype could support Python 3.12 fully at the release, including testing in CI and wheels uploaded to PyPI.
Summary – Python 3.12 Release highlights
> New grammar features: > - [PEP 701: Syntactic formalization of f-strings](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep701) > > Interpreter improvements: > - [PEP 684: A Per-Interpreter GIL](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep684) > - [PEP 669: Low impact monitoring for CPython](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep669) > > New typing features: > - [PEP 688: Making the buffer protocol accessible in Python](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep688) > - [PEP 692: Using TypedDict for more precise **kwargs typing](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep692) > - [PEP 695: Type Parameter Syntax](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep695) > - [PEP 698: Override Decorator for Static Typing](https://docs.python.org/3.12/whatsnew/3.12.html#whatsnew312-pep698) > > Important deprecations, removals or restrictions: > - [PEP 623](https://peps.python.org/pep-0623/): Remove wstr from Unicode > - [PEP 632](https://peps.python.org/pep-0632/): Remove the distutils package. See [the migration guide](https://peps.python.org/pep-0632/#migration-advice) for advice on its replacement. > - [gh-95299](https://github.com/python/cpython/issues/95299): Do not pre-install setuptools in virtual environments created with [venv](https://docs.python.org/3.12/library/venv.html#module-venv). This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the [activated](https://docs.python.org/3.12/library/venv.html#venv-explanation) virtual environment.