@@ -13,6 +13,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
13
13
14
14
###Fixed
15
15
16
+ - Fixed RecursionError for reverse operators on C# operable types from python. See#2240
16
17
17
18
##[ 3.0.3] ( https://github.com/pythonnet/pythonnet/releases/tag/v3.0.3 ) - 2023-10-11
18
19
@@ -50,7 +51,6 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
50
51
- Fixed` PyInt ` conversion to` BigInteger ` and` System.String ` produced incorrect result for values between 128 and 255.
51
52
- Fixed implementing a generic interface with a Python class
52
53
53
-
54
54
##[ 3.0.0] ( https://github.com/pythonnet/pythonnet/releases/tag/v3.0.0 ) - 2022-09-29
55
55
56
56
###Added
@@ -61,61 +61,63 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
61
61
- Ability to implement delegates with` ref ` and` out ` parameters in Python, by returning the modified parameter values in a tuple. ([ #1355 ] [ i1355 ] )
62
62
- Ability to override .NET methods that have` out ` or` ref ` in Python by returning the modified parameter values in a tuple. ([ #1481 ] [ i1481 ] )
63
63
- ` PyType ` - a wrapper for Python type objects, that also permits creating new heap types from` TypeSpec `
64
- - Improved exception handling:
65
- * exceptions can now be converted with codecs
66
- * ` InnerException ` and` __cause__ ` are propagated properly
64
+ - Improved exception handling:
65
+
66
+ * exceptions can now be converted with codecs
67
+ * ` InnerException ` and` __cause__ ` are propagated properly
68
+
67
69
- ` __name__ ` and` __signature__ ` to reflected .NET methods
68
70
- .NET collection types now implement standard Python collection interfaces from` collections.abc ` .
69
- See[ Mixins/collections.py] ( src/runtime/Mixins/collections.py ) .
71
+ See[ Mixins/collections.py] ( src/runtime/Mixins/collections.py ) .
70
72
- you can cast objects to generic .NET interfaces without specifying generic arguments as long as there is no ambiguity.
71
73
- .NET arrays implement Python buffer protocol
72
74
- Python integer interoperability with` System.Numerics.BigInteger `
73
75
- Python.NET will correctly resolve .NET methods, that accept` PyList ` ,` PyInt ` ,
74
- and other` PyObject ` derived types when called from Python.
76
+ and other` PyObject ` derived types when called from Python.
75
77
- .NET classes, that have` __call__ ` method are callable from Python
76
78
- ` PyIterable ` type, that wraps any iterable object in Python
77
79
- ` PythonEngine ` properties for supported Python versions:` MinSupportedVersion ` ,` MaxSupportedVersion ` , and` IsSupportedVersion `
78
80
- The runtime that is loaded on` import clr ` can now be configured via environment variables
79
81
80
-
81
82
###Changed
83
+
82
84
- Drop support for Python 2, 3.4, 3.5, and 3.6
83
85
- ` wchar_t ` size aka` Runtime.UCS ` is now determined at runtime
84
86
- ` clr.AddReference ` may now throw errors besides` FileNotFoundException ` , that provide more
85
- details about the cause of the failure
87
+ details about the cause of the failure
86
88
- ` clr.AddReference ` no longer adds ".dll" implicitly
87
89
- ` PyIter(PyObject) ` constructor replaced with static` PyIter.GetIter(PyObject) ` method
88
90
- Python runtime can no longer be shut down if the Python error indicator is set, as it would have unpredictable behavior
89
91
- BREAKING: Return values from .NET methods that return an interface are now automatically
90
- wrapped in that interface. This is a breaking change for users that rely on being
91
- able to access members that are part of the implementation class, but not the
92
- interface. Use the new` __implementation__ ` or` __raw_implementation__ ` properties to
93
- if you need to "downcast" to the implementation class.
92
+ wrapped in that interface. This is a breaking change for users that rely on being
93
+ able to access members that are part of the implementation class, but not the
94
+ interface. Use the new` __implementation__ ` or` __raw_implementation__ ` properties to
95
+ if you need to "downcast" to the implementation class.
94
96
- BREAKING:` == ` and` != ` operators on` PyObject ` instances now use Python comparison
95
- (previously was equivalent to` object.ReferenceEquals(,) ` )
97
+ (previously was equivalent to` object.ReferenceEquals(,) ` )
96
98
- BREAKING: Parameters marked with` ParameterAttributes.Out ` are no longer returned in addition
97
- to the regular method return value (unless they are passed with` ref ` or` out ` keyword).
98
- - BREAKING: Drop support for the long-deprecated CLR.* prefix.
99
+ to the regular method return value (unless they are passed with` ref ` or` out ` keyword).
100
+ - BREAKING: Drop support for the long-deprecated CLR.\ * prefix.
99
101
- ` PyObject ` now implements` IEnumerable<PyObject> ` in addition to` IEnumerable `
100
102
- floating point values passed from Python are no longer silently truncated
101
- when .NET expects an integer[ #1342 ] [ i1342 ]
103
+ when .NET expects an integer[ #1342 ] [ i1342 ]
102
104
- More specific error messages for method argument mismatch
103
105
- members of` PyObject ` inherited from` System.Object and ` DynamicObject` now autoacquire GIL
104
106
- BREAKING: when inheriting from .NET types in Python if you override` __init__ ` you
105
- must explicitly call base constructor using` super().__init__(.....) ` . Not doing so will lead
106
- to undefined behavior.
107
+ must explicitly call base constructor using` super().__init__(.....) ` . Not doing so will lead
108
+ to undefined behavior.
107
109
- BREAKING: most` PyScope ` methods will never return` null ` . Instead,` PyObject ` ` None ` will be returned.
108
110
- BREAKING:` PyScope ` was renamed to` PyModule `
109
111
- BREAKING: Methods with` ref ` or` out ` parameters and void return type return a tuple of only the` ref ` and` out ` parameters.
110
112
- BREAKING: to call Python from .NET` Runtime.PythonDLL ` property must be set to Python DLL name
111
- or the DLL must be loaded in advance. This must be done before calling any other Python.NET functions.
113
+ or the DLL must be loaded in advance. This must be done before calling any other Python.NET functions.
112
114
- BREAKING:` PyObject.Length() ` now raises a` PythonException ` when object does not support a concept of length.
113
115
- BREAKING: disabled implicit conversion from C# enums to Python` int ` and back.
114
- One must now either use enum members (e.g.` MyEnum.Option ` ), or use enum constructor
115
- (e.g.` MyEnum(42) ` or` MyEnum(42, True) ` when` MyEnum ` does not have a member with value 42).
116
+ One must now either use enum members (e.g.` MyEnum.Option ` ), or use enum constructor
117
+ (e.g.` MyEnum(42) ` or` MyEnum(42, True) ` when` MyEnum ` does not have a member with value 42).
116
118
- BREAKING: disabled implicit conversion from Python objects implementing sequence protocol to
117
- .NET arrays when the target .NET type is` System.Object ` . The conversion is still attempted when the
118
- target type is a` System.Array ` .
119
+ .NET arrays when the target .NET type is` System.Object ` . The conversion is still attempted when the
120
+ target type is a` System.Array ` .
119
121
- Sign Runtime DLL with a strong name
120
122
- Implement loading through` clr_loader ` instead of the included` ClrModule ` , enables
121
123
support for .NET Core
@@ -125,23 +127,23 @@ target type is a `System.Array`.
125
127
- Replaced the old` __import__ ` hook hack with a PEP302-style Meta Path Loader
126
128
- BREAKING: Names of .NET types (e.g.` str(__class__) ` ) changed to better support generic types
127
129
- BREAKING: overload resolution will no longer prefer basic types. Instead, first matching overload will
128
- be chosen.
130
+ be chosen.
129
131
- BREAKING: acquiring GIL using` Py.GIL ` no longer forces` PythonEngine ` to initialize
130
132
- BREAKING:` Exec ` and` Eval ` from` PythonEngine ` no longer accept raw pointers.
131
133
- BREAKING: .NET collections and arrays are no longer automatically converted to
132
- Python collections. Instead, they implement standard Python
133
- collection interfaces from` collections.abc ` .
134
- See[ Mixins/collections.py] ( src/runtime/Mixins/collections.py ) .
134
+ Python collections. Instead, they implement standard Python
135
+ collection interfaces from` collections.abc ` .
136
+ See[ Mixins/collections.py] ( src/runtime/Mixins/collections.py ) .
135
137
- BREAKING: When trying to convert Python` int ` to` System.Object ` , result will
136
- be of type` PyInt ` instead of` System.Int32 ` due to possible loss of information.
137
- Python` float ` will continue to be converted to` System.Double ` .
138
+ be of type` PyInt ` instead of` System.Int32 ` due to possible loss of information.
139
+ Python` float ` will continue to be converted to` System.Double ` .
138
140
- BREAKING: Python.NET will no longer implicitly convert types like` numpy.float64 ` , that implement` __float__ ` to
139
- ` System.Single ` and` System.Double ` . An explicit conversion is required on Python or .NET side.
141
+ ` System.Single ` and` System.Double ` . An explicit conversion is required on Python or .NET side.
140
142
- BREAKING:` PyObject.GetHashCode ` can fail.
141
143
- BREAKING: Python.NET will no longer implicitly convert any Python object to` System.Boolean ` .
142
144
- BREAKING:` PyObject.GetAttr(name, default) ` now only ignores` AttributeError ` (previously ignored all exceptions).
143
145
- BREAKING:` PyObject ` no longer implements` IEnumerable<PyObject> ` .
144
- Instead,` PyIterable ` does that.
146
+ Instead,` PyIterable ` does that.
145
147
- BREAKING:` IPyObjectDecoder.CanDecode ` ` objectType ` parameter type changed from` PyObject ` to` PyType `
146
148
147
149
###Fixed
@@ -173,18 +175,19 @@ Instead, `PyIterable` does that.
173
175
###Removed
174
176
175
177
- ` ShutdownMode ` has been removed. The only shutdown mode supported now is an equivalent of` ShutdownMode.Reload ` .
176
- There is no need to specify it.
178
+ There is no need to specify it.
177
179
- implicit assembly loading (you have to explicitly` clr.AddReference ` before doing import)
178
180
- messages in` PythonException ` no longer start with exception type
179
181
- ` PyScopeManager ` ,` PyScopeException ` ,` PyScope ` (use` PyModule ` instead)
180
182
- support for .NET Framework 4.0-4.6; Mono before 5.4. Python.NET now requires .NET Standard 2.0
181
- (see[ the matrix] ( https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support ) )
183
+ (see[ the matrix] ( https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support ) )
182
184
183
185
##[ 2.5.2] ( https://github.com/pythonnet/pythonnet/releases/tag/v2.5.2 ) - 2021-02-05
184
186
185
187
Bugfix release.
186
188
187
189
###Fixed
190
+
188
191
- Fix` object[] ` parameters taking precedence when should not in overload resolution
189
192
- Empty parameter names (as can be generated from F#) do not cause crashes
190
193
@@ -194,8 +197,8 @@ Bugfix release.
194
197
195
198
###Fixed
196
199
197
- - Fix incorrect dereference of wrapper object in` tp_repr ` , which may result in a program crash
198
- - Fix incorrect dereference in params array handling
200
+ - Fix incorrect dereference of wrapper object in` tp_repr ` , which may result in a program crash
201
+ - Fix incorrect dereference in params array handling
199
202
200
203
##[ 2.5.0] ( https://github.com/pythonnet/pythonnet/releases/tag/v2.5.0 ) - 2020-06-14
201
204
@@ -302,7 +305,6 @@ This version improves performance on benchmarks significantly compared to 2.3.
302
305
- Fix spurious assembly loading exceptions from private types ([ #703 ] [ i703 ] )
303
306
- Fix inheritance of non-abstract base methods ([ #755 ] [ i755 ] )
304
307
305
-
306
308
##[ 2.3.0] [ ] - 2017-03-11
307
309
308
310
###Added
@@ -839,25 +841,15 @@ This version improves performance on benchmarks significantly compared to 2.3.
839
841
- Initial (mostly) working experimental release.
840
842
841
843
[ keep a changelog ] :http://keepachangelog.com/
842
-
843
844
[ semantic versioning ] :http://semver.org/
844
-
845
845
[ unreleased ] :../../compare/v3.0.1...HEAD
846
-
847
846
[ 2.3.0 ] :../../compare/v2.2.2...v2.3.0
848
-
849
847
[ 2.2.2 ] :../../compare/v2.2.1...v2.2.2
850
-
851
848
[ 2.2.1 ] :../../compare/v2.2.0-dev1...v2.2.1
852
-
853
849
[ 2.2.0-dev1 ] :../../compare/v2.1.0...v2.2.0-dev1
854
-
855
850
[ 2.1.0 ] :../../compare/v2.0.0...v2.1.0
856
-
857
851
[ 2.0.0 ] :../../compare/1.0...v2.0.0
858
-
859
852
[ 1.0.0 ] :https://github.com/pythonnet/pythonnet/releases/tag/1.0
860
-
861
853
[ i714 ] :https://github.com/pythonnet/pythonnet/issues/714
862
854
[ i608 ] :https://github.com/pythonnet/pythonnet/issues/608
863
855
[ i443 ] :https://github.com/pythonnet/pythonnet/issues/443