Skip to content

Commit 1a23917

Browse files
authored
Merge branch 'master' into iters_to_arrays
2 parents 2e51321 + f20bcf6 commit 1a23917

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

AUTHORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- David Lassonde ([@lassond](https://github.com/lassond))
2828
- David Lechner ([@dlech](https://github.com/dlech))
2929
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
30+
- Florian Treurniet ([@ftreurni](https://github.com/ftreurni))
3031
- He-chien Tsai ([@t3476](https://github.com/t3476))
3132
- Inna Wiesel ([@inna-w](https://github.com/inna-w))
3233
- Ivan Cronyn ([@cronan](https://github.com/cronan))

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
1616
- Added argument types information to "No method matches given arguments" message
1717
- Moved wheel import in setup.py inside of a try/except to prevent pip collection failures
1818
- Added support for converting python iterators to C# arrays
19+
- Removes PyLong_GetMax and PyClass_New when targetting Python3
1920

2021
### Fixed
2122

23+
- Fixed runtime that fails loading when using pythonnet in an environment
24+
together with Nuitka
25+
2226
## [2.4.0][]
2327

2428
### Added
@@ -61,7 +65,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
6165
- Fixed conversion of 'float' and 'double' values ([#486][i486])
6266
- Fixed 'clrmethod' for python 2 ([#492][i492])
6367
- Fixed double calling of constructor when deriving from .NET class ([#495][i495])
64-
- Fixed `clr.GetClrType` when iterating over `System` members ([#607][p607])
68+
- Fixed `clr.GetClrType` when iterating over `System` members ([#607][p607])
6569
- Fixed `LockRecursionException` when loading assemblies ([#627][i627])
6670
- Fixed errors breaking .NET Remoting on method invoke ([#276][i276])
6771
- Fixed PyObject.GetHashCode ([#676][i676])

src/runtime/runtime.cs

+3-5
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ internal static void Initialize(bool initSigs = false)
205205
PyNotImplemented = PyObject_GetAttrString(op, "NotImplemented");
206206
PyBaseObjectType = PyObject_GetAttrString(op, "object");
207207

208-
PyModuleType = PyObject_Type(op);
209208
PyNone = PyObject_GetAttrString(op, "None");
210209
PyTrue = PyObject_GetAttrString(op, "True");
211210
PyFalse = PyObject_GetAttrString(op, "False");
@@ -302,6 +301,7 @@ internal static void Initialize(bool initSigs = false)
302301
dllLocal = loader.Load(_PythonDll);
303302
}
304303
_PyObject_NextNotImplemented = loader.GetFunction(dllLocal, "_PyObject_NextNotImplemented");
304+
PyModuleType = loader.GetFunction(dllLocal, "PyModule_Type");
305305

306306
if (dllLocal != IntPtr.Zero)
307307
{
@@ -769,8 +769,10 @@ public static extern int Py_Main(
769769
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
770770
internal static extern IntPtr PyCFunction_Call(IntPtr func, IntPtr args, IntPtr kw);
771771

772+
#if PYTHON2
772773
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
773774
internal static extern IntPtr PyClass_New(IntPtr bases, IntPtr dict, IntPtr name);
775+
#endif
774776

775777
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
776778
internal static extern IntPtr PyInstance_New(IntPtr cls, IntPtr args, IntPtr kw);
@@ -1012,10 +1014,6 @@ internal static IntPtr PyInt_FromInt64(long value)
10121014
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
10131015
EntryPoint = "PyLong_FromString")]
10141016
internal static extern IntPtr PyInt_FromString(string value, IntPtr end, int radix);
1015-
1016-
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl,
1017-
EntryPoint = "PyLong_GetMax")]
1018-
internal static extern int PyInt_GetMax();
10191017
#elif PYTHON2
10201018
[DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)]
10211019
private static extern IntPtr PyInt_FromLong(IntPtr value);

0 commit comments

Comments
 (0)