Release 3.0.0
What's Changed
- Increase ob's ref count in tp_repr to avoid accidental free by @DanBarzilian in #1160
- fixed crash due to a decref of a borrowed reference in params array handling by @lostmsu in #1163
- Drop Python 2 support by @filmor in #1158
- remove remoting block for .NET standard by @koubaa in #1170
- Pybuffer by @koubaa in #1195
- Fix appveyor would only test the PyPI package by @amos402 in #1200
- Remove unnecessary
CheckExceptionOccurred
calls by @amos402 in #1175 - Provide more info about failuers to load CLR assemblies by @lostmsu in #1076
- Add syntax highlighting to Python code examples in README.rst [docs] by @SFM61319 in #1208
- Remove non-existent PInvoke functions by @amos402 in #1205
- Bad params object[] precedence (master) by @lostmsu in #1224
- drop 3.4 and 3.5 by @koubaa in #1227
- really remove old versions by @koubaa in #1230
- Added a test for finalization on shutdown by @lostmsu in #1206
- fix compiler warning by @koubaa in #1226
- Ensure only implementers of IEnumerable or IEnumerator are considered Iterable by @danabr in #1241
- Select correct method to invoke when keyword arguments are used by @danabr in #1242
- Wrap returned objects in interface if method return type is interface by @danabr in #1240
- Non-delegate types should not be callable by @alxnull in #1247
- Make indexers work for interface objects by @danabr in #1246
- Make it possible to use inherited indexers by @danabr in #1248
- Add soft shutdown by @amos402 in #958
- Fixed dllLocal not being initialized. by @benoithudson in #1252
- Return interface objects when iterating over interface collections by @danabr in #1257
- Make
len
work forICollection<>
interface objects by @danabr in #1253 - Enable Source Link and symbol package generation during build by @lostmsu in #1259
- Fixed polyfill for TypeBuilder.CreateType by @lostmsu in #1261
- fix wrongly cased Microsoft.CSHARP.Targets by @vivainio in #1271
- Intern string by @amos402 in #1254
- Use .NET Core 3.1 LTS for tests (instead of 2.0) by @lostmsu in #1279
- Python 3.9 by @filmor in #1264
- Remove deprecated implicit assembly loading by @lostmsu in #1277
- Ensure methods of Object are also available on interface objects by @danabr in #1284
- Fix kwarg func resolution by @jmlidbetter in #1136
- Allow creating new .NET arrays from Python using Array[T](dim1, dim2,β¦) syntax by @lostmsu in #1291
- Detect the size of wchar_t (aka Runtime.UCS) at runtime using PyUnicode_GetMax by @lostmsu in #1298
- TypeOffset class no longer depends on target Python version by @lostmsu in #1292
- [Out] parameters no longer added to return tuple by @lostmsu in #1308
- Added github actions workflow to replace travis by @lostmsu in #1307
- Convert projects to SDK style by @filmor in #1209
- Test other Operating Systems than Linux via Github Actions by @filmor in #1310
- Ensure that param-array matching works correctly by @filmor in #1304
- Remove API warnings as these will be stabilised for 3.0 by @filmor in #1315
- Replace custom platform handling by RuntimeInformation by @filmor in #1314
- Fixed CollectBasicObject test by @lostmsu in #1313
- Implement inplace building and develop by @filmor in #1317
- Drop the long-deprecated CLR.* alias by @filmor in #1319
- Fix or disable warnings in Python.Runtime by @filmor in #1318
- Fixed segfault in ClassDerived.tp_dealloc by @lostmsu in #1330
- Fixed crash in finalizer of CLR types defined in Python, that survive engine shutdown by @lostmsu in #1260
- Test for non-ASCII encoded method name by @filmor in #1329
- Fix illegal delegate usage by @BadSingleton in #1328
- PyIter: do not force dispose previous object upon moving to the next one by @lostmsu in #1331
- Incorrectly using a non-generic type with type parameters now produces a helpful Python error instead of throwing NullReferenceException by @tminka in #1326
- Call PyErr_NormalizeException for exceptions by @slide in #1265
- TestPythonEngineProperties.SetPythonPath avoids corrupting the module search path for later tests by @tminka in #1336
- ABI.Initialize gives a helpful message when the TypeOffset interop class is not configured correctly by @tminka in #1340
- Better error messages from PyObject.AsManagedObject and DelegateManager.TrueDispatch by @tminka in #1344
- Python tests can now be debugged by running them as embedded tests within NUnit by @tminka in #1341
- Operator overloads support by @christabella in #1324
- Domain reload test cases fixes by @BadSingleton in #1287
- Add more more tests for in, out and ref parameters by @BadSingleton in #1349
- Support comparison operators by @christabella in #1347
- Disable implicit conversion from PyFloat to .NET integer types by @lostmsu in #1343
- Add GetPythonThreadID and Interrupt methods in PythonEngine by @gpetrou in #1337
- Disable implicit conversion from PyFloat to uint64 by @tminka in #1362
- Disable implicit conversion from float to array index by @tminka in #1363
- Better error messages for method argument mismatch and others by @tminka in #1361
- Support ByRef arguments in event handlers by @tminka in #1364
- Build single Python.Runtime.dll for all platforms by @lostmsu in #1365
- Fix exception string by @filmor in #1360
- ParameterInfo.Name needs to be checked for null before usage by @filmor in #1375
- Monthly NuGet release previews by @lostmsu in #1381
- Sign Runtime DLL with a strong name by @gpetrou in #1382
- New loading based on clr_loader by @filmor in #1373
- Simplify PyScope by delegating ownership to PyObject instance by @lostmsu in #1367
- implement list codec by @koubaa in #1084
- Ensure interned strings can not be referenced after InternString.Shutdown by @lostmsu in #1394
- Made InterruptTest more robust by @lostmsu in #1393
- Adjust static libpython detection by @filmor in #1396
- Remove Utf8Marshaler, set PyScope base class to PyObject, added PyModule by @lostmsu in #1391
- ImportHook cleanup + PyObject.Length exception by @lostmsu in #1400
- Suggest to set Runtime.PythonDLL when embedding in .NET by @lostmsu in #1411
- Allow GIL state debugging; require GILState to be properly disposed by @lostmsu in #1397
- Try libdl.so.2 on Linux before libdl.so by @lostmsu in #1425
- PyType class, wrapper for Python types by @lostmsu in #1395
- Reworked Enum marshaling by @lostmsu in #1392
- Prevent stack overflow when an encoder is registered from Python by @lostmsu in #1429
- Do not call
find_libpython
duringimport clr
as Python.Runtime can find it on its own by @lostmsu in #1440 - Fixed
__cause__
on overload bind failure and array conversion by @lostmsu in #1442 - Replace magic offsets with proper offset calculation by @lostmsu in #1441
- Detect Py_TRACE_REFS at runtime and calculate object offsets accordingly by @lostmsu in #1426
- Re-enable the domain reload tests by @BadSingleton in #1404
- Dispose all temporary objects in PyCheck_Iter_PyObject_IsIterable_ThreadingLock_Test by @lostmsu in #1456
- Use PyType instances instead of raw pointers by @lostmsu in #1431
- Refactoring of tp_dealloc by @lostmsu in #1459
- Refactoring of tp_clear by @lostmsu in #1460
- Handle ProcessExit event by @lostmsu in #1458
- Improve Python <-> .NET exception integration by @lostmsu in #1134
- Add a failing test for Unicode conversion by @pkese in #1467
- Modernize import hook by @BadSingleton in #1369
- Fixed crash in ToArray when sequence explicitly denies len by @lostmsu in #1484
- Prevent crash during debugging when attempting to inspect PyObject by @lostmsu in #1483
- Fixed double call to
PyType_Ready
in CLR MetaType'stp_new
by @lostmsu in #1486 - Create PyIter from existing PyObject by @lostmsu in #1482
- [WIP] Add ability to create module from C# by @slide in #1447
- Fixed custom decoders not working for DateTime and Decimal by @lostmsu in #1497
- Allow substituting base types for CLR types (as seen from Python) by @lostmsu in #1487
- Property descriptor made visible on the reflected class by @lostmsu in #1512
- Validate, that custom Python base types can be inherited from by @lostmsu in #1510
- Names of .NET types changed to better support generic types by @lostmsu in #1509
- Dynamic arithmetic ops raise correct Python exception on failure by @lostmsu in #1508
Py.Import
andPyModule.Import
returnPyObject
instead ofPyModule
by @lostmsu in #1530- Remove
needsResolution
hack by @lostmsu in #1531 - Implements buffer interface for .NET arrays of primitive types by @lostmsu in #1511
- Call tp_clear of base unmanaged type by @lostmsu in #1541
- Allow decoders affect
PyObject.As<object>()
by @lostmsu in #1546 - Added workaround for warning in
threading
module afterTestInterrupt
by @lostmsu in #1560 ClassManager
illegally decrefedClassObject
's refcount on shutdown by @lostmsu in #1563- Ensure tests, that need running
PythonEngine
have similarSetUp
andTearDown
by @lostmsu in #1564 - Allow decoding instanceless exceptions by @lostmsu in #1544
- Do not clean
tpHandle
inClassBase.tp_clear
- it might be used intp_dealloc
by @lostmsu in #1566 - Mixins for standard collections that implement
collections.abc
interfaces by @lostmsu in #1543 - Allow Python to overwrite .NET methods by @lostmsu in #1545
- Simplify
Dispatcher
by @lostmsu in #1559 - Simplify assembly
ResolveHandler
, and use official assembly name parsing by @lostmsu in #1570 - Disable implicit conversions that might lose information by @lostmsu in #1568
- Minor fixup for no autoconversions PR by @lostmsu in #1574
- Fixed
FileLoadException
when tryingclr.AddReference('/full/path.dll')
by @lostmsu in #1573 - Raise
BadPythonDllException
instead of confusingTypeLoadException
whenPythonDLL
was not configured properly by @lostmsu in #1577 - Cleaning up public API by @lostmsu in #1557
PyScope
/PyModule
API cleanup by @lostmsu in #1569- name and signature for .NET methods by @lostmsu in #1133
- When reflecting nested types, ensure their corresponding
PyType
is allocated by @lostmsu in #1579 - Safer
GetAttr(name, default)
by @lostmsu in #1578 - Expose
PyType.Get
by @lostmsu in #1581 - Allow user-created instances of
PySequence
andPyIterable
by @lostmsu in #1580 - Changed signature of
IPyObjectDecoder.CanDecode
by @lostmsu in #1583 - Disabled
float
andbool
implicit conversions by @lostmsu in #1584 - Remove a deprecated attribute in PropertyObject by @BadSingleton in #1595
- Python 3.10 by @filmor in #1591
- Make .NET objects that have
__call__
method callable from Python by @lostmsu in #1589 - Fixed recursive dependency in clr module initialization by @lostmsu in #1602
- Include README.md into NuGet package by @lostmsu in #1599
- Remove unused
PythonMethodAttribute
by @lostmsu in #1609 - Track Runtime run number by @lostmsu in #1074
- Use .NET 6.0 LTS and C# 10 by @lostmsu in #1620
- Update NonCopyableAnalyzer to latest version with our changes upstreamed by @lostmsu in #1624
- Use new references by @lostmsu in #1603
- Fixed all warnings except explicit ones by @lostmsu in #1635
- Match generic and private methods upon runtime reload by @lostmsu in #1637
- Require newest available clr-loader by @filmor in #1643
- Fix the PyGILState_STATE type by @filmor in #1645
- Fix warning regarding undefined module on GC Offset Base by @filmor in #1646
- Removed
ShutdownMode
. Now always behaves like originalReload
by @lostmsu in #1638 - When process is exiting, there's no need to save live .NET objects by @lostmsu in #1648
- Moved
Py
class into its own file by @lostmsu in #1649 - Added a regression test for calling base method from nested class by @lostmsu in #1652
- Fixed accessing partially overriden properties from Python by @lostmsu in #1650
- Reworked the way .NET objects are constructed from Python by @lostmsu in #1651
- Improved support for generic method overloading by @lostmsu in #1657
- Use Delegates to access Py_NoSiteFlag by @lostmsu in #1659
- Provide
__int__
instance method on enum types to supportint(Enum.Member)
by @lostmsu in #1661 - Cleanup
PyBuffer
a bit by @lostmsu in #1662 - Support for byref parameters when overriding .NET methods from Python by @lostmsu in #1663
- Performance tests with baseline from Pypi by @filmor in #1667
- Move code to subdirectories and rename or split up by @filmor in #1665
- Added ARM64 CI action by @lostmsu in #1669
- Only run CI on pushes to master and on all pull requests by @filmor in #1670
- Temporary fix method binder for out parameters by @eirannejad in #1672
- Added todo note to ensure CLA is signed by @eirannejad in #1674
- Add tests for exception leaking. by @BadSingleton in #1679
- We can drop the import hack as we are now using the newer import mechanics by @filmor in #1686
- Update CHANGELOG.md by @nobbi1991 in #1690
- Allow dynamic
PyObject
conversion toIEnumerable
by @lostmsu in #1697 - add GitHub URL for PyPi by @andriyor in #1708
- Make methods of
PyObject
inherited from its base .NET classes GIL-safe by @lostmsu in #1711 - Support for
BigInteger
(C#) <->PyInt
by @lostmsu in #1710 - On shutdown from Python release all slot holders by @lostmsu in #1712
- Clear weakref list when reflected object is destroyed by @lostmsu in #1758
- Clear weak reference list when an extension type is destroyed by @lostmsu in #1761
- Fix layout of
NativeTypeSpec
on 32 bit platforms by @lostmsu in #1765 - Implement IConvertible on PyObject by @filmor in #1762
- Ensure that codec tests are run by @filmor in #1763
- Fix decimal default parameters by @filmor in #1773
- Work around potential Mono bug, that hangs the runtime when new threads start by @lostmsu in #1779
- Miscellaneous fixes and cleanups by @filmor in #1760
- Fix enum codec by @filmor in #1621
- Disallow runtime shutdown when the Python error indicator is set by @lostmsu in #1780
- Multiple fixes related to Dictionary.Keys bug by @lostmsu in #1786
- Drop Python 3.6 support by @filmor in #1795
- Move to modern setuptools with pyproject.toml by @filmor in #1793
Min
/MaxSupportedVersion
andIsSupportedVersion
onPythonEngine
by @filmor in #1799Min
/MaxSupportedVersion
andIsSupportedVersion
onPythonEngine
by @lostmsu in #1798- Add explicit tests for vararg call by @filmor in #1805
- Fix demo scripts by @filmor in #1802
- fixed ForbidPythonThreadsAttribute being ignored in certain scenarios by @filmor in #1815
- Add test for enum int conversion by @filmor in #1811
- Implement configuring clr from environment by @filmor in #1817
- Take GIL when checking if error occurred on shutdown by @filmor in #1836
- Fix (U)IntPtr construction by @filmor in #1861
- Fix string construction by @filmor in #1862
- Fix docstring for directly constructed types by @filmor in #1865
- Fixed a leak in
NewReference.Move
by @lostmsu in #1873 - Add XML docs to NuGet by @lostmsu in #1878
- Mention the need for
Initialize
andBeginAllowThreads
in the README by @lostmsu in #1897 - Disabled implicit seq to array conversion by @lostmsu in #1902
- Explicit float and int conversion for builtin types by @filmor in #1904
- Fill nb_index slot for integer types by @filmor in #1907
- Fixed use of the process handle after Process instance is garbage collected by @lostmsu in #1940
- Fixed new line character at the end of informational version by @lostmsu in #1941
- Enabled test for NoStackOverflowOnSystemType by @lostmsu in #1943
- Config-less CoreCLR and improved runtime load message by @filmor in #1942
- Implicit float conversion in function calls by @filmor in #1908
- Documentation by @filmor in #1863
New Contributors
- @DanBarzilian made their first contribution in #1160
- @SFM61319 made their first contribution in #1208
- @danabr made their first contribution in #1241
- @alxnull made their first contribution in #1247
- @BadSingleton made their first contribution in #1328
- @tminka made their first contribution in #1326
- @christabella made their first contribution in #1324
- @gpetrou made their first contribution in #1337
- @pkese made their first contribution in #1467
- @eirannejad made their first contribution in #1672
- @nobbi1991 made their first contribution in #1690
- @andriyor made their first contribution in #1708
Full Changelog: v2.5.2...v3.0.0