Skip to content

Commit d6d1a0d

Browse files
authored
Merge branch 'master' into clr-loader
2 parents bae3bae + 6b2347a commit d6d1a0d

File tree

7 files changed

+88
-15
lines changed

7 files changed

+88
-15
lines changed

.github/workflows/nuget-preview.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: GitHub Actions
2+
3+
on:
4+
schedule:
5+
- cron: "5 4 3 */1 *" # once a month, at 4:05 on 3rd
6+
7+
jobs:
8+
release:
9+
name: Release Preview
10+
runs-on: ubuntu-latest
11+
environment: NuGet
12+
timeout-minutes: 10
13+
14+
env:
15+
PYTHONNET_SHUTDOWN_MODE: Normal
16+
17+
steps:
18+
- name: Get Date
19+
run: |
20+
echo "DATE_VER=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
21+
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v1
27+
28+
- name: Set up Python 3.8
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: 3.8
32+
architecture: x64
33+
34+
- name: Install dependencies
35+
run: |
36+
pip install --upgrade -r requirements.txt
37+
38+
- name: Build and Install
39+
run: |
40+
python setup.py configure
41+
pip install -v .
42+
43+
- name: Python Tests
44+
run: pytest
45+
env:
46+
PYTHONNET_PYDLL: libpython3.8.so
47+
48+
- name: Embedding tests
49+
run: dotnet test --runtime any-ubuntu src/embed_tests/
50+
env:
51+
PYTHONNET_PYDLL: libpython3.8.so
52+
53+
- name: Pack
54+
run: dotnet pack --configuration Release --version-suffix preview${{env.DATE_VER}} --output "Release-Preview"
55+
56+
- name: Publish NuGet
57+
run: dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_MONTHLY }} Release-Preview/*.nupkg
58+
59+
# TODO: Run perf tests
60+
# TODO: Run mono tests on Windows?

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ or the DLL must be loaded in advance. This must be done before calling any other
5656
- `import` may now raise errors with more detail than "No module named X"
5757
- Exception stacktraces on `PythonException.StackTrace` are now properly formatted
5858
- Providing an invalid type parameter to a generic type or method produces a helpful Python error
59+
- Empty parameter names (as can be generated from F#) do not cause crashes
5960

6061
### Removed
6162

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<AssemblyCompany>pythonnet</AssemblyCompany>
66
<AssemblyProduct>Python.NET</AssemblyProduct>
77
<LangVersion>7.3</LangVersion>
8+
<IsPackable>false</IsPackable>
89
</PropertyGroup>
910
<ItemGroup>
1011
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2006-2020 the contributors of the Python.NET project
3+
Copyright (c) 2006-2021 the contributors of the Python.NET project
44

55
Permission is hereby granted, free of charge, to any person obtaining a
66
copy of this software and associated documentation files (the "Software"),

pythonnet.sln

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F
1919
.editorconfig = .editorconfig
2020
.gitignore = .gitignore
2121
CHANGELOG.md = CHANGELOG.md
22+
LICENSE = LICENSE
2223
README.rst = README.rst
2324
EndProjectSection
2425
EndProject
@@ -28,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-
2829
ci\appveyor_build_recipe.ps1 = ci\appveyor_build_recipe.ps1
2930
ci\appveyor_run_tests.ps1 = ci\appveyor_run_tests.ps1
3031
.github\workflows\main.yml = .github\workflows\main.yml
32+
.github\workflows\nuget-preview.yml = .github\workflows\nuget-preview.yml
3133
EndProjectSection
3234
EndProject
3335
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57F5D701-F265-4736-A5A2-07249E7A4DA3}"
@@ -49,6 +51,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{BC426F42
4951
EndProject
5052
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Python.PythonTestsRunner", "src\python_tests_runner\Python.PythonTestsRunner.csproj", "{35CBBDEB-FC07-4D04-9D3E-F88FC180110B}"
5153
EndProject
54+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{142A6752-C2C2-4F95-B982-193418001B65}"
55+
ProjectSection(SolutionItems) = preProject
56+
configured.props = configured.props
57+
Directory.Build.props = Directory.Build.props
58+
EndProjectSection
59+
EndProject
5260
Global
5361
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5462
Debug|Any CPU = Debug|Any CPU
@@ -143,18 +151,6 @@ Global
143151
{F2FB6DA3-318E-4F30-9A1F-932C667E38C5}.Release|x64.Build.0 = Release|Any CPU
144152
{F2FB6DA3-318E-4F30-9A1F-932C667E38C5}.Release|x86.ActiveCfg = Release|Any CPU
145153
{F2FB6DA3-318E-4F30-9A1F-932C667E38C5}.Release|x86.Build.0 = Release|Any CPU
146-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
147-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|Any CPU.Build.0 = Debug|Any CPU
148-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x64.ActiveCfg = Debug|Any CPU
149-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x64.Build.0 = Debug|Any CPU
150-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x86.ActiveCfg = Debug|Any CPU
151-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Debug|x86.Build.0 = Debug|Any CPU
152-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|Any CPU.ActiveCfg = Release|Any CPU
153-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|Any CPU.Build.0 = Release|Any CPU
154-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x64.ActiveCfg = Release|Any CPU
155-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x64.Build.0 = Release|Any CPU
156-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x86.ActiveCfg = Release|Any CPU
157-
{6CF9EEA0-F865-4536-AABA-739AE3DA971E}.Release|x86.Build.0 = Release|Any CPU
158154
{35CBBDEB-FC07-4D04-9D3E-F88FC180110B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
159155
{35CBBDEB-FC07-4D04-9D3E-F88FC180110B}.Debug|Any CPU.Build.0 = Debug|Any CPU
160156
{35CBBDEB-FC07-4D04-9D3E-F88FC180110B}.Debug|x64.ActiveCfg = Debug|Any CPU

src/runtime/Python.Runtime.csproj

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,36 @@
55
<LangVersion>9.0</LangVersion>
66
<RootNamespace>Python.Runtime</RootNamespace>
77
<AssemblyName>Python.Runtime</AssemblyName>
8+
89
<PackageId>pythonnet</PackageId>
9-
<PackageLicenseUrl>https://github.com/pythonnet/pythonnet/blob/master/LICENSE</PackageLicenseUrl>
10+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1011
<RepositoryUrl>https://github.com/pythonnet/pythonnet</RepositoryUrl>
1112
<RepositoryType>git</RepositoryType>
1213
<PackageTags>python interop dynamic dlr Mono pinvoke</PackageTags>
1314
<PackageIconUrl>https://raw.githubusercontent.com/pythonnet/pythonnet/master/src/console/python-clear.ico</PackageIconUrl>
1415
<PackageProjectUrl>https://pythonnet.github.io/</PackageProjectUrl>
16+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
17+
<Description>Python and CLR (.NET and Mono) cross-platform language interop</Description>
18+
19+
<DebugSymbols>true</DebugSymbols>
20+
<IncludeSymbols>true</IncludeSymbols>
21+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
22+
1523
<NoWarn>1591;NU1701</NoWarn>
1624
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
25+
26+
<IsPackable>true</IsPackable>
1727
</PropertyGroup>
1828

1929
<PropertyGroup>
2030
<OutputPath>..\..\pythonnet\runtime</OutputPath>
2131
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
2232
</PropertyGroup>
2333

34+
<ItemGroup>
35+
<None Include="..\..\LICENSE" Pack="true" PackagePath=""/>
36+
</ItemGroup>
37+
2438
<ItemGroup>
2539
<None Remove="resources\clr.py" />
2640
<EmbeddedResource Include="resources\clr.py">
@@ -31,5 +45,6 @@
3145
<ItemGroup>
3246
<PackageReference Include="System.Security.Permissions" Version="4.4.0" />
3347
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
48+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
3449
</ItemGroup>
3550
</Project>

src/runtime/methodbinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ static object[] TryConvertArguments(ParameterInfo[] pi, bool paramsArray,
622622
for (int paramIndex = 0; paramIndex < pi.Length; paramIndex++)
623623
{
624624
var parameter = pi[paramIndex];
625-
bool hasNamedParam = kwargDict.ContainsKey(parameter.Name);
625+
bool hasNamedParam = parameter.Name != null ? kwargDict.ContainsKey(parameter.Name) : false;
626626
bool isNewReference = false;
627627

628628
if (paramIndex >= pyArgCount && !(hasNamedParam || (paramsArray && paramIndex == arrayStart)))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy