FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-106320: Remove private _PyLong_New() function by vstinner · Pull Request #108604 · python/cpython · GitHub

/ cpython Public

gh-106320: Remove private _PyLong_New() function - #108604

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:pycore_long
Aug 29, 2023
Merged

gh-106320: Remove private _PyLong_New() function#108604
vstinner merged 1 commit into
python:mainfrom
vstinner:pycore_long

Conversation

vstinner commented Aug 29, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
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?

Copy link
Copy Markdown
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 commented Oct 27, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

I've opened #111415

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL