Skip to content

Commit b200bcb

Browse files
authored
Merge branch 'master' into string-marshaling-cache
2 parents f7433f6 + 88d61a9 commit b200bcb

40 files changed

+1397
-172
lines changed

.travis.yml

+29-10
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ matrix:
2222
- dotnet-hostfxr-2.0.0
2323
- dotnet-runtime-2.0.0
2424
- dotnet-sdk-2.0.0
25+
2526
- python: 3.4
2627
env: *xplat-env
2728
addons: *xplat-addons
@@ -33,9 +34,24 @@ matrix:
3334
- python: 3.6
3435
env: *xplat-env
3536
addons: *xplat-addons
36-
- python: "3.7-dev"
37+
38+
- python: 3.7
3739
env: *xplat-env
38-
addons: *xplat-addons
40+
dist: xenial
41+
sudo: true
42+
addons: &xplat-addons-xenial
43+
apt:
44+
sources:
45+
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main
46+
key_url: https://packages.microsoft.com/keys/microsoft.asc
47+
- sourceline: deb https://download.mono-project.com/repo/ubuntu stable-xenial main
48+
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
49+
packages:
50+
- mono-devel
51+
- ca-certificates-mono
52+
- dotnet-hostfxr-2.0.0
53+
- dotnet-runtime-2.0.0
54+
- dotnet-sdk-2.0.0
3955

4056
# --------------------- Classic builds ------------------------
4157
- python: 2.7
@@ -52,15 +68,18 @@ matrix:
5268
- python: 3.6
5369
env: *classic-env
5470

55-
- python: "3.7-dev"
56-
env: *classic-env
57-
58-
allow_failures:
59-
- python: "3.7-dev"
60-
env: *xplat-env
61-
62-
- python: "3.7-dev"
71+
- python: 3.7
6372
env: *classic-env
73+
dist: xenial
74+
sudo: true
75+
addons:
76+
apt:
77+
sources:
78+
- sourceline: deb http://download.mono-project.com/repo/ubuntu xenial main
79+
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
80+
packages:
81+
- mono-devel
82+
- ca-certificates-mono
6483

6584
env:
6685
global:

AUTHORS.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
- Alexandre Catarino([@AlexCatarino](https://github.com/AlexCatarino))
1616
- Arvid JB ([@ArvidJB](https://github.com/ArvidJB))
17+
- Benoît Hudson ([@benoithudson](https://github.com/benoithudson))
1718
- Bradley Friedman ([@leith-bartrich](https://github.com/leith-bartrich))
1819
- Callum Noble ([@callumnoble](https://github.com/callumnoble))
1920
- Christian Heimes ([@tiran](https://github.com/tiran))
@@ -22,6 +23,7 @@
2223
- Daniel Fernandez ([@fdanny](https://github.com/fdanny))
2324
- Daniel Santana ([@dgsantana](https://github.com/dgsantana))
2425
- Dave Hirschfeld ([@dhirschfeld](https://github.com/dhirschfeld))
26+
- David Lassonde ([@lassond](https://github.com/lassond))
2527
- David Lechner ([@dlech](https://github.com/dlech))
2628
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
2729
- He-chien Tsai ([@t3476](https://github.com/t3476))
@@ -40,6 +42,8 @@
4042
- Sam Winstanley ([@swinstanley](https://github.com/swinstanley))
4143
- Sean Freitag ([@cowboygneox](https://github.com/cowboygneox))
4244
- Serge Weinstock ([@sweinst](https://github.com/sweinst))
45+
- Simon Mourier ([@smourier](https://github.com/smourier))
46+
- Viktoria Kovescses ([@vkovec](https://github.com/vkovec))
4347
- Ville M. Vainio ([@vivainio](https://github.com/vivainio))
4448
- Virgil Dupras ([@hsoft](https://github.com/hsoft))
4549
- Wenguang Yang ([@yagweb](https://github.com/yagweb))

CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,26 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
1515
Currently there two side-by-side build systems that produces the same output (net40) from the same sources.
1616
After a some transition time, current (mono/ msbuild 14.0) build system will be removed.
1717
- NUnit upgraded to 3.7 (eliminates travis-ci random bug)
18+
- Added C# `PythonEngine.AddShutdownHandler` to help client code clean up on shutdown.
1819
- Added `clr.GetClrType` ([#432][i432])([#433][p433])
1920
- Allowed passing `None` for nullable args ([#460][p460])
2021
- Added keyword arguments based on C# syntax for calling CPython methods ([#461][p461])
2122
- Catches exceptions thrown in C# iterators (yield returns) and rethrows them in python ([#475][i475])([#693][p693])
2223
- Implemented GetDynamicMemberNames() for PyObject to allow dynamic object members to be visible in the debugger ([#443][i443])([#690][p690])
2324
- Incorporated reference-style links to issues and pull requests in the CHANGELOG ([#608][i608])
2425
- Added detailed comments about aproaches and dangers to handle multi-app-domains ([#625][p625])
26+
- Python 3.7 support, builds and testing added. Defaults changed from Python 3.6 to 3.7 ([#698][p698])
2527

2628
### Changed
2729

2830
### Fixed
2931

3032
- Fixed secondary PythonEngine.Initialize call, all sensitive static variables now reseted.
31-
This is a hidden bug. Once python cleaning up enough memory, objects from previous engine run becomes corrupted.
33+
This is a hidden bug. Once python cleaning up enough memory, objects from previous engine run becomes corrupted. ([#534][p534])
3234
- Fixed Visual Studio 2017 compat ([#434][i434]) for setup.py
35+
- Fixed crashes when integrating pythonnet in Unity3d ([#714][i714]),
36+
related to unloading the Application Domain
37+
- Fixed interop methods with Py_ssize_t. NetCoreApp 2.0 is more sensitive than net40 and requires this fix. ([#531][p531])
3338
- Fixed crash on exit of the Python interpreter if a python class
3439
derived from a .NET class has a `__namespace__` or `__assembly__`
3540
attribute ([#481][i481])
@@ -41,6 +46,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
4146
- Fixed errors breaking .NET Remoting on method invoke ([#276][i276])
4247
- Fixed PyObject.GetHashCode ([#676][i676])
4348
- Fix memory leaks due to spurious handle incrementation ([#691][i691])
49+
- Fix inheritance of non-abstract base methods ([#755][i755])
4450

4551

4652
## [2.3.0][] - 2017-03-11
@@ -598,6 +604,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
598604

599605
[1.0.0]: https://github.com/pythonnet/pythonnet/releases/tag/1.0
600606

607+
[i714]: https://github.com/pythonnet/pythonnet/issues/714
601608
[i608]: https://github.com/pythonnet/pythonnet/issues/608
602609
[i443]: https://github.com/pythonnet/pythonnet/issues/443
603610
[p690]: https://github.com/pythonnet/pythonnet/pull/690
@@ -690,3 +697,6 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
690697
[p163]: https://github.com/pythonnet/pythonnet/pull/163
691698
[p625]: https://github.com/pythonnet/pythonnet/pull/625
692699
[i131]: https://github.com/pythonnet/pythonnet/issues/131
700+
[p531]: https://github.com/pythonnet/pythonnet/pull/531
701+
[i755]: https://github.com/pythonnet/pythonnet/pull/755
702+
[p534]: https://github.com/pythonnet/pythonnet/pull/534

appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ environment:
2323
BUILD_OPTS: --xplat
2424
- PYTHON_VERSION: 3.6
2525
BUILD_OPTS: --xplat
26+
- PYTHON_VERSION: 3.7
27+
BUILD_OPTS: --xplat
2628
- PYTHON_VERSION: 2.7
2729
- PYTHON_VERSION: 3.4
2830
- PYTHON_VERSION: 3.5
2931
- PYTHON_VERSION: 3.6
32+
- PYTHON_VERSION: 3.7
3033

3134
matrix:
3235
allow_failures:

setup.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Allow config/verbosity to be set from cli
2323
# http://stackoverflow.com/a/4792601/5208670
2424
CONFIG = "Release" # Release or Debug
25-
VERBOSITY = "minimal" # quiet, minimal, normal, detailed, diagnostic
25+
VERBOSITY = "normal" # quiet, minimal, normal, detailed, diagnostic
2626

2727
is_64bits = sys.maxsize > 2**32
2828
DEVTOOLS = "MsDev" if sys.platform == "win32" else "Mono"
@@ -329,9 +329,16 @@ def _install_packages(self):
329329
self.debug_print("Updating NuGet: {0}".format(cmd))
330330
subprocess.check_call(cmd, shell=use_shell)
331331

332-
cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages".format(nuget)
333-
self.debug_print("Installing packages: {0}".format(cmd))
334-
subprocess.check_call(cmd, shell=use_shell)
332+
try:
333+
# msbuild=14 is mainly for Mono issues
334+
cmd = "{0} restore pythonnet.sln -MSBuildVersion 14 -o packages".format(nuget)
335+
self.debug_print("Installing packages: {0}".format(cmd))
336+
subprocess.check_call(cmd, shell=use_shell)
337+
except:
338+
# when only VS 2017 is installed do not specify msbuild version
339+
cmd = "{0} restore pythonnet.sln -o packages".format(nuget)
340+
self.debug_print("Installing packages: {0}".format(cmd))
341+
subprocess.check_call(cmd, shell=use_shell)
335342

336343
def _find_msbuild_tool(self, tool="msbuild.exe", use_windows_sdk=False):
337344
"""Return full path to one of the Microsoft build tools"""
@@ -516,10 +523,10 @@ def run(self):
516523
'Programming Language :: Python :: 2',
517524
'Programming Language :: Python :: 2.7',
518525
'Programming Language :: Python :: 3',
519-
'Programming Language :: Python :: 3.3',
520526
'Programming Language :: Python :: 3.4',
521527
'Programming Language :: Python :: 3.5',
522528
'Programming Language :: Python :: 3.6',
529+
'Programming Language :: Python :: 3.7',
523530
'Operating System :: Microsoft :: Windows',
524531
'Operating System :: POSIX :: Linux',
525532
'Operating System :: MacOS :: MacOS X',

src/embed_tests/GlobalTestsSetup.cs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using NUnit.Framework;
2+
using Python.Runtime;
3+
4+
namespace Python.EmbeddingTest
5+
{
6+
7+
// As the SetUpFixture, the OneTimeTearDown of this class is executed after
8+
// all tests have run.
9+
[SetUpFixture]
10+
public class GlobalTestsSetup
11+
{
12+
[OneTimeTearDown]
13+
public void FinalCleanup()
14+
{
15+
if (PythonEngine.IsInitialized)
16+
{
17+
PythonEngine.Shutdown();
18+
}
19+
}
20+
}
21+
}

src/embed_tests/Python.EmbeddingTest.15.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<BaseDefineConstants>XPLAT</BaseDefineConstants>
3030
<DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants>
3131
<DefineConstants Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(DefineConstants);NETCOREAPP</DefineConstants>
32+
<DefineConstants Condition="'$(TargetFramework)'=='netstandard2.0'">$(DefineConstants);NETSTANDARD</DefineConstants>
3233
<DefineConstants Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(CustomDefineConstants)' != '' AND $(Configuration.Contains('Debug'))">$(DefineConstants);TRACE;DEBUG</DefineConstants>
3334
<FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride>
3435
</PropertyGroup>

src/embed_tests/Python.EmbeddingTest.csproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<Compile Include="pyrunstring.cs" />
8787
<Compile Include="TestConverter.cs" />
8888
<Compile Include="TestCustomMarshal.cs" />
89+
<Compile Include="TestDomainReload.cs" />
8990
<Compile Include="TestExample.cs" />
9091
<Compile Include="TestPyAnsiString.cs" />
9192
<Compile Include="TestPyFloat.cs" />
@@ -104,6 +105,8 @@
104105
<Compile Include="TestRuntime.cs" />
105106
<Compile Include="TestPyScope.cs" />
106107
<Compile Include="TestsSuite.cs" />
108+
<Compile Include="TestTypeManager.cs" />
109+
<Compile Include="GlobalTestsSetup.cs" />
107110
</ItemGroup>
108111
<ItemGroup>
109112
<ProjectReference Include="..\runtime\Python.Runtime.csproj">
@@ -123,4 +126,4 @@
123126
<Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" />
124127
<!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /-->
125128
</Target>
126-
</Project>
129+
</Project>

0 commit comments

Comments
 (0)