Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Python2 deprecated native method import #924

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
kitsek opened this issue Jul 27, 2019 · 1 comment · Fixed by #925
Closed

Python2 deprecated native method import #924

kitsek opened this issue Jul 27, 2019 · 1 comment · Fixed by #925

Comments

@kitsek
Copy link

kitsek commented Jul 27, 2019

Environment

  • Pythonnet version: latest
  • Python version: 3.7.4
  • Operating System: MacOS 10.14.6

Details

  • Compiling under xcode for iOS, it throughs PyClass_New reference not found error.
    After diggin' around for a while, there is no PyClass_New definition in Python3 actually.
    Also there are other deprecated python3 APIs need to be nested in #if PYTHON2 condition.

    PyLong_GetMax(not exists)
    PyObject_GC_New(name error, should be _PyObject_GC_New)

[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
 internal static extern IntPtr PyClass_New(IntPtr bases, IntPtr dict, IntPtr name);
@Cronan
Copy link
Contributor

Cronan commented Jul 30, 2019

I agree re: the others, but not PyObject_GC_New.
https://docs.python.org/3.7/c-api/gcsupport.html?highlight=pyobject_gc_new#c.PyObject_GC_New

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 a pull request may close this issue.

2 participants