Skip to content
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

python: disable deprecated API for newer versions #3210

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Aug 2, 2023

Your checklist for this pull request

Detailed description

Do not call deprecated API since Python 3.9:

Test plan (required)

CI is green

Closing issues

Closes #3208

@XVilka XVilka added this to the 2.3 milestone Aug 2, 2023
@XVilka XVilka merged commit 08d5c7a into dev Aug 2, 2023
8 checks passed
@XVilka XVilka deleted the fix-py-api2 branch August 2, 2023 07:21
@XVilka
Copy link
Member Author

XVilka commented Aug 2, 2023

Need to fix also this one:

/Users/user/Rizin/cutter/src/common/PythonManager.cpp:61:9: warning: 'Py_SetPythonHome' is deprecated [-Wdeprecated-declarations]
        Py_SetPythonHome(pythonHome);
        ^
/opt/homebrew/Frameworks/Python.framework/Versions/3.11/include/python3.11/pylifecycle.h:40:1: note: 'Py_SetPythonHome' has been explicitly marked deprecated here
Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
^
/opt/homebrew/Frameworks/Python.framework/Versions/3.11/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                ^

https://docs.python.org/3/c-api/init.html#c.Py_SetPythonHome
https://docs.python.org/3/c-api/init_config.html#init-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not use PyEval_InitThreads() for Python >=3.9
2 participants