| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,9 +9,9 @@ python: | |||
| 9 | 9 | ||
| 10 | 10 | env: | |
| 11 | 11 | matrix: | |
| 12 | - - BUILD_OPTS=--xplat NUNIT_PATH="~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe" RUN_TESTS=dotnet EMBED_TESTS_PATH=netcoreapp2.0_publish/ PERF_TESTS_PATH=net461/ | ||
| 12 | + - BUILD_OPTS=--xplat NUNIT_PATH="~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe" RUN_TESTS=dotnet EMBED_TESTS_PATH=netcoreapp3.1_publish/ PERF_TESTS_PATH=net461/ | ||
| 13 | 13 | - BUILD_OPTS="" NUNIT_PATH="./packages/NUnit.*/tools/nunit3-console.exe" RUN_TESTS="mono $NUNIT_PATH" EMBED_TESTS_PATH="" PERF_TESTS_PATH="" | |
| 14 | - - PYTHONNET_SHUTDOWN_MODE="Soft" BUILD_OPTS=--xplat NUNIT_PATH="~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe" RUN_TESTS=dotnet EMBED_TESTS_PATH=netcoreapp2.0_publish/ PERF_TESTS_PATH=net461/ | ||
| 14 | + - PYTHONNET_SHUTDOWN_MODE="Soft" BUILD_OPTS=--xplat NUNIT_PATH="~/.nuget/packages/nunit.consolerunner/3.*/tools/nunit3-console.exe" RUN_TESTS=dotnet EMBED_TESTS_PATH=netcoreapp3.1_publish/ PERF_TESTS_PATH=net461/ | ||
| 15 | 15 | - PYTHONNET_SHUTDOWN_MODE="Soft" BUILD_OPTS="" NUNIT_PATH="./packages/NUnit.*/tools/nunit3-console.exe" RUN_TESTS="mono $NUNIT_PATH" EMBED_TESTS_PATH="" PERF_TESTS_PATH="" | |
| 16 | 16 | ||
| 17 | 17 | global: | |
@@ -30,9 +30,7 @@ addons: | |||
| 30 | 30 | packages: | |
| 31 | 31 | - mono-devel | |
| 32 | 32 | - ca-certificates-mono | |
| 33 | - - dotnet-hostfxr-2.2 | ||
| 34 | - - dotnet-runtime-2.2 | ||
| 35 | - - dotnet-sdk-2.2 | ||
| 33 | + - dotnet-sdk-3.1 | ||
| 36 | 34 | ||
| 37 | 35 | before_install: | |
| 38 | 36 | # Set-up dll path for embedded tests | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -99,12 +99,12 @@ if ($XPLAT){ | |||
| 99 | 99 | $DOTNET_CMD = "c:\Program Files (x86)\dotnet\dotnet" | |
| 100 | 100 | } | |
| 101 | 101 | ||
| 102 | - # Run Embedded tests for netcoreapp2.0 (OpenCover currently does not supports dotnet core) | ||
| 103 | - Write-Host ("Starting embedded tests for netcoreapp2.0") -ForegroundColor "Green" | ||
| 104 | - &$DOTNET_CMD ".\src\embed_tests\bin\netcoreapp2.0_publish\Python.EmbeddingTest.dll" | ||
| 102 | + # Run Embedded tests for netcoreapp3.1 (OpenCover currently does not supports dotnet core) | ||
| 103 | + Write-Host ("Starting embedded tests for netcoreapp3.1") -ForegroundColor "Green" | ||
| 104 | + &$DOTNET_CMD ".\src\embed_tests\bin\netcoreapp3.1_publish\Python.EmbeddingTest.dll" | ||
| 105 | 105 | $CS_STATUS = $LastExitCode | |
| 106 | 106 | if ($CS_STATUS -ne 0) { | |
| 107 | - Write-Host "Embedded tests for netcoreapp2.0 failed" -ForegroundColor "Red" | ||
| 107 | + Write-Host "Embedded tests for netcoreapp3.1 failed" -ForegroundColor "Red" | ||
| 108 | 108 | ReportTime "" | |
| 109 | 109 | } else { | |
| 110 | 110 | ReportTime ".NET Core 2.0 tests completed" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -351,7 +351,7 @@ def build_extension(self, ext): | |||
| 351 | 351 | cmd | |
| 352 | 352 | + [ | |
| 353 | 353 | '"/t:Console_15:publish;Python_EmbeddingTest_15:publish"', | |
| 354 | - "/p:TargetFramework=netcoreapp2.0", | ||
| 354 | + "/p:TargetFramework=netcoreapp3.1", | ||
| 355 | 355 | ] | |
| 356 | 356 | ), | |
| 357 | 357 | shell=use_shell, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | <Project> | |
| 2 | 2 | <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | |
| 3 | 3 | <PropertyGroup> | |
| 4 | - <TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks> | ||
| 4 | + <TargetFrameworks>net40;netcoreapp3.1</TargetFrameworks> | ||
| 5 | 5 | <Platforms>x64;x86</Platforms> | |
| 6 | 6 | <Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations> | |
| 7 | 7 | <OutputType>Exe</OutputType> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | |
| 3 | 3 | ||
| 4 | 4 | <PropertyGroup> | |
| 5 | - <TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks> | ||
| 5 | + <TargetFrameworks>net40;netcoreapp3.1</TargetFrameworks> | ||
| 6 | 6 | <Platforms>x64;x86</Platforms> | |
| 7 | 7 | <Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations> | |
| 8 | 8 | <OutputType Condition="'$(TargetFramework)' != 'net40' OR '$(PYTHONNET_VS_ENV)' == 'true'">Exe</OutputType> | |
@@ -28,7 +28,7 @@ | |||
| 28 | 28 | <CustomDefineConstants Condition="'$(CustomDefineConstants)' == ''">$(PYTHONNET_DEFINE_CONSTANTS)</CustomDefineConstants> | |
| 29 | 29 | <BaseDefineConstants>XPLAT</BaseDefineConstants> | |
| 30 | 30 | <DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants> | |
| 31 | - <DefineConstants Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(DefineConstants);NETCOREAPP</DefineConstants> | ||
| 31 | + <DefineConstants Condition="'$(TargetFramework)'=='netcoreapp3.1'">$(DefineConstants);NETCOREAPP</DefineConstants> | ||
| 32 | 32 | <DefineConstants Condition="'$(TargetFramework)'=='netstandard2.0'">$(DefineConstants);NETSTANDARD</DefineConstants> | |
| 33 | 33 | <DefineConstants Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(CustomDefineConstants)' != '' AND $(Configuration.Contains('Debug'))">$(DefineConstants);TRACE;DEBUG</DefineConstants> | |
| 34 | 34 | <FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride> | |
@@ -87,7 +87,7 @@ | |||
| 87 | 87 | </PackageReference> | |
| 88 | 88 | <PackageReference Include="NUnitLite" Version="3.12.0" /> | |
| 89 | 89 | </ItemGroup> | |
| 90 | - <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'"> | ||
| 90 | + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'"> | ||
| 91 | 91 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" /> | |
| 92 | 92 | </ItemGroup> | |
| 93 | 93 | <ItemGroup> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,13 +203,13 @@ def test_obj_call(): | |||
| 203 | 203 | // Create a new module | |
| 204 | 204 | IntPtr module = PyRuntime.PyModule_New(name); | |
| 205 | 205 | Assert.That(module != IntPtr.Zero); | |
| 206 | - IntPtr globals = PyRuntime.PyObject_GetAttrString(module, "__dict__"); | ||
| 206 | + IntPtr globals = PyRuntime.PyObject_GetAttr(module, PyIdentifier.__dict__); | ||
| 207 | 207 | Assert.That(globals != IntPtr.Zero); | |
| 208 | 208 | try | |
| 209 | 209 | { | |
| 210 | 210 | // import builtins | |
| 211 | 211 | // module.__dict__[__builtins__] = builtins | |
| 212 | - int res = PyRuntime.PyDict_SetItemString(globals, "__builtins__", | ||
| 212 | + int res = PyRuntime.PyDict_SetItem(globals, PyIdentifier.__builtins__, | ||
| 213 | 213 | PyRuntime.PyEval_GetBuiltins()); | |
| 214 | 214 | PythonException.ThrowIfIsNotZero(res); | |
| 215 | 215 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -143,6 +143,22 @@ | |||
| 143 | 143 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | |
| 144 | 144 | </ItemGroup> | |
| 145 | 145 | ||
| 146 | + <ItemGroup> | ||
| 147 | + <None Update="intern_.tt"> | ||
| 148 | + <Generator>TextTemplatingFileGenerator</Generator> | ||
| 149 | + <LastGenOutput>intern_.cs</LastGenOutput> | ||
| 150 | + </None> | ||
| 151 | + </ItemGroup> | ||
| 152 | + | ||
| 153 | + | ||
| 154 | + <ItemGroup> | ||
| 155 | + <Compile Update="intern_.cs"> | ||
| 156 | + <DesignTime>True</DesignTime> | ||
| 157 | + <AutoGen>True</AutoGen> | ||
| 158 | + <DependentUpon>intern_.tt</DependentUpon> | ||
| 159 | + </Compile> | ||
| 160 | + </ItemGroup> | ||
| 161 | + | ||
| 146 | 162 | <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | |
| 147 | 163 | ||
| 148 | 164 | <PropertyGroup> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,14 +82,16 @@ | |||
| 82 | 82 | <Compile Include="Codecs\TupleCodecs.cs" /> | |
| 83 | 83 | <Compile Include="converterextensions.cs" /> | |
| 84 | 84 | <Compile Include="finalizer.cs" /> | |
| 85 | + <Compile Include="intern.cs" /> | ||
| 86 | + <Compile Include="intern_.cs" /> | ||
| 85 | 87 | <Compile Include="Properties\AssemblyInfo.cs" /> | |
| 86 | 88 | <Compile Include="..\SharedAssemblyInfo.cs"> | |
| 87 | 89 | <Link>Properties\SharedAssemblyInfo.cs</Link> | |
| 88 | 90 | </Compile> | |
| 89 | 91 | <Compile Include="arrayobject.cs" /> | |
| 90 | 92 | <Compile Include="assemblymanager.cs" /> | |
| 91 | 93 | <Compile Include="BorrowedReference.cs" /> | |
| 92 | - <Compile Include="bufferinterface.cs" /> | ||
| 94 | + <Compile Include="bufferinterface.cs" /> | ||
| 93 | 95 | <Compile Include="classderived.cs" /> | |
| 94 | 96 | <Compile Include="classbase.cs" /> | |
| 95 | 97 | <Compile Include="classmanager.cs" /> | |
@@ -131,7 +133,7 @@ | |||
| 131 | 133 | <Compile Include="overload.cs" /> | |
| 132 | 134 | <Compile Include="propertyobject.cs" /> | |
| 133 | 135 | <Compile Include="pyansistring.cs" /> | |
| 134 | - <Compile Include="pybuffer.cs" /> | ||
| 136 | + <Compile Include="pybuffer.cs" /> | ||
| 135 | 137 | <Compile Include="pydict.cs" /> | |
| 136 | 138 | <Compile Include="PyExportAttribute.cs" /> | |
| 137 | 139 | <Compile Include="pyfloat.cs" /> | |
@@ -186,4 +188,4 @@ | |||
| 186 | 188 | <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> | |
| 187 | 189 | <!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /--> | |
| 188 | 190 | </Target> | |
| 189 | - </Project> | ||
| 191 | + </Project> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -279,7 +279,7 @@ public static IntPtr tp_repr(IntPtr ob) | |||
| 279 | 279 | IntPtr args = Runtime.PyTuple_New(1); | |
| 280 | 280 | Runtime.XIncref(ob); | |
| 281 | 281 | Runtime.PyTuple_SetItem(args, 0, ob); | |
| 282 | - IntPtr reprFunc = Runtime.PyObject_GetAttrString(Runtime.PyBaseObjectType, "__repr__"); | ||
| 282 | + IntPtr reprFunc = Runtime.PyObject_GetAttr(Runtime.PyBaseObjectType, PyIdentifier.__repr__); | ||
| 283 | 283 | var output = Runtime.PyObject_Call(reprFunc, args, IntPtr.Zero); | |
| 284 | 284 | Runtime.XDecref(args); | |
| 285 | 285 | Runtime.XDecref(reprFunc); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -232,7 +232,7 @@ private static void InitClassBase(Type type, ClassBase impl) | |||
| 232 | 232 | var attr = (DocStringAttribute)attrs[0]; | |
| 233 | 233 | string docStr = attr.DocString; | |
| 234 | 234 | doc = Runtime.PyString_FromString(docStr); | |
| 235 | - Runtime.PyDict_SetItemString(dict, "__doc__", doc); | ||
| 235 | + Runtime.PyDict_SetItem(dict, PyIdentifier.__doc__, doc); | ||
| 236 | 236 | Runtime.XDecref(doc); | |
| 237 | 237 | } | |
| 238 | 238 | ||
@@ -249,16 +249,16 @@ private static void InitClassBase(Type type, ClassBase impl) | |||
| 249 | 249 | var ctors = new ConstructorBinding(type, tp, co.binder); | |
| 250 | 250 | // ExtensionType types are untracked, so don't Incref() them. | |
| 251 | 251 | // TODO: deprecate __overloads__ soon... | |
| 252 | - Runtime.PyDict_SetItemString(dict, "__overloads__", ctors.pyHandle); | ||
| 253 | - Runtime.PyDict_SetItemString(dict, "Overloads", ctors.pyHandle); | ||
| 252 | + Runtime.PyDict_SetItem(dict, PyIdentifier.__overloads__, ctors.pyHandle); | ||
| 253 | + Runtime.PyDict_SetItem(dict, PyIdentifier.Overloads, ctors.pyHandle); | ||
| 254 | 254 | ctors.DecrRefCount(); | |
| 255 | 255 | } | |
| 256 | 256 | ||
| 257 | 257 | // don't generate the docstring if one was already set from a DocStringAttribute. | |
| 258 | 258 | if (!CLRModule._SuppressDocs && doc == IntPtr.Zero) | |
| 259 | 259 | { | |
| 260 | 260 | doc = co.GetDocString(); | |
| 261 | - Runtime.PyDict_SetItemString(dict, "__doc__", doc); | ||
| 261 | + Runtime.PyDict_SetItem(dict, PyIdentifier.__doc__, doc); | ||
| 262 | 262 | Runtime.XDecref(doc); | |
| 263 | 263 | } | |
| 264 | 264 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments