| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c51f524 commit 3df3324
14 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ python: | |||
| 4 | 4 | - 2.7 | |
| 5 | 5 | - 3.2 | |
| 6 | 6 | - 3.4 | |
| 7 | + - 3.5 | ||
| 7 | 8 | before_install: | |
| 8 | 9 | - sudo apt-get install software-properties-common | |
| 9 | 10 | - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,6 +13,8 @@ environment: | |||
| 13 | 13 | - PYTHON: "C:\\Python33-x64" | |
| 14 | 14 | - PYTHON: "C:\\Python34" | |
| 15 | 15 | - PYTHON: "C:\\Python34-x64" | |
| 16 | + - PYTHON: "C:\\Python35" | ||
| 17 | + - PYTHON: "C:\\Python35-x64" | ||
| 16 | 18 | ||
| 17 | 19 | install: | |
| 18 | 20 | - "%PYTHON%\\python.exe -m pip install --upgrade pip" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,7 @@ public class clrModule | |||
| 39 | 39 | // ReSharper restore CheckNamespace | |
| 40 | 40 | { | |
| 41 | 41 | // ReSharper disable InconsistentNaming | |
| 42 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 42 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 43 | 43 | [RGiesecke.DllExport.DllExport("PyInit_clr", System.Runtime.InteropServices.CallingConvention.StdCall)] | |
| 44 | 44 | public static IntPtr PyInit_clr() | |
| 45 | 45 | #else | |
@@ -107,7 +107,7 @@ public static void initclr() | |||
| 107 | 107 | #if DEBUG_PRINT | |
| 108 | 108 | System.Console.WriteLine("Could not load Python.Runtime, so sad."); | |
| 109 | 109 | #endif | |
| 110 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 110 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 111 | 111 | return IntPtr.Zero; | |
| 112 | 112 | #else | |
| 113 | 113 | return; | |
@@ -119,7 +119,7 @@ public static void initclr() | |||
| 119 | 119 | // So now we get the PythonEngine and execute the InitExt method on it. | |
| 120 | 120 | var pythonEngineType = pythonRuntime.GetType("Python.Runtime.PythonEngine"); | |
| 121 | 121 | ||
| 122 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 122 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 123 | 123 | return (IntPtr)pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null); | |
| 124 | 124 | #else | |
| 125 | 125 | pythonEngineType.InvokeMember("InitExt", System.Reflection.BindingFlags.InvokeMethod, null, null, null); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,7 +57,7 @@ public virtual IntPtr type_subscript(IntPtr idx) { | |||
| 57 | 57 | //==================================================================== | |
| 58 | 58 | // Standard comparison implementation for instances of reflected types. | |
| 59 | 59 | //==================================================================== | |
| 60 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 60 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 61 | 61 | public static IntPtr tp_richcompare(IntPtr ob, IntPtr other, int op) { | |
| 62 | 62 | if (op != Runtime.Py_EQ && op != Runtime.Py_NE) | |
| 63 | 63 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -405,7 +405,7 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 405 | 405 | return true; | |
| 406 | 406 | ||
| 407 | 407 | case TypeCode.Int32: | |
| 408 | - #if !(PYTHON32 || PYTHON33 || PYTHON34) | ||
| 408 | + #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 409 | 409 | // Trickery to support 64-bit platforms. | |
| 410 | 410 | if (IntPtr.Size == 4) { | |
| 411 | 411 | op = Runtime.PyNumber_Int(value); | |
@@ -457,7 +457,7 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 457 | 457 | return true; | |
| 458 | 458 | ||
| 459 | 459 | case TypeCode.Byte: | |
| 460 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 460 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 461 | 461 | if (Runtime.PyObject_TypeCheck(value, Runtime.PyBytesType)) | |
| 462 | 462 | { | |
| 463 | 463 | if (Runtime.PyBytes_Size(value) == 1) | |
@@ -497,7 +497,7 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 497 | 497 | return true; | |
| 498 | 498 | ||
| 499 | 499 | case TypeCode.SByte: | |
| 500 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 500 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 501 | 501 | if (Runtime.PyObject_TypeCheck(value, Runtime.PyBytesType)) { | |
| 502 | 502 | if (Runtime.PyBytes_Size(value) == 1) { | |
| 503 | 503 | op = Runtime.PyBytes_AS_STRING(value); | |
@@ -535,7 +535,7 @@ static bool ToPrimitive(IntPtr value, Type obType, out Object result, | |||
| 535 | 535 | return true; | |
| 536 | 536 | ||
| 537 | 537 | case TypeCode.Char: | |
| 538 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 538 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 539 | 539 | if (Runtime.PyObject_TypeCheck(value, Runtime.PyBytesType)) { | |
| 540 | 540 | if (Runtime.PyBytes_Size(value) == 1) { | |
| 541 | 541 | op = Runtime.PyBytes_AS_STRING(value); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,7 +103,7 @@ public static IntPtr tp_call(IntPtr ob, IntPtr args, IntPtr kw) { | |||
| 103 | 103 | //==================================================================== | |
| 104 | 104 | // Implements __cmp__ for reflected delegate types. | |
| 105 | 105 | //==================================================================== | |
| 106 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 106 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 107 | 107 | public static new IntPtr tp_richcompare(IntPtr ob, IntPtr other, int op) { | |
| 108 | 108 | if (op != Runtime.Py_EQ && op != Runtime.Py_NE) | |
| 109 | 109 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ internal class ExceptionClassObject : ClassObject { | |||
| 31 | 31 | internal ExceptionClassObject(Type tp) : base(tp) { | |
| 32 | 32 | } | |
| 33 | 33 | ||
| 34 | - #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 34 | + #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 35 | 35 | internal static Exception ToException(IntPtr ob) { | |
| 36 | 36 | CLRObject co = GetManagedObject(ob) as CLRObject; | |
| 37 | 37 | if (co == null) { | |
@@ -114,7 +114,7 @@ public static IntPtr tp_getattro(IntPtr ob, IntPtr key) | |||
| 114 | 114 | ||
| 115 | 115 | return Runtime.PyObject_GenericGetAttr(ob, key); | |
| 116 | 116 | } | |
| 117 | - #endif // (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 117 | + #endif // (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 118 | 118 | } | |
| 119 | 119 | ||
| 120 | 120 | /// <summary> | |
@@ -136,7 +136,7 @@ private Exceptions() {} | |||
| 136 | 136 | //=================================================================== | |
| 137 | 137 | ||
| 138 | 138 | internal static void Initialize() { | |
| 139 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 139 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 140 | 140 | exceptions_module = Runtime.PyImport_ImportModule("builtins"); | |
| 141 | 141 | #else | |
| 142 | 142 | exceptions_module = Runtime.PyImport_ImportModule("exceptions"); | |
@@ -572,15 +572,15 @@ internal static IntPtr RaiseTypeError(string message) { | |||
| 572 | 572 | puplic static variables on the Exceptions class filled in from | |
| 573 | 573 | the python class using reflection in Initialize() looked up by | |
| 574 | 574 | name, not posistion. */ | |
| 575 | - #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 575 | + #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 576 | 576 | public static IntPtr BaseException; | |
| 577 | 577 | #endif | |
| 578 | 578 | public static IntPtr Exception; | |
| 579 | 579 | public static IntPtr StopIteration; | |
| 580 | - #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 580 | + #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 581 | 581 | public static IntPtr GeneratorExit; | |
| 582 | 582 | #endif | |
| 583 | - #if !(PYTHON32 || PYTHON33 || PYTHON34) | ||
| 583 | + #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 584 | 584 | public static IntPtr StandardError; | |
| 585 | 585 | #endif | |
| 586 | 586 | public static IntPtr ArithmeticError; | |
@@ -637,7 +637,7 @@ puplic static variables on the Exceptions class filled in from | |||
| 637 | 637 | public static IntPtr SyntaxWarning; | |
| 638 | 638 | public static IntPtr RuntimeWarning; | |
| 639 | 639 | public static IntPtr FutureWarning; | |
| 640 | - #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 640 | + #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 641 | 641 | public static IntPtr ImportWarning; | |
| 642 | 642 | public static IntPtr UnicodeWarning; | |
| 643 | 643 | //PyAPI_DATA(PyObject *) PyExc_BytesWarning; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ internal class ImportHook { | |||
| 23 | 23 | static CLRModule root; | |
| 24 | 24 | static MethodWrapper hook; | |
| 25 | 25 | ||
| 26 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 26 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 27 | 27 | static IntPtr py_clr_module; | |
| 28 | 28 | static IntPtr module_def; | |
| 29 | 29 | #endif | |
@@ -38,7 +38,7 @@ internal static void Initialize() { | |||
| 38 | 38 | // but it provides the most "Pythonic" way of dealing with CLR | |
| 39 | 39 | // modules (Python doesn't provide a way to emulate packages). | |
| 40 | 40 | IntPtr dict = Runtime.PyImport_GetModuleDict(); | |
| 41 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 41 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 42 | 42 | IntPtr mod = Runtime.PyImport_ImportModule("builtins"); | |
| 43 | 43 | py_import = Runtime.PyObject_GetAttrString(mod, "__import__"); | |
| 44 | 44 | #else | |
@@ -51,7 +51,7 @@ internal static void Initialize() { | |||
| 51 | 51 | ||
| 52 | 52 | root = new CLRModule(); | |
| 53 | 53 | ||
| 54 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 54 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 55 | 55 | // create a python module with the same methods as the clr module-like object | |
| 56 | 56 | module_def = ModuleDefOffset.AllocModuleDef("clr"); | |
| 57 | 57 | py_clr_module = Runtime.PyModule_Create2(module_def, 3); | |
@@ -78,7 +78,7 @@ internal static void Initialize() { | |||
| 78 | 78 | //=================================================================== | |
| 79 | 79 | ||
| 80 | 80 | internal static void Shutdown() { | |
| 81 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 81 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 82 | 82 | if (0 != Runtime.Py_IsInitialized()) { | |
| 83 | 83 | Runtime.Decref(py_clr_module); | |
| 84 | 84 | Runtime.Decref(root.pyHandle); | |
@@ -100,7 +100,7 @@ internal static void Shutdown() { | |||
| 100 | 100 | //=================================================================== | |
| 101 | 101 | public static IntPtr GetCLRModule(IntPtr? fromList=null) { | |
| 102 | 102 | root.InitializePreload(); | |
| 103 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 103 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 104 | 104 | // update the module dictionary with the contents of the root dictionary | |
| 105 | 105 | root.LoadNames(); | |
| 106 | 106 | IntPtr py_mod_dict = Runtime.PyModule_GetDict(py_clr_module); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -79,7 +79,7 @@ static ObjectOffset() { | |||
| 79 | 79 | } | |
| 80 | 80 | ||
| 81 | 81 | public static int magic(IntPtr ob) { | |
| 82 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 82 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 83 | 83 | if ((Runtime.PyObject_TypeCheck(ob, Exceptions.BaseException) || | |
| 84 | 84 | (Runtime.PyType_Check(ob) && Runtime.PyType_IsSubtype(ob, Exceptions.BaseException)))) | |
| 85 | 85 | { | |
@@ -91,7 +91,7 @@ public static int magic(IntPtr ob) { | |||
| 91 | 91 | ||
| 92 | 92 | public static int DictOffset(IntPtr ob) | |
| 93 | 93 | { | |
| 94 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 94 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 95 | 95 | if ((Runtime.PyObject_TypeCheck(ob, Exceptions.BaseException) || | |
| 96 | 96 | (Runtime.PyType_Check(ob) && Runtime.PyType_IsSubtype(ob, Exceptions.BaseException)))) | |
| 97 | 97 | { | |
@@ -102,7 +102,7 @@ public static int DictOffset(IntPtr ob) | |||
| 102 | 102 | } | |
| 103 | 103 | ||
| 104 | 104 | public static int Size(IntPtr ob) { | |
| 105 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 105 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 106 | 106 | if ((Runtime.PyObject_TypeCheck(ob, Exceptions.BaseException) || | |
| 107 | 107 | (Runtime.PyType_Check(ob) && Runtime.PyType_IsSubtype(ob, Exceptions.BaseException)))) | |
| 108 | 108 | { | |
@@ -126,7 +126,7 @@ public static int Size(IntPtr ob) { | |||
| 126 | 126 | private static int ob_data; | |
| 127 | 127 | } | |
| 128 | 128 | ||
| 129 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 129 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 130 | 130 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | |
| 131 | 131 | internal class ExceptionOffset | |
| 132 | 132 | { | |
@@ -161,7 +161,7 @@ public static int Size() | |||
| 161 | 161 | #endif | |
| 162 | 162 | ||
| 163 | 163 | ||
| 164 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 164 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 165 | 165 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] | |
| 166 | 166 | internal class BytesOffset | |
| 167 | 167 | { | |
@@ -281,10 +281,10 @@ internal class TypeFlags { | |||
| 281 | 281 | /* XXX Reusing reserved constants */ | |
| 282 | 282 | public static int Managed = (1 << 15); // PythonNet specific | |
| 283 | 283 | public static int Subclass = (1 << 16); // PythonNet specific | |
| 284 | - #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 284 | + #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 285 | 285 | public static int HaveIndex = (1 << 17); | |
| 286 | 286 | #endif | |
| 287 | - #if (PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 287 | + #if (PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 288 | 288 | /* Objects support nb_index in PyNumberMethods */ | |
| 289 | 289 | public static int HaveVersionTag = (1 << 18); | |
| 290 | 290 | public static int ValidVersionTag = (1 << 19); | |
@@ -320,7 +320,7 @@ internal class TypeFlags { | |||
| 320 | 320 | #endif | |
| 321 | 321 | ||
| 322 | 322 | // Default flags for Python 3 | |
| 323 | - #if (PYTHON32 || PYTHON33 || PYTHON34) | ||
| 323 | + #if (PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 324 | 324 | public static int Default = ( | |
| 325 | 325 | HaveStacklessExtension | | |
| 326 | 326 | HaveVersionTag); | |
@@ -383,7 +383,7 @@ static Interop() { | |||
| 383 | 383 | pmap["nb_add"] = p["BinaryFunc"]; | |
| 384 | 384 | pmap["nb_subtract"] = p["BinaryFunc"]; | |
| 385 | 385 | pmap["nb_multiply"] = p["BinaryFunc"]; | |
| 386 | - #if !(PYTHON32 || PYTHON33 || PYTHON34) | ||
| 386 | + #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 387 | 387 | pmap["nb_divide"] = p["BinaryFunc"]; | |
| 388 | 388 | #endif | |
| 389 | 389 | pmap["nb_remainder"] = p["BinaryFunc"]; | |
@@ -408,7 +408,7 @@ static Interop() { | |||
| 408 | 408 | pmap["nb_inplace_add"] = p["BinaryFunc"]; | |
| 409 | 409 | pmap["nb_inplace_subtract"] = p["BinaryFunc"]; | |
| 410 | 410 | pmap["nb_inplace_multiply"] = p["BinaryFunc"]; | |
| 411 | - #if !(PYTHON32 || PYTHON33 || PYTHON34) | ||
| 411 | + #if !(PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 412 | 412 | pmap["nb_inplace_divide"] = p["BinaryFunc"]; | |
| 413 | 413 | #endif | |
| 414 | 414 | pmap["nb_inplace_remainder"] = p["BinaryFunc"]; | |
@@ -422,7 +422,7 @@ static Interop() { | |||
| 422 | 422 | pmap["nb_true_divide"] = p["BinaryFunc"]; | |
| 423 | 423 | pmap["nb_inplace_floor_divide"] = p["BinaryFunc"]; | |
| 424 | 424 | pmap["nb_inplace_true_divide"] = p["BinaryFunc"]; | |
| 425 | - #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34) | ||
| 425 | + #if (PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35) | ||
| 426 | 426 | pmap["nb_index"] = p["UnaryFunc"]; | |
| 427 | 427 | #endif | |
| 428 | 428 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments