| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
You can use the macros in _decimal: _Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
...
_Py_COMP_DIAG_POP
See examples in Modules/_testcapimodule.c. |
Sorry, something went wrong.
|
_PyLong_Copy() emits a deprecation warning. You can rename _PyLong_FromDigits() to long_fromdigits() and use this one in _PyLong_Copy(). |
Sorry, something went wrong.
This is a draft due to #127925.
That does make sense if no stdlib module will depend on _PyLong_FromDigits(). Unfortunately, there is no short cut for copy.copy() in C-API. |
Sorry, something went wrong.
I'm not sure that PR gh-127925 is ever going to be merged :-(
I didn't understand your comment. I'm only proposing a local "fix" for _PyLong_Copy() to avoid the deprecation warning. |
Sorry, something went wrong.
Nevermind, I was thinking about _PyLong_Copy(), which is also public now.
That seems fine. But maybe we should just inline code, it's not used anywhere else in the longobject.c. |
Sorry, something went wrong.
|
Ok, I did this ready for review. Once #127925 will be merged - this should pass tests. After some thinking, the _PyLong_FromDigits() code was inlined in the _PyLong_Copy(). I doubt we need for _PyLong_FromDigits() in future. |
Sorry, something went wrong.
|
You should use _Py_COMP_DIAG_IGNORE_DEPR_DECLS in _decimal.c, as I wrote in my previous comment. |
Sorry, something went wrong.
No, this rather fits for testing code. |
Sorry, something went wrong.
|
Merged, thanks. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--127939.org.readthedocs.build/