user@ubuntu:~/pythonnet$ git bisect start user@ubuntu:~/pythonnet$ git bisect bad v2.5.0 user@ubuntu:~/pythonnet$ git bisect good v2.4.0 Bisecting: 67 revisions left to test after this (roughly 6 steps) [2e19f2c3d3a40502968a77149f4a62a590fdb9a3] don't dispose encoded object in case codec keeps a cache of them < DO A FEW GOOD/BAD ITERATIONS > user@ubuntu:~/pythonnet$ ./issue1210.sh Python 3.7.9 pip 20.2.4 from /home/user/py37env/lib/python3.7/site-packages/pip (python 3.7) Requirement already up-to-date: setuptools in /home/user/py37env/lib/python3.7/site-packages (50.3.2) Ignoring wheel: markers 'sys_platform == "win32"' don't match your environment Requirement already up-to-date: pytest==3.2.5 in /home/user/py37env/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (3.2.5) Requirement already up-to-date: coverage in /home/user/py37env/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (5.3) Requirement already up-to-date: psutil in /home/user/py37env/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (5.7.3) Requirement already up-to-date: codecov in /home/user/py37env/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (2.1.10) Requirement already up-to-date: pycparser in /home/user/py37env/lib/python3.7/site-packages (from -r requirements.txt (line 12)) (2.20) Requirement already satisfied, skipping upgrade: py>=1.4.33 in /home/user/py37env/lib/python3.7/site-packages (from pytest==3.2.5->-r requirements.txt (line 2)) (1.9.0) Requirement already satisfied, skipping upgrade: setuptools in /home/user/py37env/lib/python3.7/site-packages (from pytest==3.2.5->-r requirements.txt (line 2)) (50.3.2) Requirement already satisfied, skipping upgrade: requests>=2.7.9 in /home/user/py37env/lib/python3.7/site-packages (from codecov->-r requirements.txt (line 7)) (2.24.0) Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /home/user/py37env/lib/python3.7/site-packages (from requests>=2.7.9->codecov->-r requirements.txt (line 7)) (2.10) Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /home/user/py37env/lib/python3.7/site-packages (from requests>=2.7.9->codecov->-r requirements.txt (line 7)) (2020.6.20) Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/user/py37env/lib/python3.7/site-packages (from requests>=2.7.9->codecov->-r requirements.txt (line 7)) (1.25.11) Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /home/user/py37env/lib/python3.7/site-packages (from requests>=2.7.9->codecov->-r requirements.txt (line 7)) (3.0.4) WARNING: Skipping pythonnet as it is not installed. /home/user/py37env/lib/python3.7/site-packages/setuptools/dist.py:452: UserWarning: Normalizing '2.4.1-dev' to '2.4.1.dev0' warnings.warn(tmpl.format(**locals())) running install running build running build_ext Checking for updates from https://api.nuget.org/v3/index.json [https://api.nuget.org/v3/index.json]. CACHE https://api.nuget.org/v3/registration5-gz-semver2/nuget.commandline/index.json Currently running NuGet.exe 5.7.0. NuGet.exe is up to date. Update successful. MSBuild auto-detection: using msbuild version '14.0' from '/usr/lib/mono/xbuild/14.0/bin'. All packages listed in packages.config are already installed. >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<< XBuild Engine Version 14.0 Mono, Version 5.20.1.34 Copyright (C) 2005-2013 Various Mono authors Build started 5/11/2020 9:22:56 a.m.. __________________________________________________ Project "/home/user/pythonnet/pythonnet.sln" (Clean target(s)): Target ValidateSolutionConfiguration: Building solution configuration "ReleaseMono|x86". Target Clean: Project "/home/user/pythonnet/src/runtime/Python.Runtime.csproj" (Clean target(s)): Target CoreClean: Deleting file '/home/user/pythonnet/src/runtime/obj/x86/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs' Deleting file '/home/user/pythonnet/src/runtime/obj/x86/ReleaseMono/Python.Runtime.resources.clr.py' Deleting file '/home/user/pythonnet/src/runtime/obj/x86/ReleaseMono/Python.Runtime.csproj.FilesWrittenAbsolute.txt' Done building project "/home/user/pythonnet/src/runtime/Python.Runtime.csproj". The project 'clrmodule' is disabled for solution configuration 'ReleaseMono|x86'. Done building project "/home/user/pythonnet/pythonnet.sln". Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:00.5717370 >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<< XBuild Engine Version 14.0 Mono, Version 5.20.1.34 Copyright (C) 2005-2013 Various Mono authors Build started 5/11/2020 9:22:57 a.m.. __________________________________________________ Project "/home/user/pythonnet/pythonnet.sln" (Build target(s)): Target ValidateSolutionConfiguration: Building solution configuration "ReleaseMono|x86". Target Build: Project "/home/user/pythonnet/src/runtime/Python.Runtime.csproj" (default target(s)): Target PrepareForBuild: Configuration: ReleaseMono Platform: x86 Target CopyNonResxEmbeddedResources: Copying file from '/home/user/pythonnet/src/runtime/resources/clr.py' to '/home/user/pythonnet/src/runtime/obj/x86/ReleaseMono/Python.Runtime.resources.clr.py' Target GenerateSatelliteAssemblies: No input files were specified for target GenerateSatelliteAssemblies, skipping. Target CoreCompile: Tool /usr/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/x86/ReleaseMono/Python.Runtime.dll /resource:obj/x86/ReleaseMono/Python.Runtime.resources.clr.py,clr.py finalizer.cs Properties/AssemblyInfo.cs ../SharedAssemblyInfo.cs arrayobject.cs assemblymanager.cs classderived.cs classbase.cs classmanager.cs classobject.cs clrobject.cs codegenerator.cs constructorbinder.cs constructorbinding.cs converter.cs CustomMarshaler.cs debughelper.cs delegatemanager.cs delegateobject.cs eventbinding.cs eventobject.cs exceptions.cs extensiontype.cs fieldobject.cs generictype.cs genericutil.cs importhook.cs indexer.cs interfaceobject.cs interfaces.cs interop.cs iterator.cs managedtype.cs metatype.cs methodbinder.cs methodbinding.cs methodobject.cs methodwrapper.cs modulefunctionobject.cs moduleobject.cs modulepropertyobject.cs nativecall.cs overload.cs propertyobject.cs pyansistring.cs pydict.cs pyfloat.cs pyint.cs pyiter.cs pylist.cs pylong.cs pynumber.cs pyobject.cs pyscope.cs pysequence.cs pystring.cs pythonengine.cs pythonexception.cs pytuple.cs runtime.cs typemanager.cs typemethod.cs Util.cs platform/Types.cs platform/LibraryLoader.cs interop37m.cs obj/x86/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /unsafe+ /define:"PYTHON37;PYTHON3;UCS4;MONO_LINUX;PYTHON_WITHOUT_ENABLE_SHARED;PYTHON_WITH_PYMALLOC" /nowarn:1591 /doc:bin/Python.Runtime.xml /langversion:7.3 /nostdlib /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/usr/lib/mono/4.0-api//mscorlib.dll Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc) Copyright (C) Microsoft Corporation. All rights reserved. runtime.cs(301,17): warning CS0162: Unreachable code detected finalizer.cs(67,45): warning CS0067: The event 'Finalizer.IncorrectRefCntResolver' is never used Target DeployOutputFiles: Copying file from '/home/user/pythonnet/src/runtime/obj/x86/ReleaseMono/Python.Runtime.pdb' to '/home/user/pythonnet/src/runtime/bin/Python.Runtime.pdb' Copying file from '/home/user/pythonnet/src/runtime/obj/x86/ReleaseMono/Python.Runtime.dll' to '/home/user/pythonnet/src/runtime/bin/Python.Runtime.dll' Target AfterBuild: Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.dll' to '/home/user/pythonnet/build/lib.linux-i686-3.7/Python.Runtime.dll' Done building project "/home/user/pythonnet/src/runtime/Python.Runtime.csproj". The project 'clrmodule' is disabled for solution configuration 'ReleaseMono|x86'. Project "/home/user/pythonnet/src/testing/Python.Test.csproj" (default target(s)): Target PrepareForBuild: Configuration: ReleaseMono Platform: x86 Target CopyFilesMarkedCopyLocal: Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.dll' to '/home/user/pythonnet/src/testing/bin/Python.Runtime.dll' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.pdb' to '/home/user/pythonnet/src/testing/bin/Python.Runtime.pdb' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.xml' to '/home/user/pythonnet/src/testing/bin/Python.Runtime.xml' Target GenerateSatelliteAssemblies: No input files were specified for target GenerateSatelliteAssemblies, skipping. Target CoreCompile: Tool /usr/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/x86/ReleaseMono/Python.Test.dll arraytest.cs callbacktest.cs classtest.cs constructortests.cs conversiontest.cs delegatetest.cs enumtest.cs eventtest.cs exceptiontest.cs fieldtest.cs generictest.cs globaltest.cs indexertest.cs InheritanceTest.cs interfacetest.cs methodtest.cs moduletest.cs propertytest.cs threadtest.cs doctest.cs subclasstest.cs ReprTest.cs obj/x86/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /define:"PYTHON37;PYTHON3;UCS4;MONO_LINUX;PYTHON_WITHOUT_ENABLE_SHARED;PYTHON_WITH_PYMALLOC" /nowarn:1591;0067 /doc:bin/Python.Test.xml /langversion:6 /nostdlib /platform:x86 /reference:/usr/lib/mono/4.0-api/Microsoft.CSharp.dll /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/home/user/pythonnet/src/runtime/bin//Python.Runtime.dll /reference:/usr/lib/mono/4.0-api//mscorlib.dll Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc) Copyright (C) Microsoft Corporation. All rights reserved. Target DeployOutputFiles: Copying file from '/home/user/pythonnet/src/testing/obj/x86/ReleaseMono/Python.Test.pdb' to '/home/user/pythonnet/src/testing/bin/Python.Test.pdb' Copying file from '/home/user/pythonnet/src/testing/obj/x86/ReleaseMono/Python.Test.dll' to '/home/user/pythonnet/src/testing/bin/Python.Test.dll' Target AfterBuild: Copying file from '/home/user/pythonnet/src/testing/bin/Python.Test.dll' to '/home/user/pythonnet/src/tests/fixtures/Python.Test.dll' Done building project "/home/user/pythonnet/src/testing/Python.Test.csproj". Project "/home/user/pythonnet/src/embed_tests/Python.EmbeddingTest.csproj" (default target(s)): Target PrepareForBuild: Configuration: ReleaseMono Platform: x86 Target CopyFilesMarkedCopyLocal: Copying file from '/home/user/pythonnet/packages/NUnit.3.7.1/lib/net40/nunit.framework.dll' to '/home/user/pythonnet/src/embed_tests/bin/nunit.framework.dll' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.dll' to '/home/user/pythonnet/src/embed_tests/bin/Python.Runtime.dll' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.pdb' to '/home/user/pythonnet/src/embed_tests/bin/Python.Runtime.pdb' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.xml' to '/home/user/pythonnet/src/embed_tests/bin/Python.Runtime.xml' Target GenerateSatelliteAssemblies: No input files were specified for target GenerateSatelliteAssemblies, skipping. Target CoreCompile: Tool /usr/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/x86/ReleaseMono/Python.EmbeddingTest.dll dynamic.cs pyimport.cs pyinitialize.cs pyrunstring.cs TestConverter.cs TestCustomMarshal.cs TestDomainReload.cs TestExample.cs TestFinalizer.cs TestPyAnsiString.cs TestPyFloat.cs TestPyInt.cs TestPyList.cs TestPyLong.cs TestPyNumber.cs TestPyObject.cs TestPySequence.cs TestPyString.cs TestPythonException.cs TestPythonEngineProperties.cs TestPyTuple.cs TestNamedArguments.cs TestPyWith.cs TestRuntime.cs TestPyScope.cs TestTypeManager.cs GlobalTestsSetup.cs obj/x86/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /define:"PYTHON37;PYTHON3;UCS4;MONO_LINUX;PYTHON_WITHOUT_ENABLE_SHARED;PYTHON_WITH_PYMALLOC" /nowarn:1591 /doc:bin/Python.EmbeddingTest.xml /langversion:6 /nostdlib /platform:x86 /reference:/usr/lib/mono/4.0-api/Microsoft.CSharp.dll /reference:../../packages/NUnit.3.7.1/lib/net40/nunit.framework.dll /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/home/user/pythonnet/src/runtime/bin//Python.Runtime.dll /reference:/usr/lib/mono/4.0-api//mscorlib.dll Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc) Copyright (C) Microsoft Corporation. All rights reserved. Target DeployOutputFiles: Copying file from '/home/user/pythonnet/src/embed_tests/obj/x86/ReleaseMono/Python.EmbeddingTest.pdb' to '/home/user/pythonnet/src/embed_tests/bin/Python.EmbeddingTest.pdb' Copying file from '/home/user/pythonnet/src/embed_tests/obj/x86/ReleaseMono/Python.EmbeddingTest.dll' to '/home/user/pythonnet/src/embed_tests/bin/Python.EmbeddingTest.dll' Target AfterBuild: Copying file from '/home/user/pythonnet/src/embed_tests/bin/Python.EmbeddingTest.dll' to '/home/user/pythonnet/build/lib.linux-i686-3.7/Python.EmbeddingTest.dll' Done building project "/home/user/pythonnet/src/embed_tests/Python.EmbeddingTest.csproj". Project "/home/user/pythonnet/src/console/Console.csproj" (default target(s)): Target PrepareForBuild: Configuration: ReleaseMono Platform: x86 Target CopyFilesMarkedCopyLocal: Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.dll' to '/home/user/pythonnet/src/console/bin/Python.Runtime.dll' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.pdb' to '/home/user/pythonnet/src/console/bin/Python.Runtime.pdb' Copying file from '/home/user/pythonnet/src/runtime/bin/Python.Runtime.xml' to '/home/user/pythonnet/src/console/bin/Python.Runtime.xml' Target CopyNonResxEmbeddedResources: Copying file from '/home/user/pythonnet/build/lib.linux-i686-3.7/Python.Runtime.dll' to '/home/user/pythonnet/src/console/obj/x86/ReleaseMono/Python.Runtime.Python.Runtime.dll' Target GenerateSatelliteAssemblies: No input files were specified for target GenerateSatelliteAssemblies, skipping. Target CoreCompile: Tool /usr/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/x86/ReleaseMono/nPython.exe /resource:obj/x86/ReleaseMono/Python.Runtime.Python.Runtime.dll,Python.Runtime.dll Properties/AssemblyInfo.cs ../SharedAssemblyInfo.cs pythonconsole.cs obj/x86/ReleaseMono/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:exe /win32icon:python-clear.ico /define:"PYTHON37;PYTHON3;UCS4;MONO_LINUX;PYTHON_WITHOUT_ENABLE_SHARED;PYTHON_WITH_PYMALLOC" /nowarn:1591 /doc:bin/nPython.xml /langversion:6 /nostdlib /platform:x86 /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/home/user/pythonnet/src/runtime/bin//Python.Runtime.dll /reference:/usr/lib/mono/4.0-api//mscorlib.dll Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc) Copyright (C) Microsoft Corporation. All rights reserved. Target DeployOutputFiles: Copying file from '/home/user/pythonnet/src/console/obj/x86/ReleaseMono/nPython.pdb' to '/home/user/pythonnet/src/console/bin/nPython.pdb' Copying file from '/home/user/pythonnet/src/console/obj/x86/ReleaseMono/nPython.exe' to '/home/user/pythonnet/src/console/bin/nPython.exe' Target AfterBuild: Copying file from '/home/user/pythonnet/src/console/bin/nPython.exe' to '/home/user/pythonnet/build/lib.linux-i686-3.7/nPython.exe' Done building project "/home/user/pythonnet/src/console/Console.csproj". Done building project "/home/user/pythonnet/pythonnet.sln". Build succeeded. Warnings: /home/user/pythonnet/pythonnet.sln (Build) -> (Build target) -> /home/user/pythonnet/src/runtime/Python.Runtime.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> runtime.cs(301,17): warning CS0162: Unreachable code detected finalizer.cs(67,45): warning CS0067: The event 'Finalizer.IncorrectRefCntResolver' is never used 2 Warning(s) 0 Error(s) Time Elapsed 00:00:04.7268510 running install_lib running install_data copying /home/user/pythonnet/build/lib.linux-i686-3.7/Python.Runtime.dll -> /home/user/py37env/lib/python3.7/site-packages running install_egg_info running egg_info writing pythonnet.egg-info/PKG-INFO writing dependency_links to pythonnet.egg-info/dependency_links.txt writing top-level names to pythonnet.egg-info/top_level.txt reading manifest file 'pythonnet.egg-info/SOURCES.txt' writing manifest file 'pythonnet.egg-info/SOURCES.txt' Copying pythonnet.egg-info to /home/user/py37env/lib/python3.7/site-packages/pythonnet-2.4.1.dev0-py3.7.egg-info =================================================================== test session starts ==================================================================== platform linux -- Python 3.7.9, pytest-3.2.5, py-1.9.0, pluggy-0.4.0 rootdir: /home/user/pythonnet, inifile: setup.cfg collected 398 items src/tests/test_array.py .......................................... src/tests/test_callback.py .. src/tests/test_class.py ................... src/tests/test_clrmethod.py ..... src/tests/test_compat.py ................ src/tests/test_constructors.py .... src/tests/test_conversion.py .................... src/tests/test_delegate.py ................. src/tests/test_docstring.py ... src/tests/test_engine.py .ss src/tests/test_enum.py ............... src/tests/test_event.py ............................ src/tests/test_exceptions.py ........................... src/tests/test_field.py .............................. src/tests/test_generic.py ................. src/tests/test_import.py .. src/tests/test_indexer.py ............................. src/tests/test_interface.py .... src/tests/test_method.py ........................................................ src/tests/test_module.py ............................. src/tests/test_property.py .......... src/tests/test_recursive_types.py . src/tests/test_repr.py .... src/tests/test_subclass.py ........... src/tests/test_sysargv.py . src/tests/test_thread.py ... ================================================================= short test summary info ================================================================== SKIP [1] src/tests/test_engine.py:22: FIXME: test crashes SKIP [1] src/tests/test_engine.py:30: FIXME: test freezes ================================================================= slowest 5 test durations ================================================================= 1.10s call src/tests/test_thread.py::test_python_thread_calls_to_clr 0.19s call src/tests/test_callback.py::test_default_for_null 0.18s call src/tests/test_module.py::test_preload_var 0.18s call src/tests/test_sysargv.py::test_sys_argv_state 0.14s call src/tests/test_method.py::test_getting_generic_method_binding_does_not_leak_memory ========================================================== 396 passed, 2 skipped in 3.40 seconds =========================================================== user@ubuntu:~/pythonnet$ git bisect good f2e6f6f89dde86b2043d6945fdffc2858eed2348 is the first bad commit commit f2e6f6f89dde86b2043d6945fdffc2858eed2348 Author: Alex Helms Date: Wed Oct 23 01:32:44 2019 -0700 Add function to set Py_NoSiteFlag global variable to 1 (#971) * Add function to set Py_NoSiteFlag global variable to 1. * Add myself to authors, update changelog. :100644 100644 9253c7e559e2116283f906db1333839ac438ff8f efa04c8f091fe4f6e488833d5aa1d3814fff520e M AUTHORS.md :100644 100644 e24a46904f917a3fcf04b946452b1c87a0aee0fe c7cad95676faed9574f5f5b6da8ed3520fd93457 M CHANGELOG.md :040000 040000 5b963458256c64c048670357f974132362d25951 c83fcbdc91c97479923d23e44a661685ef62a395 M src