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

bpo-42157: Rename unicodedata.ucnhash_CAPI by vstinner · Pull Request #22994 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .h  (1) .rst  (3) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 6 additions & 1 deletion Doc/whatsnew/3.10.rst
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
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,11 @@ Removed
Python 3.5.
(Contributed by Berker Peksag in :issue:`31844`.)

* Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal
PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was
moved to the internal C API.
(Contributed by Victor Stinner in :issue:`42157`.)


Porting to Python 3.10
======================
Expand Down Expand Up @@ -408,7 +413,7 @@ Porting to Python 3.10
(Contributed by Inada Naoki in :issue:`36346`.)

* The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API
``unicodedata.ucnhash_CAPI`` moves to the internal C API.
``unicodedata.ucnhash_CAPI`` has been moved to the internal C API.
(Contributed by Victor Stinner in :issue:`42157`.)

Deprecated
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_ucnhash.h
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern "C" {

/* revised ucnhash CAPI interface (exported through a "wrapper") */

#define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI"
#define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI"

typedef struct {

Expand Down
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API
``unicodedata.ucnhash_CAPI`` moves to the internal C API.
``unicodedata.ucnhash_CAPI`` has been moved to the internal C API.
Patch by Victor Stinner.
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal
PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was
moved to the internal C API. Patch by Victor Stinner.
4 changes: 2 additions & 2 deletions Modules/unicodedata.c
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
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ unicodedata_exec(PyObject *module)
return -1;
}

/* Previous versions */
// Unicode database version 3.2.0 used by the IDNA encoding
PyObject *v;
v = new_previous_version(ucd_type, "3.2.0",
get_change_3_2_0, normalization_3_2_0);
Expand All @@ -1482,7 +1482,7 @@ unicodedata_exec(PyObject *module)
if (v == NULL) {
return -1;
}
if (PyModule_AddObject(module, "ucnhash_CAPI", v) < 0) {
if (PyModule_AddObject(module, "_ucnhash_CAPI", v) < 0) {
Py_DECREF(v);
return -1;
}
Expand Down

Back | FazBrowse Home | New Git URL