X Tutup
Skip to content

Commit 04c1096

Browse files
authored
Merge pull request #1 from pythonnet/master
Update to pythonnet
2 parents 19d854c + 397b0b4 commit 04c1096

File tree

9 files changed

+14
-159
lines changed

9 files changed

+14
-159
lines changed

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ matrix:
2222
- dotnet-hostfxr-2.0.0
2323
- dotnet-runtime-2.0.0
2424
- dotnet-sdk-2.0.0
25-
- python: 3.3
26-
env: *xplat-env
27-
addons: *xplat-addons
28-
2925
- python: 3.4
3026
env: *xplat-env
3127
addons: *xplat-addons
@@ -47,9 +43,6 @@ matrix:
4743
- BUILD_OPTS=
4844
- NUNIT_PATH=./packages/NUnit.*/tools/nunit3-console.exe
4945

50-
- python: 3.3
51-
env: *classic-env
52-
5346
- python: 3.4
5447
env: *classic-env
5548

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@
4848
- ([@rmadsen-ks](https://github.com/rmadsen-ks))
4949
- ([@stonebig](https://github.com/stonebig))
5050
- ([@testrunner123](https://github.com/testrunner123))
51+
- ([@GSPP](https://github.com/GSPP))
5152

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
3131
- Fixed `clr.GetClrType` when iterating over `System` members (#607)
3232
- Fixed `LockRecursionException` when loading assemblies (#627)
3333
- Fixed errors breaking .NET Remoting on method invoke (#276)
34+
- Fixed PyObject.GetHashCode (#676)
3435

3536

3637
## [2.3.0][] - 2017-03-11

appveyor.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ environment:
1717
matrix:
1818
- PYTHON_VERSION: 2.7
1919
BUILD_OPTS: --xplat
20-
- PYTHON_VERSION: 3.3
21-
BUILD_OPTS: --xplat
2220
- PYTHON_VERSION: 3.4
2321
BUILD_OPTS: --xplat
2422
- PYTHON_VERSION: 3.5
2523
BUILD_OPTS: --xplat
2624
- PYTHON_VERSION: 3.6
2725
BUILD_OPTS: --xplat
2826
- PYTHON_VERSION: 2.7
29-
- PYTHON_VERSION: 3.3
3027
- PYTHON_VERSION: 3.4
3128
- PYTHON_VERSION: 3.5
3229
- PYTHON_VERSION: 3.6
@@ -41,6 +38,7 @@ init:
4138
- set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
4239

4340
install:
41+
- python -m pip install -U pip
4442
- pip install --upgrade -r requirements.txt --quiet
4543

4644
# Install OpenCover. Can't put on `packages.config`, not Mono compatible

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ coverage
66
codecov
77

88
# Platform specific requirements
9-
pip; sys_platform == 'win32'
9+
# pip; sys_platform == 'win32'
1010
wheel; sys_platform == 'win32'
1111
pycparser; sys_platform != 'win32'

src/runtime/interop33.cs

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

src/runtime/moduleobject.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,14 @@ public static Assembly AddReference(string name)
395395
{
396396
assembly = AssemblyManager.LoadAssemblyFullPath(name);
397397
}
398+
if (System.IO.File.Exists(name))
399+
{
400+
var zone = System.Security.Policy.Zone.CreateFromUrl(name);
401+
if (zone.SecurityZone != System.Security.SecurityZone.MyComputer)
402+
{
403+
throw new Exception($"File is blocked (NTFS Security)");
404+
}
405+
}
398406
if (assembly == null)
399407
{
400408
throw new FileNotFoundException($"Unable to find assembly '{name}'.");

src/runtime/pyobject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ public override bool Equals(object o)
909909
/// </remarks>
910910
public override int GetHashCode()
911911
{
912-
return Runtime.PyObject_Hash(obj).ToInt32();
912+
return ((ulong)Runtime.PyObject_Hash(obj)).GetHashCode();
913913
}
914914

915915

src/runtime/runtime.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ public class Runtime
139139
#if PYTHON27
140140
internal const string _pyversion = "2.7";
141141
internal const string _pyver = "27";
142-
#elif PYTHON33
143-
internal const string _pyversion = "3.3";
144-
internal const string _pyver = "33";
145142
#elif PYTHON34
146143
internal const string _pyversion = "3.4";
147144
internal const string _pyver = "34";
@@ -155,7 +152,7 @@ public class Runtime
155152
internal const string _pyversion = "3.7";
156153
internal const string _pyver = "37";
157154
#else
158-
#error You must define one of PYTHON33 to PYTHON37 or PYTHON27
155+
#error You must define one of PYTHON34 to PYTHON37 or PYTHON27
159156
#endif
160157

161158
#if MONO_LINUX || MONO_OSX // Linux/macOS use dotted version string

0 commit comments

Comments
 (0)
X Tutup