Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 13871f2

Browse files
authored
Merge branch 'master' into fix-params-index
2 parents 6456503 + f8c27a1 commit 13871f2

File tree

6 files changed

+75
-63
lines changed

6 files changed

+75
-63
lines changed

.github/workflows/main.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: GitHub Actions
2+
3+
on: [ pull_request, push ]
4+
5+
jobs:
6+
build-test:
7+
name: Build and Test
8+
runs-on: ubuntu-16.04
9+
10+
strategy:
11+
matrix:
12+
python: [3.6,3.7,3.8,3.9]
13+
shutdown_mode: [Normal,Soft]
14+
toolset: [Mono,.NET]
15+
include:
16+
- toolset: .NET
17+
BUILD_OPTS: --xplat
18+
RUN_TESTS: dotnet
19+
EMBED_TESTS_PATH: netcoreapp3.1_publish/
20+
PERF_TESTS_PATH: net461/
21+
- toolset: Mono
22+
BUILD_OPTS: ""
23+
RUN_TESTS: "mono ./packages/NUnit.*/tools/nunit3-console.exe"
24+
EMBED_TESTS_PATH: ""
25+
PERF_TESTS_PATH: ""
26+
27+
env:
28+
BUILD_OPTS: ${{ matrix.BUILD_OPTS }}
29+
RUN_TESTS: ${{ matrix.RUN_TESTS }}
30+
EMBED_TESTS_PATH: ${{ matrix.EMBED_TESTS_PATH }}
31+
PERF_TESTS_PATH: ${{ matrix.PERF_TESTS_PATH }}
32+
PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }}
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v2
37+
38+
- name: Install Mono
39+
if: ${{ matrix.toolset == 'Mono' }}
40+
run: |
41+
sudo apt update
42+
sudo apt install mono-devel ca-certificates-mono -y
43+
44+
- name: Install .NET
45+
if: ${{ matrix.toolset == '.NET' }}
46+
uses: actions/setup-dotnet@v1
47+
with:
48+
dotnet-version: 3.1.x
49+
50+
- name: Set up Python ${{ matrix.python }}
51+
uses: actions/setup-python@v2
52+
with:
53+
python-version: ${{ matrix.python }}
54+
55+
- name: Install dependencies
56+
run: |
57+
pip install --upgrade setuptools # TEMP - due to setuptools 36.2.0 bug
58+
pip install --upgrade -r requirements.txt
59+
60+
- name: Install
61+
run: |
62+
echo $BUILD_OPTS
63+
python setup.py install $BUILD_OPTS
64+
65+
- name: Python Tests
66+
run: pytest
67+
68+
- name: .NET Tests
69+
run: $RUN_TESTS src/embed_tests/bin/$EMBED_TESTS_PATH/Python.EmbeddingTest.dll --labels=All

.travis.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
1818
details about the cause of the failure
1919
- `clr.AddReference` no longer adds ".dll" implicitly
2020
- `PyIter(PyObject)` constructor replaced with static `PyIter.GetIter(PyObject)` method
21-
- Return values from .NET methods that return an interface are now automatically
21+
- BREAKING: Return values from .NET methods that return an interface are now automatically
2222
wrapped in that interface. This is a breaking change for users that rely on being
2323
able to access members that are part of the implementation class, but not the
2424
interface. Use the new __implementation__ or __raw_implementation__ properties to
2525
if you need to "downcast" to the implementation class.
26+
- BREAKING: Parameters marked with `ParameterAttributes.Out` are no longer returned in addition
27+
to the regular method return value (unless they are passed with `ref` or `out` keyword).
2628

2729
### Fixed
2830

pythonnet.15.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F
2424
EndProject
2525
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-4534-B280-B858D651B2E5}"
2626
ProjectSection(SolutionItems) = preProject
27-
.travis.yml = .travis.yml
2827
appveyor.yml = appveyor.yml
2928
ci\appveyor_build_recipe.ps1 = ci\appveyor_build_recipe.ps1
3029
ci\appveyor_run_tests.ps1 = ci\appveyor_run_tests.ps1
30+
.github\workflows\main.yml = .github\workflows\main.yml
3131
EndProjectSection
3232
EndProject
3333
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57F5D701-F265-4736-A5A2-07249E7A4DA3}"

src/runtime/methodbinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ static object[] TryConvertArguments(ParameterInfo[] pi, bool paramsArray,
534534
Runtime.XDecref(op);
535535
}
536536

537-
if (parameter.IsOut || isOut)
537+
if (isOut)
538538
{
539539
outs++;
540540
}

src/tests/test_method.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def test_we_can_bind_to_encoding_get_string():
761761
read = 1
762762

763763
while read > 0:
764-
read, _ = stream.Read(buff, 0, buff.Length)
764+
read = stream.Read(buff, 0, buff.Length)
765765
temp = Encoding.UTF8.GetString(buff, 0, read)
766766
data.append(temp)
767767

0 commit comments

Comments
 (0)