Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Aug 29, 2023

Move the following private API to the internal C API (pycore_long.h):

  • _PyLong_Copy()
  • _PyLong_FromDigits()
  • _PyLong_New()

No longer export most of these functions.

Move the following private API to the internal C API (pycore_long.h): * _PyLong_Copy() * _PyLong_FromDigits() * _PyLong_New() No longer export most of these functions.
@skirpichev
Copy link
Member

@vstinner, we use _PyLong_New() in the gmpy2, e.g. in the GMPy_PyLong_From_MPZ() method. What's now the intended replacement for this private API?

@skirpichev
Copy link
Member

Another user is the sage:

$ git grep _PyLong_N src/sage/libs/gmp/pylong.pyx:from cpython.longintrepr cimport _PyLong_New, py_long, digit, PyLong_SHIFT src/sage/libs/gmp/pylong.pyx: L = _PyLong_New(pylong_size) 

@vstinner
Copy link
MemberAuthor

vstinner commented Oct 27, 2023

we use _PyLong_New() in the gmpy2, e.g. in the GMPy_PyLong_From_MPZ() method. What's now the intended replacement for this private API?

Would you mind to open a separated issue describing how you use _PyLong_New() and which API do you need? _PyLong_New() changed a lot in Python 3.12: see also issue #111140.

@skirpichev
Copy link
Member

I've opened #111415

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@skirpichev@bedevere-bot