Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.

Overview

pythonnet - Python.NET

Join the chat at https://gitter.im/pythonnet/pythonnet stackexchange shield

gh shield appveyor shield

license shield

pypi package version conda-forge version python supported shield

nuget preview shield nuget release shield

Python.NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers. It allows Python code to interact with the CLR, and may also be used to embed Python into a .NET application.

Note

The master branch of this repository tracks the ongoing development of version 3.0. Backports of patches to 2.5 are tracked in the backports-2.5 branch.

Calling .NET code from Python

Python.NET allows CLR namespaces to be treated essentially as Python packages.

import clr
from System import String
from System.Collections import *

To load an assembly, use the AddReference function in the clr module:

import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import Form

Embedding Python in .NET

  • You must set Runtime.PythonDLL property or PYTHONNET_PYDLL environment variable starting with version 3.0, otherwise you will receive TypeInitializationException. Typical values are python38.dll (Windows), libpython3.8.dylib (Mac), libpython3.8.so (most other *nix).
  • All calls to python should be inside a using (Py.GIL()) {/* Your code here */} block.
  • Import python modules using dynamic mod = Py.Import("mod"), then you can call functions as normal, eg mod.func(args).
  • Use mod.func(args, Py.kw("keywordargname", keywordargvalue)) or mod.func(args, keywordargname: keywordargvalue) to apply keyword arguments.
  • All python objects should be declared as dynamic type.
  • Mathematical operations involving python and literal/managed types must have the python object first, eg. np.pi * 2 works, 2 * np.pi doesn't.

Example

static void Main(string[] args)
{
    using (Py.GIL())
    {
        dynamic np = Py.Import("numpy");
        Console.WriteLine(np.cos(np.pi * 2));

        dynamic sin = np.sin;
        Console.WriteLine(sin(5));

        double c = np.cos(5) + sin(5);
        Console.WriteLine(c);

        dynamic a = np.array(new List<float> { 1, 2, 3 });
        Console.WriteLine(a.dtype);

        dynamic b = np.array(new List<float> { 6, 5, 4 }, dtype: np.int32);
        Console.WriteLine(b.dtype);

        Console.WriteLine(a * b);
        Console.ReadKey();
    }
}

Output:

1.0
-0.958924274663
-0.6752620892
float64
int32
[  6.  10.  12.]

Resources

Information on installation, FAQ, troubleshooting, debugging, and projects using pythonnet can be found in the Wiki:

https://github.com/pythonnet/pythonnet/wiki

Mailing list
https://mail.python.org/mailman/listinfo/pythondotnet
Chat
https://gitter.im/pythonnet/pythonnet

.NET Foundation

This project is supported by the .NET Foundation.

Comments
  • add a scope class to manage the context of interaction with Python an…

    add a scope class to manage the context of interaction with Python an…

    It‘s a prototype of this proposal here to help its discussion.

    Modifications are located at file pythonengine.cs, A class named PyScope was added for the variable management and exchanging between .NET and Python.

    Several unit tests were given in a new file "src/embed_tests/pyscope.cs" which can be used as examples.

    One of the example,

    using (Py.GIL())
    {
        dynamic ps = Py.CreateScope();
        ps.Set("bb", 100);         //declare a variable
        ps.cc = 10;                  //declare a variable dynamically
        int aa = ps.Eval<int>("bb+cc+3");     //113
    
        //add a function to the scope, and call it
        //global keyword was used here to show what pyscope can do 
        ps.aa = 0; 
        ps.Exec(
            "def func1():\n" +
            "    global aa \n" +
            "    aa = bb+cc+3 \n"            
        );
        ps.func1(); //call the function
        int aa1 = ps.Get<int>("aa");  //get variable
        int aa2 = ps.aa.As<int>();     //get variable dynamically
    
        //create a new scope and import the variables
        PyScope ps2 = ps.CreateScope();
        ps2.ImportModule("numpy", "np");
        var aa3 = ps2.Eval<float>("np.sin(bb)");
    }
    
    opened by yagweb 71
  • .NET Core support and CoreCLR embedding - cross-platform API

    .NET Core support and CoreCLR embedding - cross-platform API

    Looks like with CoreCLR the unmanaged exports "hack" for embedding CLR can be extended by cross-platform hosting API:

    https://github.com/dotnet/coreclr/issues/1256

    This would allow simple C/C++ code to embed CLR

    Current state of .NET Core support:

    https://github.com/pythonnet/pythonnet/issues/96#issuecomment-430465993

    opened by denfromufa 61
  • Update License - MIT

    Update License - MIT

    I'm not sure about the entire history of the license, but it looks to have been chosen when the project originally was hosted on the zope.org community site. As the project as grown, I think its time to update the license to one that provides the same rights and protections but its more commonly known BSD 3-clause

    ~~As very minimum I would like to update the license from the current zope 2.0 to its more friendly written revision zope 2.1~~

    The license proposed is MIT License.


    MIT license - list of contributors and status on approval:

    • [ ] @tiran
    • [x] @ArvidJB
    • [x] @BartonCline
    • [x] @bltribble
    • [x] @brianlloyd
    • [x] @davidanthoff
    • [x] @denfromufa
    • [x] @dgsantana
    • [x] @dlech
    • [x] @dmitriyse
    • [x] @fdanny
    • [x] @filmor
    • [x] @hsoft (github) #hardcoded (sourceforge)
    • [x] @jfrayne (Joe Frayne from sourceforge)
    • [x] @jreback
    • [x] @johnburnett
    • [x] @leith-bartrich
    • [x] @lstratman
    • [x] @matthid
    • [x] @omnicognate
    • [x] @patstew
    • [x] @rico-chet
    • [x] @rmadsen-ks
    • [x] @rnestler
    • [x] @sdpython
    • [x] @stonebig
    • [x] @sweinst
    • [x] @swinstanley
    • [x] @t3476
    • [x] @tonyroberts
    • [x] @vmuriart
    • [x] @zanedp
    opened by vmuriart 56
  • Add python buffer api support

    Add python buffer api support

    What does this implement/fix? Explain your changes.

    Passing data like images from managed to python will be easyer than ever! I implemented the python buffer api which makes copying big chunks of data directly into the python object buffer possible!

    You can copy strings to python object:

    PyObject array = scope.Eval("bytearray(3)");
    byte[] managedArr = new UTF8Encoding().GetBytes(new char[] { 'a', 'b', 'c' });
    
    PyBuffer buf = array.GetBuffer(out bool success, 0);
    if (success)
    {
        buf.WriteToBuffer(managedArr, 0, managedArr.Length);
        buf.Release();
    }
    

    Or copy images to python byte arrays:

    byte[] imageArr = LoadImage();
    PyObject array = scope.Eval("bytearray(" + managedArr.Length + ")");
    
    PyBuffer buf = array.GetBuffer(out bool success, 0);
    if (success)
    {
        buf.WriteToBuffer(managedArr, 0, managedArr.Length);
        buf.Release();
    }
    

    Does this close any currently open issues?

    No

    Any other comments?

    ...

    Checklist

    Check all those that are applicable and complete.

    • [x] Make sure to include one or more tests for your change
    • [x] If an enhancement PR, please create docs and at best an example
    • [x] Add yourself to AUTHORS
    • [x] Updated the CHANGELOG
    opened by SnGmng 48
  • Release 2.2.1

    Release 2.2.1

    I guess it's general consensus (even though we have a v2.2.0 tag which is incompatible with our conda recipe) that we haven't released, yet, so I'd like to list up what's to do and to merge before we deem this done (and maybe we'll hold off merging new features until then):

    • [x] Get rid of the v2.2.0 tag
    • [x] Merge #314 to finalise the license change
    • [x] Merge #320
    • [x] Drop Python 2.6 and at least 3.2 from the officially supported Python versions
    • ~~Fix issue #262 ?~~
    • [x] Finalise the release
      • [x] Update the README and CHANGELOG
      • [x] Tag as 2.2.1
    • [x] Upload to testpypi and test
    • [x] Upload to pypi and conda-forge
    opened by filmor 43
  • CoreCLR msbuild (xplat) support. Initial compilable version.

    CoreCLR msbuild (xplat) support. Initial compilable version.

    What does this implement/fix? Explain your changes.

    This is initial step in a long road to add "xplat" build tools support into python.net. ...

    Does this close any currently open issues?

    Not closes but will helps to solve those: https://github.com/pythonnet/pythonnet/issues/96

    ...

    Any other comments?

    Or even do everything in the master, because this xplat support should be implemented as side-by-side to the current build system. Later in the branch coreclr2 we can track master and also allow to build NetStandart 2.0 target. ...

    Checklist

    Check all those that are applicable and complete.

    • [] Make sure to include one or more tests for your change
    • [] If an enhancement PR, please create docs and at best an example
    • [] Add yourself to AUTHORS
    • [] Updated the CHANGELOG
    opened by dmitriyse 41
  • can not make calls to Python on a separate thread

    can not make calls to Python on a separate thread

    The following (copies from Example) worked fine using (Py.GIL()) { dynamic test = Py.Import("programs.test_program"); Console.WriteLine(test.func(args)); }

    However, the below ends up hanging forever even though it's the same one line program as above. Without the ability to run on a separate thread how can I kill an execution if it takes too long. We deal with massive amount of python scripts at runtime it's gonna be a pain to modify them to terminated the costly computation.

    using (Py.GIL())
    {
          dynamic test = Py.Import("programs.test_program");
    
          Thread t = new Thread(delegate () {
                  Console.WriteLine(test.func(args));
        });
    }
    
    opened by keowang 39
  • Some fixes.

    Some fixes.

    Fixes a bunch issues I encountered when trying to implement https://github.com/matthid/googleMusicAllAccess.

    Note: this includes #194 (because I needed the fix), let me know when you merge #194 so I can rebase and remove the last commit.

    opened by matthid 39
  • Initial coreclr and build tooling

    Initial coreclr and build tooling

    Can load .NET Core into python

    Pass clr PyObject back to Python

    What does this implement/fix? Explain your changes.

    Allows Python.Runtime to be embedded in python via the .NET Core CLR

    ...

    Does this close any currently open issues?

    Partially addresses #96 ...

    Any other comments?

    ...

    Checklist

    Check all those that are applicable and complete.

    • [ ] Make sure to include one or more tests for your change
    • [ ] If an enhancement PR, please create docs and at best an example
    • [ ] Add yourself to AUTHORS
    • [ ] Updated the CHANGELOG
    opened by djoyce82 38
  • pypy support in pythonnet

    pypy support in pythonnet

    cpyext is mature enough (numpy, cython, scipy, pandas soon) to support pythonnet in pypy. In fact pypy used to have a branch which ran on top of CLR (similar to IronPython), but this branch is not maintained.

    The use of pypy in .NET is quite popular request:

    http://stackoverflow.com/questions/6084697/is-it-possible-to-embed-pypy-into-a-net-application

    The only limitation of pypy is 32-bit on Windows and poor support for Python 3+, although the latter is improving with funding from Mozilla.

    Also this might be quite nice collaboration with pypy developers due to their level of expertise in python C-API and cffi.

    opened by denfromufa 38
  • Implicit List conversion breaks backwards compatibility + numpy support

    Implicit List conversion breaks backwards compatibility + numpy support

    Environment

    Computer 1:

    • Pythonnet version: 2.3, installed via pip I think
    • Python version: 2.7.12
    • Operating System: Ubuntu 16.04.2

    Computer 2:

    • Pythonnet version: manual build on master from commit ce14424 (currently 11 commits behind)
    • Python version: 2.7.12
    • Operating System: Ubuntu 16.04.2

    Details

    Description: Python calls .NET function which returns a List. Python then passes the return value, without modification, to a second .NET function which accepts a List. Computer 1 executes this code just fine. On Computer 2, there is no .NET function found that matches the arguments because the return value of the .NET function has been transformed into a Python list.

    Python code:

    import clr
    from MyDotNetProject import PythonInterop
    
    x = PythonInterop.GetDoubleList()
    PythonInterop.PrintDoubleList(x)
    

    .NET code:

        public class PythonInterop
        {
            public static List<Double> GetDoubleList() {
                var result = new List<Double>();
                result.Add(1);
                result.Add(2);
                result.Add(3);
                return result;
            }
    
            public static void PrintDoubleList(List<Double> list) {
                Console.WriteLine("You list has " + list.Count + " elements");
            }
        }
    

    The Python code works fine on Computer 1. On Computer 2, the PrintDoubleList call produces TypeError: No method matches given arguments

    If I print type(x) in Python, Computer 1 gives me a .NET List type while Computer 2 gives me a Python list. I can print x.Count on Computer 1, but I get a missing attribute error on Computer 2.

    If I build manually from the 2.3 tag, I get the same (good) behavior as on Computer 1.

    It seems that some feature has been partially added to automatically convert .NET objects into Python objects when possible. I suppose this is ok (though I would prefer that not happen because I don't want the mandatory performance hit of converting even when I don't want to convert), but if that's the intention, there must be automatic conversion of Python objects to .NET objects also. One without the other is a critical bug.

    bug 
    opened by BenjaminPelletier 36
  • Getting an error on python v9.10+

    Getting an error on python v9.10+ "Cannot create uninitialized instances of types requiring managed activation"

    Environment

    • Pythonnet version: 3.0.1
    • Python version: 3.11.1
    • Operating System: windows
    • .NET Runtime: v4.0.30319

    Details

    • using CLR with 3D app - Solidworks gives me an error:

    Unhandled Exception: System.NotSupportedException: Cannot create uninitialized instances of types requiring managed activation. at System.Runtime.Serialization.FormatterServices.nativeGetUninitializedObject(RuntimeType type) at Python.Runtime.ClassObject.tp_new_impl(BorrowedReference tp, BorrowedReference args, BorrowedReference kw) at Python.Runtime.NativeCall.Call_3(IntPtr fp, BorrowedReference a1, BorrowedReference a2, BorrowedReference a3) at Python.Runtime.MetaType.tp_call(BorrowedReference tp, BorrowedReference args, BorrowedReference kw)

    import clr clr.AddReference("C:\Program Files\SOLIDWORKS 2019\SOLIDWORKS\SolidWorks.Interop.sldworks.dll") <System.Reflection.RuntimeAssembly object at 0x00000285677E4900> from SolidWorks.Interop.sldworks import ISldWorks, SldWorksClass swApp = ISldWorks(SldWorksClass())

    This happening only on python 3.10+ on 3.9 it works well.

    update: The problem is not with the python version, but using VENV. Outside VENV its working well, but once I setup VENV (any ver) i'm getting the error.

    opened by alxkos 0
  • Improved Type Interop with CLR

    Improved Type Interop with CLR

    What does this implement/fix? Explain your changes.

    This PR addresses these issues:

    • Current pythonnet does not allow subclassing from CLR Abstract classes
    • Running python script with types containing __namespace__, more than once, would throw Type Exists exception
    • Calling super().VirtualMethod() inside a python-derived virtual method, would result in an infinite loop

    Due to the nature of the changes, this is a single PR instead of multiple smaller ones.

    After PR merge:

    • Python types can derive from CLR abstract classes. As before, abstract methods that are not implemented on the python type, will dynamically throw NotImplemented exception.
    • Specifying __namespace__ is not required to created a ClassDerived anymore. All python derived classes are now represented by ClassDerived in managed memory.
    • ClassDerived now caches generated types based on namespace, type name, and chain of base classes. This avoids regenerating types or throwing Type Already Exists exceptions. A new format for generated type names include full name of base class and interfaces in the typename. The naming format still ends in the python type name to be backward compatible and passes the unit tests
      • Example: Full name of derived clr type for python type named SubClass, deriving from BaseClass and implementing BaseInterface1 and BaseInterface2: Python.Runtime.Dynamic.BaseClass__BaseInterface1__BaseInterface2__main__SubClass
    • Support for one base class and multiple interfaces (Merged some ideas and code from #2028 - Potential merge conflicts)
    • Derived class can call chosen constructors using super().__init__() pattern.
    class SubClass(BaseClassA):
       def __init__(self, v):
           super().__init__(v)
    
    • Derived class can call base virtual methods using super().method() pattern.
    class SubClass(BaseClassA):
        def DoWorkWith(self, value):
            r = super().DoWorkWith(value) + 10
            return r
    
    • Improved virtual method and getter/setter routing. Custom attributes (OriginalMethod and RedirectedMethod) are now used to mark the original and redirected virtual methods. The method name format for OriginalMethod is changed to $"_BASEVIRTUAL__{name}" so it can handle calling original methods on base classes that does not match the name of current class. Previously this was not working.
    • Other misc refactoring and improvements. No change in behavior.

    Does this close any currently open issues?

    Potentially (no tests have been done to ensure these issues are resolved)

    • #1945
    • #1107
    • #1787

    Any other comments?

    ...

    Checklist

    Check all those that are applicable and complete.

    • [X] Make sure to include one or more tests for your change
    • [X] If an enhancement PR, please create docs and at best an example
    • [X] Ensure you have signed the .NET Foundation CLA
    • [X] Add yourself to AUTHORS
    • [X] Updated the CHANGELOG
    opened by eirannejad 0
  • Added a decoder to be able to handle Func<> parameters

    Added a decoder to be able to handle Func<> parameters

    What does this implement/fix? Explain your changes.

    It's a decoder to ease use of C# Func<> method arguments. Previously, it was necessary to cast the python lambda expression to System.Func[...] which is very cumbersome for a script-user.

    Does this close any currently open issues?

    Was not my intention.

    Any other comments?

    The solution I used is quite complex as it needs the create wrapper types for each Func-Type-Variant. Code creation is implemented using the IL Code Generator, types are cached, generic type arguments are again converted using ToPython()

    I hope my change is of some help!

    Checklist

    Check all those that are applicable and complete.

    • [ ] Make sure to include one or more tests for your change
    • [ ] If an enhancement PR, please create docs and at best an example
    • [ ] Ensure you have signed the .NET Foundation CLA (mongoDB error)
    • [ ] Add yourself to AUTHORS
    • [ ] Updated the CHANGELOG
    opened by Romout 1
  • Allo the setting of the python module file in order to create a virtu…

    Allo the setting of the python module file in order to create a virtu…

    …al package structure

    What does this implement/fix? Explain your changes.

    So virtual package structures can be created.

    Does this close any currently open issues?

    Issue 2043

    Any other comments?

    Change piggy backs off of existing static method.

    Checklist

    Check all those that are applicable and complete.

    • [x] Make sure to include one or more tests for your change
    • [x] If an enhancement PR, please create docs and at best an example
    • [x] Ensure you have signed the .NET Foundation CLA
    • [x] Add yourself to AUTHORS
    • [x] Updated the CHANGELOG
    opened by bmello4688 0
  • Add ability to set python module file string instead of it always being None

    Add ability to set python module file string instead of it always being None

    Environment

    • Pythonnet version: Latest
    • Python version: 3.7+
    • Operating System: All
    • .NET Runtime: All

    Details

    • Describe what you were trying to get done.

      When creating a python module from a string (PyModule FromString) the file parameter is always set to None. If I want to create a virtual package structure in memory I need to be able to set file to a specified file structure.

    opened by bmello4688 3
Releases(v3.0.1)
  • v3.0.1(Nov 2, 2022)

    What's Changed

    • Implemented dynamic equality and inequality for PyObject instances by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1849
    • Got rid of a few deprecation warnings that pollute GitHub code review by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1850
    • docs: Fix a few typos by @timgates42 in https://github.com/pythonnet/pythonnet/pull/1879
    • Merge release branch back into master by @filmor in https://github.com/pythonnet/pythonnet/pull/1866
    • Delete target object from event handler collections when it has no more event handlers by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1973
    • Allow decoders to decode Python types derived from primitives by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1986
    • Fix positive PyInt converted to negative BigInteger by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1993
    • Python 3.11 by @filmor in https://github.com/pythonnet/pythonnet/pull/1955
    • Fix implementing a generic interface with a Python class by @filmor in https://github.com/pythonnet/pythonnet/pull/1998

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0...v3.0.1

    Source code(tar.gz)
    Source code(zip)
    pythonnet-3.0.1-py3-none-any.whl(277.84 KB)
    pythonnet-3.0.1.tar.gz(414.82 KB)
    pythonnet.3.0.1.nupkg(214.56 KB)
    pythonnet.3.0.1.snupkg(79.11 KB)
  • v3.0.0(Sep 29, 2022)

    What's Changed

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

    New Contributors

    • @DanBarzilian made their first contribution in https://github.com/pythonnet/pythonnet/pull/1160
    • @SFM61319 made their first contribution in https://github.com/pythonnet/pythonnet/pull/1208
    • @danabr made their first contribution in https://github.com/pythonnet/pythonnet/pull/1241
    • @alxnull made their first contribution in https://github.com/pythonnet/pythonnet/pull/1247
    • @BadSingleton made their first contribution in https://github.com/pythonnet/pythonnet/pull/1328
    • @tminka made their first contribution in https://github.com/pythonnet/pythonnet/pull/1326
    • @christabella made their first contribution in https://github.com/pythonnet/pythonnet/pull/1324
    • @gpetrou made their first contribution in https://github.com/pythonnet/pythonnet/pull/1337
    • @pkese made their first contribution in https://github.com/pythonnet/pythonnet/pull/1467
    • @eirannejad made their first contribution in https://github.com/pythonnet/pythonnet/pull/1672
    • @nobbi1991 made their first contribution in https://github.com/pythonnet/pythonnet/pull/1690
    • @andriyor made their first contribution in https://github.com/pythonnet/pythonnet/pull/1708

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v2.5.2...v3.0.0

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-rc6(Sep 20, 2022)

    What's Changed

    • Implicit float conversion in function calls by @filmor in https://github.com/pythonnet/pythonnet/pull/1908

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0-rc5...v3.0.0-rc6

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-rc5(Sep 18, 2022)

    What's Changed

    • Add XML docs to NuGet by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1878
    • Mention the need for Initialize and BeginAllowThreads in the README by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1897
    • Disabled implicit seq to array conversion by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1902
    • Explicit float and int conversion for builtin types by @filmor in https://github.com/pythonnet/pythonnet/pull/1904
    • Fill nb_index slot for integer types by @filmor in https://github.com/pythonnet/pythonnet/pull/1907
    • Fixed use of the process handle after Process instance is garbage collected by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1940
    • Fixed new line character at the end of informational version by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1941
    • Enabled test for NoStackOverflowOnSystemType by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1943
    • Config-less CoreCLR and improved runtime load message by @filmor in https://github.com/pythonnet/pythonnet/pull/1942

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0-rc4...v3.0.0-rc5

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-rc4(Jul 16, 2022)

    What's Changed

    • Fixed a leak in NewReference.Move by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1873

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0-rc3...v3.0.0-rc4

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-rc3(Jul 11, 2022)

    What's Changed

    • Fix (U)IntPtr construction by @filmor in https://github.com/pythonnet/pythonnet/pull/1861
    • Fix string construction by @filmor in https://github.com/pythonnet/pythonnet/pull/1862
    • Fix docstring for directly constructed types by @filmor in https://github.com/pythonnet/pythonnet/pull/1865

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0-rc2...v3.0.0-rc3

    Source code(tar.gz)
    Source code(zip)
    pythonnet-3.0.0rc3-py3-none-any.whl(244.42 KB)
    pythonnet-3.0.0rc3.tar.gz(373.41 KB)
    pythonnet.3.0.0-rc3.nupkg(183.17 KB)
    pythonnet.3.0.0-rc3.snupkg(77.37 KB)
  • v3.0.0-rc2(Jul 5, 2022)

  • v3.0.0-rc1(Jun 27, 2022)

    What's Changed

    • Match generic and private methods upon runtime reload by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1637
    • Require newest available clr-loader by @filmor in https://github.com/pythonnet/pythonnet/pull/1643
    • Fix the PyGILState_STATE type by @filmor in https://github.com/pythonnet/pythonnet/pull/1645
    • Fix warning regarding undefined module on GC Offset Base by @filmor in https://github.com/pythonnet/pythonnet/pull/1646
    • Removed ShutdownMode. Now always behaves like original Reload by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1638
    • When process is exiting, there's no need to save live .NET objects by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1648
    • Moved Py class into its own file by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1649
    • Added a regression test for calling base method from nested class by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1652
    • Fixed accessing partially overriden properties from Python by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1650
    • Reworked the way .NET objects are constructed from Python by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1651
    • Improved support for generic method overloading by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1657
    • Use Delegates to access Py_NoSiteFlag by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1659
    • Provide __int__ instance method on enum types to support int(Enum.Member) by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1661
    • Cleanup PyBuffer a bit by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1662
    • Support for byref parameters when overriding .NET methods from Python by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1663
    • Performance tests with baseline from Pypi by @filmor in https://github.com/pythonnet/pythonnet/pull/1667
    • Move code to subdirectories and rename or split up by @filmor in https://github.com/pythonnet/pythonnet/pull/1665
    • Added ARM64 CI action by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1669
    • Only run CI on pushes to master and on all pull requests by @filmor in https://github.com/pythonnet/pythonnet/pull/1670
    • Temporary fix method binder for out parameters by @eirannejad in https://github.com/pythonnet/pythonnet/pull/1672
    • Added todo note to ensure CLA is signed by @eirannejad in https://github.com/pythonnet/pythonnet/pull/1674
    • Add tests for exception leaking. by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1679
    • We can drop the import hack as we are now using the newer import mechanics by @filmor in https://github.com/pythonnet/pythonnet/pull/1686
    • Update CHANGELOG.md by @nobbi1991 in https://github.com/pythonnet/pythonnet/pull/1690
    • Allow dynamic PyObject conversion to IEnumerable by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1697
    • add GitHub URL for PyPi by @andriyor in https://github.com/pythonnet/pythonnet/pull/1708
    • Make methods of PyObject inherited from its base .NET classes GIL-safe by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1711
    • Support for BigInteger (C#) <-> PyInt by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1710
    • On shutdown from Python release all slot holders by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1712
    • Clear weakref list when reflected object is destroyed by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1758
    • Clear weak reference list when an extension type is destroyed by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1761
    • Fix layout of NativeTypeSpec on 32 bit platforms by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1765
    • Implement IConvertible on PyObject by @filmor in https://github.com/pythonnet/pythonnet/pull/1762
    • Ensure that codec tests are run by @filmor in https://github.com/pythonnet/pythonnet/pull/1763
    • Fix decimal default parameters by @filmor in https://github.com/pythonnet/pythonnet/pull/1773
    • Work around potential Mono bug, that hangs the runtime when new threads start by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1779
    • Miscellaneous fixes and cleanups by @filmor in https://github.com/pythonnet/pythonnet/pull/1760
    • Fix enum codec by @filmor in https://github.com/pythonnet/pythonnet/pull/1621
    • Disallow runtime shutdown when the Python error indicator is set by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1780
    • Multiple fixes related to Dictionary.Keys bug by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1786
    • Drop Python 3.6 support by @filmor in https://github.com/pythonnet/pythonnet/pull/1795
    • Move to modern setuptools with pyproject.toml by @filmor in https://github.com/pythonnet/pythonnet/pull/1793
    • Min/MaxSupportedVersion and IsSupportedVersion on PythonEngine by @filmor in https://github.com/pythonnet/pythonnet/pull/1799
    • Min/MaxSupportedVersion and IsSupportedVersion on PythonEngine by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1798
    • Add explicit tests for vararg call by @filmor in https://github.com/pythonnet/pythonnet/pull/1805
    • Fix demo scripts by @filmor in https://github.com/pythonnet/pythonnet/pull/1802
    • fixed ForbidPythonThreadsAttribute being ignored in certain scenarios by @filmor in https://github.com/pythonnet/pythonnet/pull/1815
    • Add test for enum int conversion by @filmor in https://github.com/pythonnet/pythonnet/pull/1811
    • Implement configuring clr from environment by @filmor in https://github.com/pythonnet/pythonnet/pull/1817
    • Take GIL when checking if error occurred on shutdown by @filmor in https://github.com/pythonnet/pythonnet/pull/1836

    New Contributors

    • @eirannejad made their first contribution in https://github.com/pythonnet/pythonnet/pull/1672
    • @nobbi1991 made their first contribution in https://github.com/pythonnet/pythonnet/pull/1690
    • @andriyor made their first contribution in https://github.com/pythonnet/pythonnet/pull/1708

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0-a2...v3.0.0-rc1

    Source code(tar.gz)
    Source code(zip)
    pythonnet-3.0.0rc1-py3-none-any.whl(242.71 KB)
    pythonnet-3.0.0rc1.tar.gz(1.48 MB)
    pythonnet.3.0.0-rc1.nupkg(182.32 KB)
    pythonnet.3.0.0-rc1.snupkg(76.84 KB)
  • v3.0.0-a2(Dec 22, 2021)

    What's Changed

    • Track Runtime run number by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1074
    • Use .NET 6.0 LTS and C# 10 by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1620
    • Update NonCopyableAnalyzer to latest version with our changes upstreamed by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1624
    • Use new references by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1603
    • Fixed all warnings except explicit ones by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1635

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v3.0.0-a1...v3.0.0-a2

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0-a1(Dec 22, 2021)

    What's Changed

    • Increase ob's ref count in tp_repr to avoid accidental free by @DanBarzilian in https://github.com/pythonnet/pythonnet/pull/1160
    • fixed crash due to a decref of a borrowed reference in params array handling by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1163
    • Drop Python 2 support by @filmor in https://github.com/pythonnet/pythonnet/pull/1158
    • remove remoting block for .NET standard by @koubaa in https://github.com/pythonnet/pythonnet/pull/1170
    • Pybuffer by @koubaa in https://github.com/pythonnet/pythonnet/pull/1195
    • Fix appveyor would only test the PyPI package by @amos402 in https://github.com/pythonnet/pythonnet/pull/1200
    • Remove unnecessary CheckExceptionOccurred calls by @amos402 in https://github.com/pythonnet/pythonnet/pull/1175
    • Provide more info about failuers to load CLR assemblies by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1076
    • Add syntax highlighting to Python code examples in README.rst [docs] by @SFM61319 in https://github.com/pythonnet/pythonnet/pull/1208
    • Remove non-existent PInvoke functions by @amos402 in https://github.com/pythonnet/pythonnet/pull/1205
    • Bad params object[] precedence (master) by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1224
    • drop 3.4 and 3.5 by @koubaa in https://github.com/pythonnet/pythonnet/pull/1227
    • really remove old versions by @koubaa in https://github.com/pythonnet/pythonnet/pull/1230
    • Added a test for finalization on shutdown by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1206
    • fix compiler warning by @koubaa in https://github.com/pythonnet/pythonnet/pull/1226
    • Ensure only implementers of IEnumerable or IEnumerator are considered Iterable by @danabr in https://github.com/pythonnet/pythonnet/pull/1241
    • Select correct method to invoke when keyword arguments are used by @danabr in https://github.com/pythonnet/pythonnet/pull/1242
    • Wrap returned objects in interface if method return type is interface by @danabr in https://github.com/pythonnet/pythonnet/pull/1240
    • Non-delegate types should not be callable by @alxnull in https://github.com/pythonnet/pythonnet/pull/1247
    • Make indexers work for interface objects by @danabr in https://github.com/pythonnet/pythonnet/pull/1246
    • Make it possible to use inherited indexers by @danabr in https://github.com/pythonnet/pythonnet/pull/1248
    • Add soft shutdown by @amos402 in https://github.com/pythonnet/pythonnet/pull/958
    • Fixed dllLocal not being initialized. by @benoithudson in https://github.com/pythonnet/pythonnet/pull/1252
    • Return interface objects when iterating over interface collections by @danabr in https://github.com/pythonnet/pythonnet/pull/1257
    • Make len work for ICollection<> interface objects by @danabr in https://github.com/pythonnet/pythonnet/pull/1253
    • Enable Source Link and symbol package generation during build by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1259
    • Fixed polyfill for TypeBuilder.CreateType by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1261
    • fix wrongly cased Microsoft.CSHARP.Targets by @vivainio in https://github.com/pythonnet/pythonnet/pull/1271
    • Intern string by @amos402 in https://github.com/pythonnet/pythonnet/pull/1254
    • Use .NET Core 3.1 LTS for tests (instead of 2.0) by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1279
    • Python 3.9 by @filmor in https://github.com/pythonnet/pythonnet/pull/1264
    • Remove deprecated implicit assembly loading by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1277
    • Ensure methods of Object are also available on interface objects by @danabr in https://github.com/pythonnet/pythonnet/pull/1284
    • Fix kwarg func resolution by @jmlidbetter in https://github.com/pythonnet/pythonnet/pull/1136
    • Allow creating new .NET arrays from Python using Array[T](dim1, dim2,…) syntax by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1291
    • Detect the size of wchar_t (aka Runtime.UCS) at runtime using PyUnicode_GetMax by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1298
    • TypeOffset class no longer depends on target Python version by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1292
    • [Out] parameters no longer added to return tuple by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1308
    • Added github actions workflow to replace travis by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1307
    • Convert projects to SDK style by @filmor in https://github.com/pythonnet/pythonnet/pull/1209
    • Test other Operating Systems than Linux via Github Actions by @filmor in https://github.com/pythonnet/pythonnet/pull/1310
    • Ensure that param-array matching works correctly by @filmor in https://github.com/pythonnet/pythonnet/pull/1304
    • Remove API warnings as these will be stabilised for 3.0 by @filmor in https://github.com/pythonnet/pythonnet/pull/1315
    • Replace custom platform handling by RuntimeInformation by @filmor in https://github.com/pythonnet/pythonnet/pull/1314
    • Fixed CollectBasicObject test by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1313
    • Implement inplace building and develop by @filmor in https://github.com/pythonnet/pythonnet/pull/1317
    • Drop the long-deprecated CLR.* alias by @filmor in https://github.com/pythonnet/pythonnet/pull/1319
    • Fix or disable warnings in Python.Runtime by @filmor in https://github.com/pythonnet/pythonnet/pull/1318
    • Fixed segfault in ClassDerived.tp_dealloc by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1330
    • Fixed crash in finalizer of CLR types defined in Python, that survive engine shutdown by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1260
    • Test for non-ASCII encoded method name by @filmor in https://github.com/pythonnet/pythonnet/pull/1329
    • Fix illegal delegate usage by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1328
    • PyIter: do not force dispose previous object upon moving to the next one by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1331
    • Incorrectly using a non-generic type with type parameters now produces a helpful Python error instead of throwing NullReferenceException by @tminka in https://github.com/pythonnet/pythonnet/pull/1326
    • Call PyErr_NormalizeException for exceptions by @slide in https://github.com/pythonnet/pythonnet/pull/1265
    • TestPythonEngineProperties.SetPythonPath avoids corrupting the module search path for later tests by @tminka in https://github.com/pythonnet/pythonnet/pull/1336
    • ABI.Initialize gives a helpful message when the TypeOffset interop class is not configured correctly by @tminka in https://github.com/pythonnet/pythonnet/pull/1340
    • Better error messages from PyObject.AsManagedObject and DelegateManager.TrueDispatch by @tminka in https://github.com/pythonnet/pythonnet/pull/1344
    • Python tests can now be debugged by running them as embedded tests within NUnit by @tminka in https://github.com/pythonnet/pythonnet/pull/1341
    • Operator overloads support by @christabella in https://github.com/pythonnet/pythonnet/pull/1324
    • Domain reload test cases fixes by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1287
    • Add more more tests for in, out and ref parameters by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1349
    • Support comparison operators by @christabella in https://github.com/pythonnet/pythonnet/pull/1347
    • Disable implicit conversion from PyFloat to .NET integer types by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1343
    • Add GetPythonThreadID and Interrupt methods in PythonEngine by @gpetrou in https://github.com/pythonnet/pythonnet/pull/1337
    • Disable implicit conversion from PyFloat to uint64 by @tminka in https://github.com/pythonnet/pythonnet/pull/1362
    • Disable implicit conversion from float to array index by @tminka in https://github.com/pythonnet/pythonnet/pull/1363
    • Better error messages for method argument mismatch and others by @tminka in https://github.com/pythonnet/pythonnet/pull/1361
    • Support ByRef arguments in event handlers by @tminka in https://github.com/pythonnet/pythonnet/pull/1364
    • Build single Python.Runtime.dll for all platforms by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1365
    • Fix exception string by @filmor in https://github.com/pythonnet/pythonnet/pull/1360
    • ParameterInfo.Name needs to be checked for null before usage by @filmor in https://github.com/pythonnet/pythonnet/pull/1375
    • Monthly NuGet release previews by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1381
    • Sign Runtime DLL with a strong name by @gpetrou in https://github.com/pythonnet/pythonnet/pull/1382
    • New loading based on clr_loader by @filmor in https://github.com/pythonnet/pythonnet/pull/1373
    • Simplify PyScope by delegating ownership to PyObject instance by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1367
    • implement list codec by @koubaa in https://github.com/pythonnet/pythonnet/pull/1084
    • Ensure interned strings can not be referenced after InternString.Shutdown by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1394
    • Made InterruptTest more robust by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1393
    • Adjust static libpython detection by @filmor in https://github.com/pythonnet/pythonnet/pull/1396
    • Remove Utf8Marshaler, set PyScope base class to PyObject, added PyModule by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1391
    • ImportHook cleanup + PyObject.Length exception by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1400
    • Suggest to set Runtime.PythonDLL when embedding in .NET by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1411
    • Allow GIL state debugging; require GILState to be properly disposed by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1397
    • Try libdl.so.2 on Linux before libdl.so by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1425
    • PyType class, wrapper for Python types by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1395
    • Reworked Enum marshaling by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1392
    • Prevent stack overflow when an encoder is registered from Python by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1429
    • Do not call find_libpython during import clr as Python.Runtime can find it on its own by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1440
    • Fixed __cause__ on overload bind failure and array conversion by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1442
    • Replace magic offsets with proper offset calculation by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1441
    • Detect Py_TRACE_REFS at runtime and calculate object offsets accordingly by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1426
    • Re-enable the domain reload tests by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1404
    • Dispose all temporary objects in PyCheck_Iter_PyObject_IsIterable_ThreadingLock_Test by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1456
    • Use PyType instances instead of raw pointers by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1431
    • Refactoring of tp_dealloc by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1459
    • Refactoring of tp_clear by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1460
    • Handle ProcessExit event by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1458
    • Improve Python <-> .NET exception integration by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1134
    • Add a failing test for Unicode conversion by @pkese in https://github.com/pythonnet/pythonnet/pull/1467
    • Modernize import hook by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1369
    • Fixed crash in ToArray when sequence explicitly denies len by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1484
    • Prevent crash during debugging when attempting to inspect PyObject by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1483
    • Fixed double call to PyType_Ready in CLR MetaType's tp_new by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1486
    • Create PyIter from existing PyObject by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1482
    • [WIP] Add ability to create module from C# by @slide in https://github.com/pythonnet/pythonnet/pull/1447
    • Fixed custom decoders not working for DateTime and Decimal by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1497
    • Allow substituting base types for CLR types (as seen from Python) by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1487
    • Property descriptor made visible on the reflected class by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1512
    • Validate, that custom Python base types can be inherited from by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1510
    • Names of .NET types changed to better support generic types by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1509
    • Dynamic arithmetic ops raise correct Python exception on failure by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1508
    • Py.Import and PyModule.Import return PyObject instead of PyModule by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1530
    • Remove needsResolution hack by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1531
    • Implements buffer interface for .NET arrays of primitive types by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1511
    • Call tp_clear of base unmanaged type by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1541
    • Allow decoders affect PyObject.As<object>() by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1546
    • Added workaround for warning in threading module after TestInterrupt by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1560
    • ClassManager illegally decrefed ClassObject's refcount on shutdown by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1563
    • Ensure tests, that need running PythonEngine have similar SetUp and TearDown by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1564
    • Allow decoding instanceless exceptions by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1544
    • Do not clean tpHandle in ClassBase.tp_clear - it might be used in tp_dealloc by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1566
    • Mixins for standard collections that implement collections.abc interfaces by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1543
    • Allow Python to overwrite .NET methods by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1545
    • Simplify Dispatcher by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1559
    • Simplify assembly ResolveHandler, and use official assembly name parsing by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1570
    • Disable implicit conversions that might lose information by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1568
    • Minor fixup for no autoconversions PR by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1574
    • Fixed FileLoadException when trying clr.AddReference('/full/path.dll') by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1573
    • Raise BadPythonDllException instead of confusing TypeLoadException when PythonDLL was not configured properly by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1577
    • Cleaning up public API by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1557
    • PyScope/PyModule API cleanup by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1569
    • name and signature for .NET methods by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1133
    • When reflecting nested types, ensure their corresponding PyType is allocated by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1579
    • Safer GetAttr(name, default) by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1578
    • Expose PyType.Get by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1581
    • Allow user-created instances of PySequence and PyIterable by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1580
    • Changed signature of IPyObjectDecoder.CanDecode by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1583
    • Disabled float and bool implicit conversions by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1584
    • Remove a deprecated attribute in PropertyObject by @BadSingleton in https://github.com/pythonnet/pythonnet/pull/1595
    • Python 3.10 by @filmor in https://github.com/pythonnet/pythonnet/pull/1591
    • Make .NET objects that have __call__ method callable from Python by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1589
    • Fixed recursive dependency in clr module initialization by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1602
    • Include README.md into NuGet package by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1599
    • Remove unused PythonMethodAttribute by @lostmsu in https://github.com/pythonnet/pythonnet/pull/1609

    New Contributors

    • @DanBarzilian made their first contribution in https://github.com/pythonnet/pythonnet/pull/1160
    • @SFM61319 made their first contribution in https://github.com/pythonnet/pythonnet/pull/1208
    • @danabr made their first contribution in https://github.com/pythonnet/pythonnet/pull/1241
    • @alxnull made their first contribution in https://github.com/pythonnet/pythonnet/pull/1247
    • @BadSingleton made their first contribution in https://github.com/pythonnet/pythonnet/pull/1328
    • @tminka made their first contribution in https://github.com/pythonnet/pythonnet/pull/1326
    • @christabella made their first contribution in https://github.com/pythonnet/pythonnet/pull/1324
    • @gpetrou made their first contribution in https://github.com/pythonnet/pythonnet/pull/1337
    • @pkese made their first contribution in https://github.com/pythonnet/pythonnet/pull/1467

    Full Changelog: https://github.com/pythonnet/pythonnet/compare/v2.5.0...v3.0.0-a1

    Source code(tar.gz)
    Source code(zip)
  • v2.5.2(Feb 5, 2021)

    • fixed object[] parameters having precedence over anything else compatible https://github.com/pythonnet/pythonnet/issues/1211
    • fixed calling from Python methods, defined in F# with no names for a parameter https://github.com/pythonnet/pythonnet/pull/1375

    Additionally, includes support for Python 3.9.

    Source code(tar.gz)
    Source code(zip)
  • v2.5.1(Jun 18, 2020)

  • v2.5.0(Jun 14, 2020)

    :warning: This release will be the last one supporting Python 2 and non-.NET-Standard builds.

    This version improves performance on benchmarks significantly compared to 2.3 and includes various additions and improvements to the library.

    Added

    • Automatic NuGet package generation in appveyor and local builds
    • Function that sets Py_NoSiteFlag to 1.
    • Support for Jetson Nano.
    • Support for __len__ for .NET classes that implement ICollection
    • PyExport attribute to hide .NET types from Python
    • PythonException.Format method to format exceptions the same as traceback.format_exception
    • Runtime.None to be able to pass None as parameter into Python from .NET
    • PyObject.IsNone() to check if a Python object is None in .NET.
    • Support for Python 3.8
    • Codecs as the designated way to handle automatic conversions between .NET and Python types

    Changed

    • Added argument types information to "No method matches given arguments" message
    • Moved wheel import in setup.py inside of a try/except to prevent pip collection failures
    • Removes PyLong_GetMax and PyClass_New when targetting Python3
    • Improved performance of calls from Python to C#
    • Added support for converting python iterators to C# arrays
    • Changed usage of the obsolete function GetDelegateForFunctionPointer(IntPtr, Type) to GetDelegateForFunctionPointer<TDelegate>(IntPtr)
    • When calling C# from Python, enable passing argument of any type to a parameter of C# type object by wrapping it into PyObject instance. ([#881][i881])
    • Added support for kwarg parameters when calling .NET methods from Python
    • Changed method for finding MSBuild using vswhere
    • Reworked Finalizer. Now objects drop into its queue upon finalization, which is periodically drained when new objects are created.
    • Marked Runtime.OperatingSystemName and Runtime.MachineName as Obsolete, should never have been public in the first place. They also don't necessarily return a result that matches the platform module's.
    • Unconditionally depend on pycparser for the interop module generation

    Fixed

    • Fixed runtime that fails loading when using pythonnet in an environment together with Nuitka
    • Fixes bug where delegates get casts (dotnetcore)
    • Determine size of interpreter longs at runtime
    • Handling exceptions ocurred in ModuleObject's getattribute
    • Fill __classcell__ correctly for Python subclasses of .NET types
    • Fixed issue with params methods that are not passed an array.
    • Use UTF8 to encode strings passed to PyRun_String on Python 3

    Acknowledgements

    These authors have contributed to this release:

    • @alexhelms
    • @amos402
    • @andreydani
    • @benoithudson
    • @chrisjbremner
    • @Cronan
    • @filmor
    • @ftreurni
    • @henon
    • @inna-w
    • @Jeff17Robbins
    • @jmlidbetter
    • @koubaa
    • @lostmsu
    • @m-rossi
    • @matham
    • @mjmvisser
    • @NickSavin
    • @s4v4g3
    • @slide
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0-rc2(Apr 7, 2019)

  • v2.4.0-rc1(Mar 6, 2019)

    Added

    • Added support for embedding python into dotnet core 2.0 (NetStandard 2.0)
    • Added new build system (pythonnet.15.sln) based on dotnetcore-sdk/xplat(crossplatform msbuild). Currently there two side-by-side build systems that produces the same output (net40) from the same sources. After a some transition time, current (mono/ msbuild 14.0) build system will be removed.
    • NUnit upgraded to 3.7 (eliminates travis-ci random bug)
    • Added C# PythonEngine.AddShutdownHandler to help client code clean up on shutdown.
    • Added clr.GetClrType (#432)(#433)
    • Allowed passing None for nullable args (#460)
    • Added keyword arguments based on C# syntax for calling CPython methods (#461)
    • Catches exceptions thrown in C# iterators (yield returns) and rethrows them in python (#475)(#693)
    • Implemented GetDynamicMemberNames() for PyObject to allow dynamic object members to be visible in the debugger (#443)(#690)
    • Incorporated reference-style links to issues and pull requests in the CHANGELOG (#608)
    • Added detailed comments about aproaches and dangers to handle multi-app-domains (#625)
    • Python 3.7 support, builds and testing added. Defaults changed from Python 3.6 to 3.7 ([#698][p698])

    Changed

    • Reattach python exception traceback information (#545)
    • PythonEngine.Intialize will now call Py_InitializeEx with a default value of 0, so signals will not be configured by default on embedding. This is different from the previous behaviour, where Py_Initialize was called instead, which sets initSigs to 1. (#449)

    Fixed

    • Fixed secondary PythonEngine.Initialize call, all sensitive static variables now reseted. This is a hidden bug. Once python cleaning up enough memory, objects from previous engine run becomes corrupted. (#534)
    • Fixed Visual Studio 2017 compat (#434) for setup.py
    • Fixed crashes when integrating pythonnet in Unity3d (#714), related to unloading the Application Domain
    • Fixed interop methods with Py_ssize_t. NetCoreApp 2.0 is more sensitive than net40 and requires this fix. (#531)
    • Fixed crash on exit of the Python interpreter if a python class derived from a .NET class has a __namespace__ or __assembly__ attribute (#481)
    • Fixed conversion of 'float' and 'double' values (#486)
    • Fixed 'clrmethod' for python 2 (#492)
    • Fixed double calling of constructor when deriving from .NET class (#495)
    • Fixed clr.GetClrType when iterating over System members (#607)
    • Fixed LockRecursionException when loading assemblies (#627)
    • Fixed errors breaking .NET Remoting on method invoke (#276)
    • Fixed PyObject.GetHashCode (#676)
    • Fix memory leaks due to spurious handle incrementation ([#691][i691])
    • Fix spurious assembly loading exceptions from private types ([#703][i703])
    • Fix inheritance of non-abstract base methods (#755)
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Mar 11, 2017)

    Added

    • Added Code Coverage (#345)
    • Added PySys_SetArgvEx (#347)
    • Added XML Documentation (#349)
    • Added Embedded_Tests on AppVeyor (#224)(#353)
    • Added Embedded_Tests on Travis (#224)(#391)
    • Added PY3 settings to solution configuration-manager (#346)
    • Added Slack (#384)(#383)(#386)
    • Added function of passing an arbitrary .NET object as the value of an attribute of PyObject (#370)(#373)
    • Added Coverity scan (#390)
    • Added bumpversion for version control (#319)(#398)
    • Added tox for local testing (#345)
    • Added requirements.txt
    • Added to PythonEngine methods Eval and Exec (#389)
    • Added implementations of ICustomMarshal (#407)
    • Added docker images (#322)
    • Added hooks in pyinstaller and cx_freeze for pythonnet (#66)
    • Added nuget packages (#165)

    Changed

    • Refactored python unittests (#329)
    • Refactored python setup.py (#337)
    • Refactored remaining of Build Directives on runtime.cs (#339)
    • Refactored Embedded_Tests to make easier to write tests (#369)
    • Changed unittests to pytest (#368)
    • Upgraded NUnit framework from 2.6.3 to 3.5.0 (#341)
    • Downgraded NUnit framework from 3.5.0 to 2.6.4 (#353)
    • Upgraded NUnit framework from 2.6.4 to 3.6.0 (#371)
    • Unfroze Mono version on Travis (#345)
    • Changed conda.recipe build to only pull-requests (#345)
    • Combine Py_DEBUG and PYTHON_WITH_PYDEBUG flags (#362)

    Deprecated

    • Deprecated RunString (#401)

    Fixed

    • Fixed crash during Initialization (#262)(#343)
    • Fixed crash during Shutdown (#365)
    • Fixed multiple build warnings
    • Fixed method signature match for Object Type (#203)(#377)
    • Fixed outdated version number in AssemblyInfo (#398)
    • Fixed wrong version number in conda.recipe (#398)
    • Fixed fixture location for Python tests and Embedded_Tests
    • Fixed PythonException crash during Shutdown (#400)
    • Fixed AppDomain unload during GC (#397)(#400)
    • Fixed Py_Main & PySys_SetArgvEx no mem error on UCS4/PY3 (#399)
    • Fixed Python.Runtime.dll.config on macOS (#120)
    • Fixed crash on PythonEngine.Version (#413)
    • Fixed PythonEngine.PythonPath issues (#179)(#414)(#415)

    Removed

    • Removed six dependency for unittests (#329)
    • Removed Mono.Unix dependency for UCS4 (#360)
    • Removed need for Python.Runtime.dll.config
    • Removed PY32 build option PYTHON_WITH_WIDE_UNICODE (#417)
    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Jan 29, 2017)

  • v2.2.1(Jan 28, 2017)

    News

    Changelog since v2.2.0-dev1

    v2.2.0 had a release issue on pypi. Bumped to v2.2.1

    Added

    • Python 3.6 support (#310)
    • Added __version__ to module (#312)
    • Added conda recipe (#281)
    • Nuget update on build (#268)
    • Added __cause__ attribute on exception (#287)

    Changed

    • License to MIT (#314)
    • Project clean-up (#320)
    • Refactor #if directives
    • Rename Decref/Incref to XDecref/XIncre (#275)
    • Remove printing if Decref is called with NULL (#275)

    Removed

    • Python 2.6 support (#270)
    • Python 3.2 support (#270)

    Fixed

    • Fixed isinstance refcount_leak (#273)
    • Comparison Operators (#294)
    • Improved Linux support (#300)
    • Exception pickling (#286)

    Known Issues

    • Subclassing .NET classes (https://github.com/pythonnet/pythonnet/issues/264)
    • Mixing python and .NET constructors (https://github.com/pythonnet/pythonnet/issues/252)
    • Overloading on constructors, ref/out and subtypes (https://github.com/pythonnet/pythonnet/issues/265)
    • pythonhome and pythonpath (https://github.com/pythonnet/pythonnet/pull/186)
    • Regression bug on numpy arrays (https://github.com/pythonnet/pythonnet/issues/249)
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0-dev1(Sep 20, 2016)

    News

    Changelog

    • Switch to C# 6.0 (https://github.com/pythonnet/pythonnet/pull/219)
    • Relative imports (https://github.com/pythonnet/pythonnet/pull/219)
    • Recursive types (https://github.com/pythonnet/pythonnet/pull/250)
    • Demo fix - stream reading (https://github.com/pythonnet/pythonnet/pull/225)
    • setup.py improvements for locating build tools (https://github.com/pythonnet/pythonnet/pull/208)
    • unmanaged exports updated (https://github.com/pythonnet/pythonnet/pull/206)
    • Mono update pinned to 4.2.4.4 (https://github.com/pythonnet/pythonnet/pull/233)
    • Documentation update (http://pythonnet.github.io/)
    • wiki added (https://github.com/pythonnet/pythonnet/wiki)

    Known Issues

    • Subclassing .NET classes (https://github.com/pythonnet/pythonnet/issues/264)
    • Mixing python and .NET constructors (https://github.com/pythonnet/pythonnet/issues/252)
    • License update (one blocking contributor @tiran out of 27)
    • Overloading on constructors, ref/out and subtypes (https://github.com/pythonnet/pythonnet/issues/265)
    • pythonhome and pythonpath (https://github.com/pythonnet/pythonnet/pull/186)
    • Regression bug on numpy arrays (https://github.com/pythonnet/pythonnet/issues/249)
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Apr 12, 2016)

Rust syntax and lexical analyzer implemented in Python.

Rust Scanner Rust syntax and lexical analyzer implemented in Python. This project was made for the Programming Languages class at ESPOL (SOFG1009). Me

Joangie Marquez 0 Jul 03, 2022
Grumpy is a Python to Go source code transcompiler and runtime.

Grumpy: Go running Python Overview Grumpy is a Python to Go source code transcompiler and runtime that is intended to be a near drop-in replacement fo

Google 10.6k Dec 24, 2022
Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.

pythonnet - Python.NET Python.NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) a

3.5k Jan 06, 2023
A mini implementation of python library.

minipy author = RQDYSGN date = 2021.10.11 version = 0.2 1. 简介 基于python3.7环境,通过py原生库和leetcode上的一些习题构建的超小型py lib。 2. 环境 Python 3.7 2. 结构 ${project_name}

RQDYGSN 2 Oct 26, 2021
Cython plugin for Lark, reimplementing the LALR parser & lexer for better performance

Lark-Cython Cython plugin for Lark, reimplementing the LALR parser & lexer for better performance on CPython. Install: pip install lark-cython Usage:

Lark - Parsing Library & Toolkit 31 Dec 26, 2022
x2 - a miniminalistic, open-source language created by iiPython

x2 is a miniminalistic, open-source language created by iiPython, inspired by x86 assembly and batch. It is a high-level programming language with low-level, easy-to-remember syntaxes, similar to x86

Benjamin 3 Jul 29, 2022
Pyjion - A JIT for Python based upon CoreCLR

Pyjion Designing a JIT API for CPython A note on development Development has moved to https://github.com/tonybaloney/Pyjion FAQ What are the goals of

Microsoft 1.6k Dec 30, 2022
DO NOT USE. Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime.

IronPython 3 IronPython3 is NOT ready for use yet. There is still much that needs to be done to support Python 3.x. We are working on it, albeit slowl

IronLanguages 2k Dec 30, 2022
The Python programming language

This is Python version 3.10.0 alpha 5 Copyright (c) 2001-2021 Python Software Foundation. All rights reserved. See the end of this file for further co

Python 49.7k Dec 30, 2022
The Stackless Python programming language

This is Python version 3.7.0 alpha 4+ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 20

Stackless Python 891 Jan 03, 2023
A faster and highly-compatible implementation of the Python programming language. The code here is out of date, please follow our blog

Pyston is a faster and highly-compatible implementation of the Python programming language. Version 2 is currently closed source, but you can find the

4.9k Dec 21, 2022
MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems

The MicroPython project This is the MicroPython project, which aims to put an implementation of Python 3.x on microcontrollers and small embedded syst

MicroPython 15.7k Dec 31, 2022
wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.

wxPython Project Phoenix Introduction Welcome to wxPython's Project Phoenix! Phoenix is the improved next-generation wxPython, "better, stronger, fast

1.9k Jan 07, 2023
x86-64 assembler embedded in Python

Portable Efficient Assembly Code-generator in Higher-level Python (PeachPy) PeachPy is a Python framework for writing high-performance assembly kernel

Marat Dukhan 1.7k Jan 03, 2023
An implementation of Python in Common Lisp

CLPython - an implementation of Python in Common Lisp CLPython is an open-source implementation of Python written in Common Lisp. With CLPython you ca

Willem Broekema 339 Jan 04, 2023
Core Python libraries ported to MicroPython

This is a repository of libraries designed to be useful for writing MicroPython applications.

MicroPython 1.8k Jan 07, 2023
A faster and highly-compatible implementation of the Python programming language.

Pyston Pyston is a fork of CPython 3.8.8 with additional optimizations for performance. It is targeted at large real-world applications such as web se

2.3k Jan 09, 2023
CPython Extension Module Support for Flit

CPython Extension Module Support for Flit This is a PEP 517 build backend piggybacking (and hacking) Flit to support building C extensions. Mostly a p

Tzu-ping Chung 8 May 24, 2022