| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,8 @@ jobs: | |||
| 31 | 31 | ||
| 32 | 32 | - name: Setup .NET | |
| 33 | 33 | uses: actions/setup-dotnet@v1 | |
| 34 | + with: | ||
| 35 | + dotnet-version: '6.0.x' | ||
| 34 | 36 | ||
| 35 | 37 | - name: Set up Python ${{ matrix.python }} | |
| 36 | 38 | uses: actions/setup-python@v2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,8 @@ jobs: | |||
| 25 | 25 | ||
| 26 | 26 | - name: Setup .NET | |
| 27 | 27 | uses: actions/setup-dotnet@v1 | |
| 28 | + with: | ||
| 29 | + dotnet-version: '6.0.x' | ||
| 28 | 30 | ||
| 29 | 31 | - name: Set up Python 3.8 | |
| 30 | 32 | uses: actions/setup-python@v2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,7 @@ | |||
| 9 | 9 | </PropertyGroup> | |
| 10 | 10 | <ItemGroup> | |
| 11 | 11 | <PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> | |
| 12 | - <PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.0.0-5.final"> | ||
| 12 | + <PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.0.1"> | ||
| 13 | 13 | <PrivateAssets>all</PrivateAssets> | |
| 14 | 14 | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | |
| 15 | 15 | </PackageReference> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ pythonnet - Python.NET | |||
| 3 | 3 | ||
| 4 | 4 | |Join the chat at https://gitter.im/pythonnet/pythonnet| |stackexchange shield| | |
| 5 | 5 | ||
| 6 | - |gh shield| |appveyor shield| | ||
| 6 | + |gh shield| | ||
| 7 | 7 | ||
| 8 | 8 | |license shield| | |
| 9 | 9 | ||
@@ -49,7 +49,7 @@ Embedding Python in .NET | |||
| 49 | 49 | starting with version 3.0, otherwise you will receive ``BadPythonDllException`` | |
| 50 | 50 | (internal, derived from ``MissingMethodException``) upon calling ``Initialize``. | |
| 51 | 51 | Typical values are ``python38.dll`` (Windows), ``libpython3.8.dylib`` (Mac), | |
| 52 | - ``libpython3.8.so`` (most other *nix). | ||
| 52 | + ``libpython3.8.so`` (most other Unix-like operating systems). | ||
| 53 | 53 | - All calls to python should be inside a | |
| 54 | 54 | ``using (Py.GIL()) {/* Your code here */}`` block. | |
| 55 | 55 | - Import python modules using ``dynamic mod = Py.Import("mod")``, then | |
@@ -123,12 +123,6 @@ This project is supported by the `.NET Foundation <https://dotnetfoundation.org> | |||
| 123 | 123 | ||
| 124 | 124 | .. |Join the chat at https://gitter.im/pythonnet/pythonnet| image:: https://badges.gitter.im/pythonnet/pythonnet.svg | |
| 125 | 125 | :target: https://gitter.im/pythonnet/pythonnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge | |
| 126 | - .. |appveyor shield| image:: https://img.shields.io/appveyor/ci/pythonnet/pythonnet/master.svg?label=AppVeyor | ||
| 127 | - :target: https://ci.appveyor.com/project/pythonnet/pythonnet/branch/master | ||
| 128 | - .. |travis shield| image:: https://img.shields.io/travis/pythonnet/pythonnet/master.svg?label=Travis | ||
| 129 | - :target: https://travis-ci.org/pythonnet/pythonnet | ||
| 130 | - .. |codecov shield| image:: https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=Codecov | ||
| 131 | - :target: https://codecov.io/github/pythonnet/pythonnet | ||
| 132 | 126 | .. |license shield| image:: https://img.shields.io/badge/license-MIT-blue.svg?maxAge=3600 | |
| 133 | 127 | :target: ./LICENSE | |
| 134 | 128 | .. |pypi package version| image:: https://img.shields.io/pypi/v/pythonnet.svg | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | Microsoft Visual Studio Solution File, Format Version 12.00 | |
| 2 | - # Visual Studio Version 16 | ||
| 3 | - VisualStudioVersion = 16.0.30717.126 | ||
| 2 | + # Visual Studio Version 17 | ||
| 3 | + VisualStudioVersion = 17.0.31912.275 | ||
| 4 | 4 | MinimumVisualStudioVersion = 15.0.26124.0 | |
| 5 | 5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.Runtime", "src\runtime\Python.Runtime.csproj", "{4E8C8FE2-0FB8-4517-B2D9-5FB2D5FC849B}" | |
| 6 | 6 | EndProject | |
@@ -25,9 +25,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F | |||
| 25 | 25 | EndProject | |
| 26 | 26 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-4534-B280-B858D651B2E5}" | |
| 27 | 27 | ProjectSection(SolutionItems) = preProject | |
| 28 | - appveyor.yml = appveyor.yml | ||
| 29 | - ci\appveyor_build_recipe.ps1 = ci\appveyor_build_recipe.ps1 | ||
| 30 | - ci\appveyor_run_tests.ps1 = ci\appveyor_run_tests.ps1 | ||
| 31 | 28 | .github\workflows\main.yml = .github\workflows\main.yml | |
| 32 | 29 | .github\workflows\nuget-preview.yml = .github\workflows\nuget-preview.yml | |
| 33 | 30 | EndProjectSection | |
@@ -37,13 +34,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution | |||
| 37 | 34 | setup.py = setup.py | |
| 38 | 35 | EndProjectSection | |
| 39 | 36 | EndProject | |
| 40 | - Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "conda.recipe", "conda.recipe", "{7FD2404D-0CE8-4645-8DFB-766470E2150E}" | ||
| 41 | - ProjectSection(SolutionItems) = preProject | ||
| 42 | - conda.recipe\bld.bat = conda.recipe\bld.bat | ||
| 43 | - conda.recipe\meta.yaml = conda.recipe\meta.yaml | ||
| 44 | - conda.recipe\README.md = conda.recipe\README.md | ||
| 45 | - EndProjectSection | ||
| 46 | - EndProject | ||
| 47 | 37 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{BC426F42-8494-4AA5-82C9-5109ACD97BD1}" | |
| 48 | 38 | ProjectSection(SolutionItems) = preProject | |
| 49 | 39 | tools\geninterop\geninterop.py = tools\geninterop\geninterop.py | |
@@ -90,18 +80,6 @@ Global | |||
| 90 | 80 | {E6B01706-00BA-4144-9029-186AC42FBE9A}.Release|x64.Build.0 = Release|x64 | |
| 91 | 81 | {E6B01706-00BA-4144-9029-186AC42FBE9A}.Release|x86.ActiveCfg = Release|x86 | |
| 92 | 82 | {E6B01706-00BA-4144-9029-186AC42FBE9A}.Release|x86.Build.0 = Release|x86 | |
| 93 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| 94 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| 95 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
| 96 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x64.Build.0 = Debug|Any CPU | ||
| 97 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
| 98 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Debug|x86.Build.0 = Debug|Any CPU | ||
| 99 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| 100 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| 101 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x64.ActiveCfg = Release|Any CPU | ||
| 102 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x64.Build.0 = Release|Any CPU | ||
| 103 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x86.ActiveCfg = Release|Any CPU | ||
| 104 | - {F9F5FA13-BC52-4C0B-BC1C-FE3C0B8FCCDD}.Release|x86.Build.0 = Release|Any CPU | ||
| 105 | 83 | {819E089B-4770-400E-93C6-4F7A35F0EA12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |
| 106 | 84 | {819E089B-4770-400E-93C6-4F7A35F0EA12}.Debug|Any CPU.Build.0 = Debug|Any CPU | |
| 107 | 85 | {819E089B-4770-400E-93C6-4F7A35F0EA12}.Debug|x64.ActiveCfg = Debug|Any CPU | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,6 +11,8 @@ | |||
| 11 | 11 | PY_MAJOR = sys.version_info[0] | |
| 12 | 12 | PY_MINOR = sys.version_info[1] | |
| 13 | 13 | ||
| 14 | + # Disable SourceLink during the build until it can read repo-format v1, #1613 | ||
| 15 | + os.environ["EnableSourceControlManagerQueries"] = "false" | ||
| 14 | 16 | ||
| 15 | 17 | class DotnetLib: | |
| 16 | 18 | def __init__(self, name, path, **kwargs): | |
@@ -154,6 +156,7 @@ def finalize_options(self): | |||
| 154 | 156 | packages=["pythonnet", "pythonnet.find_libpython"], | |
| 155 | 157 | install_requires=["clr_loader"], | |
| 156 | 158 | long_description=long_description, | |
| 159 | + long_description_content_type="text/x-rst", | ||
| 157 | 160 | py_modules=["clr"], | |
| 158 | 161 | dotnet_libs=dotnet_libs, | |
| 159 | 162 | classifiers=[ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> | |
| 2 | 2 | <PropertyGroup> | |
| 3 | - <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> | ||
| 3 | + <TargetFrameworks>net472;net6.0</TargetFrameworks> | ||
| 4 | 4 | <Platforms>x64;x86</Platforms> | |
| 5 | 5 | <OutputType>Exe</OutputType> | |
| 6 | 6 | <AssemblyName>nPython</AssemblyName> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -421,13 +421,18 @@ public PyObject TryEncode(object value) | |||
| 421 | 421 | } | |
| 422 | 422 | } | |
| 423 | 423 | ||
| 424 | - class InstancelessExceptionDecoder : IPyObjectDecoder | ||
| 424 | + class InstancelessExceptionDecoder : IPyObjectDecoder, IDisposable | ||
| 425 | 425 | { | |
| 426 | 426 | readonly PyObject PyErr = Py.Import("clr.interop").GetAttr("PyErr"); | |
| 427 | 427 | ||
| 428 | 428 | public bool CanDecode(PyType objectType, Type targetType) | |
| 429 | 429 | => PythonReferenceComparer.Instance.Equals(PyErr, objectType); | |
| 430 | 430 | ||
| 431 | + public void Dispose() | ||
| 432 | + { | ||
| 433 | + PyErr.Dispose(); | ||
| 434 | + } | ||
| 435 | + | ||
| 431 | 436 | public bool TryDecode<T>(PyObject pyObj, out T value) | |
| 432 | 437 | { | |
| 433 | 438 | if (pyObj.HasAttr("value")) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,22 @@ namespace Python.EmbeddingTest | |||
| 9 | 9 | [SetUpFixture] | |
| 10 | 10 | public partial class GlobalTestsSetup | |
| 11 | 11 | { | |
| 12 | + [OneTimeSetUp] | ||
| 13 | + public void GlobalSetup() | ||
| 14 | + { | ||
| 15 | + Finalizer.Instance.ErrorHandler += FinalizerErrorHandler; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + private void FinalizerErrorHandler(object sender, Finalizer.ErrorArgs e) | ||
| 19 | + { | ||
| 20 | + if (e.Error is RuntimeShutdownException) | ||
| 21 | + { | ||
| 22 | + // allow objects to leak after the python runtime run | ||
| 23 | + // they were created in is gone | ||
| 24 | + e.Handled = true; | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | + | ||
| 12 | 28 | [OneTimeTearDown] | |
| 13 | 29 | public void FinalCleanup() | |
| 14 | 30 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,7 @@ public void SetUp() | |||
| 24 | 24 | [OneTimeTearDown] | |
| 25 | 25 | public void Dispose() | |
| 26 | 26 | { | |
| 27 | + ExtraBaseTypeProvider.ExtraBase.Dispose(); | ||
| 27 | 28 | PythonEngine.Shutdown(); | |
| 28 | 29 | } | |
| 29 | 30 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments