Skip to content

Replace deprecated Py_Unicode_EncodeUTF8 in objToJSON.c #24221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomAugspurger opened this issue Dec 11, 2018 · 0 comments · Fixed by #24254
Closed

Replace deprecated Py_Unicode_EncodeUTF8 in objToJSON.c #24221

TomAugspurger opened this issue Dec 11, 2018 · 0 comments · Fixed by #24254
Labels
Dependencies Required and optional dependencies
Milestone

Comments

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Dec 11, 2018

Warning when building the C extensions:

pandas/_libs/src/ujson/python/objToJSON.c:444:14: warning: 'PyUnicode_EncodeUTF8' is deprecated [-Wdeprecated-declarations]
    newObj = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj),
             ^
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/unicodeobject.h:1324:7: note: 'PyUnicode_EncodeUTF8' has been
      explicitly marked deprecated here
    ) Py_DEPRECATED(3.3);
      ^
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pyport.h:493:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

newObj = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj),
PyUnicode_GET_SIZE(obj), NULL);

@TomAugspurger TomAugspurger added the Dependencies Required and optional dependencies label Dec 11, 2018
@TomAugspurger TomAugspurger added this to the Contributions Welcome milestone Dec 11, 2018
@jreback jreback modified the milestones: Contributions Welcome, 0.24.0 Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Required and optional dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants