[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > https://github.com/dgrunwald/rust-cpython/blob/b63d691addc978952380a8eb146d01a444e16e7a/src/objects/capsule.rs A friend explained me that it's a doctest and unicodedata.ucnhash_CAPI was picked as an example, but any other capsule could be used to test the C

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: Updating the doctest is certainly a good solution for this particular project. However I still think this regression deserves to be resolved. This was part of the API, whether intended or not. -- ___ Python tracker

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Sounds like an easy solution is to open an issue/PR against rust-cpython to update the doctest, IMO. -- ___ Python tracker ___ __

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: If we decide to restore the C API to the Python 3.9 C API, *all* changes done in the unicodedata in Python 3.10 should be reverted, since early changes already changed/broke the C API, and following changes rely on that. -- _

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: > Does it mean that rust-cpython was broken in Python 3.10 even if a change was > prepared with a deprecation period if Python 3.9? Does it mean that the > deprecation period was inefficient on this project? I don't see any deprecation warning when running the

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > (Note that there are also other failures regarding an implicit float->int > conversion, but they seem to be caused by a change that followed the > deprecation period.) Does it mean that rust-cpython was broken in Python 3.10 even if a change was prepared

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: The UCD_Check() issue was discussed in Mohamed Koubaa's PRs: * https://github.com/python/cpython/pull/22145 (closed) <= HERE * https://github.com/python/cpython/pull/22328 (merged) * https://github.com/python/cpython/pull/22490 (closed) -- __

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: All details I have about rust-cpython are that it fails tests with: AttributeError: module 'unicodedata' has no attribute 'ucnhash_CAPI' See the test failures in https://koschei.fedoraproject.org/package/rust-cpython e.g.: src/objects/capsule.rs - obj

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: > This breaks at least https://github.com/dgrunwald/rust-cpython When I search for "ucnhash_CAPI" in the GitHub search, I only find commented code: https://github.com/dgrunwald/rust-cpython/blob/b63d691addc978952380a8eb146d01a444e16e7a/src/objects/capsule.rs

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot about this issue. Let me rebuild the context. Copy of the What's New in Python 3.10 entry: "Removed the unicodedata.ucnhash_CAPI attribute which was an internal PyCapsule object. The related private _PyUnicode_Name_CAPI structure was moved to th

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
Miro Hrončok added the comment: Right. Nevertheless, the reaming has effectively removed the old name. -- ___ Python tracker ___ ___

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: It's not removed, it's renamed (by 84f7382215b9e024a5590454726b6ae4b0ca70a0, GH-22994, bpo-42157). You can access it using the '_ucnhash_CAPI' attribute. -- nosy: +erlendaasland ___ Python tracker

[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation

2021-06-14 Thread Miro Hrončok
New submission from Miro Hrončok : In bpo-42157, the unicodedata.ucnhash_CAPI attribute was removed without deprecation. This breaks at least https://github.com/dgrunwald/rust-cpython with: AttributeError: module 'unicodedata' has no attribute 'ucnhash_CAPI' Please revert the removal and