diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2629b1d38..3a5888143 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.5.21 +current_version = 1.0.5.23 parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? serialize = {major}.{minor}.{patch}.{release}{dev} diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index aef4c8f5c..cb1c123a2 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: pythonnet - version: "1.0.5.21" + version: "1.0.5.23" build: skip: True # [not win] diff --git a/setup.py b/setup.py index f945c7948..f55479725 100644 --- a/setup.py +++ b/setup.py @@ -485,7 +485,7 @@ def run(self): setup( name="pythonnet", - version="1.0.5.21", + version="1.0.5.23", description=".Net and Mono integration for Python", url='https://pythonnet.github.io/', license='MIT', diff --git a/src/SharedAssemblyInfo.cs b/src/SharedAssemblyInfo.cs index 9be7c6ce2..99a1c71f2 100644 --- a/src/SharedAssemblyInfo.cs +++ b/src/SharedAssemblyInfo.cs @@ -25,4 +25,4 @@ // Version Information. Keeping it simple. May need to revisit for Nuget // See: https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/ // AssemblyVersion can only be numeric -[assembly: AssemblyVersion("1.0.5.21")] +[assembly: AssemblyVersion("1.0.5.23")] diff --git a/src/clrmodule/ClrModule.cs b/src/clrmodule/ClrModule.cs index 16e1b0fd9..fc99f9fcd 100644 --- a/src/clrmodule/ClrModule.cs +++ b/src/clrmodule/ClrModule.cs @@ -53,7 +53,7 @@ public static void initclr() { #if USE_PYTHON_RUNTIME_VERSION // Has no effect until SNK works. Keep updated anyways. - Version = new Version("1.0.5.21"), + Version = new Version("1.0.5.23"), #endif CultureInfo = CultureInfo.InvariantCulture }; diff --git a/src/runtime/pythonengine.cs b/src/runtime/pythonengine.cs index a23c7ac79..5a62c02bb 100644 --- a/src/runtime/pythonengine.cs +++ b/src/runtime/pythonengine.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -164,6 +164,7 @@ public static void Initialize(IEnumerable args, bool setSysArgv = true) // during an initial "import clr", and the world ends shortly thereafter. // This is probably masking some bad mojo happening somewhere in Runtime.Initialize(). delegateManager = new DelegateManager(); + Console.WriteLine("PythonEngine.Initialize(): Runtime.Initialize()..."); Runtime.Initialize(); initialized = true; Exceptions.Clear(); @@ -179,9 +180,11 @@ public static void Initialize(IEnumerable args, bool setSysArgv = true) string code = "import atexit, clr\n" + "atexit.register(clr._AtExit)\n"; + Console.WriteLine("PythonEngine.Initialize(): register atexit callback..."); PythonEngine.Exec(code); // Load the clr.py resource into the clr module + Console.WriteLine("PythonEngine.Initialize(): GetCLRModule()..."); IntPtr clr = Python.Runtime.ImportHook.GetCLRModule(); IntPtr clr_dict = Runtime.PyModule_GetDict(clr); @@ -193,6 +196,7 @@ public static void Initialize(IEnumerable args, bool setSysArgv = true) IntPtr builtins = Runtime.PyEval_GetBuiltins(); Runtime.PyDict_SetItemString(module_globals, "__builtins__", builtins); + Console.WriteLine("PythonEngine.Initialize(): clr GetManifestResourceStream..."); Assembly assembly = Assembly.GetExecutingAssembly(); using (Stream stream = assembly.GetManifestResourceStream("clr.py")) using (var reader = new StreamReader(stream)) diff --git a/src/runtime/resources/clr.py b/src/runtime/resources/clr.py index ba1323792..a4f998ab1 100644 --- a/src/runtime/resources/clr.py +++ b/src/runtime/resources/clr.py @@ -2,7 +2,7 @@ Code in this module gets loaded into the main clr module. """ -__version__ = "1.0.5.21" +__version__ = "1.0.5.23" class clrproperty(object): diff --git a/src/runtime/runtime.cs b/src/runtime/runtime.cs index 9ff83753f..06740273a 100644 --- a/src/runtime/runtime.cs +++ b/src/runtime/runtime.cs @@ -213,15 +213,18 @@ internal static void Initialize() { if (Py_IsInitialized() == 0) { + Console.WriteLine("Runtime.Initialize(): Py_Initialize..."); Py_Initialize(); MainManagedThreadId = Thread.CurrentThread.ManagedThreadId; } if (PyEval_ThreadsInitialized() == 0) { + Console.WriteLine("Runtime.Initialize(): PyEval_InitThreads..."); PyEval_InitThreads(); } + Console.WriteLine("Runtime.Initialize(): Initialize types..."); IntPtr op; IntPtr dict; if (IsPython3) @@ -326,6 +329,7 @@ internal static void Initialize() XDecref(c); XDecref(d); #endif + Console.WriteLine("Runtime.Initialize(): Initialize types end."); Error = new IntPtr(-1); @@ -343,7 +347,7 @@ internal static void Initialize() NativeMethods.FreeLibrary(dllLocal); } #endif - + Console.WriteLine("Runtime.Initialize(): AssemblyManager.Initialize()..."); // Initialize modules that depend on the runtime class. AssemblyManager.Initialize(); PyCLRMetaType = MetaType.Initialize(); @@ -357,6 +361,7 @@ internal static void Initialize() IntPtr item = PyString_FromString(rtdir); PyList_Append(path, item); XDecref(item); + Console.WriteLine("Runtime.Initialize(): AssemblyManager.UpdatePath()..."); AssemblyManager.UpdatePath(); }