| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 36bdb98 commit 6be3636
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,7 @@ dist: xenial | |||
| 2 | 2 | sudo: false | |
| 3 | 3 | language: python | |
| 4 | 4 | python: | |
| 5 | + - 3.9 | ||
| 5 | 6 | - 3.8 | |
| 6 | 7 | - 3.7 | |
| 7 | 8 | - 3.6 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,15 +15,20 @@ environment: | |||
| 15 | 15 | CODECOV_ENV: PYTHON_VERSION, PLATFORM | |
| 16 | 16 | ||
| 17 | 17 | matrix: | |
| 18 | + - PYTHON_VERSION: 3.9 | ||
| 19 | + BUILD_OPTS: --xplat | ||
| 18 | 20 | - PYTHON_VERSION: 3.8 | |
| 19 | 21 | BUILD_OPTS: --xplat | |
| 20 | 22 | - PYTHON_VERSION: 3.7 | |
| 21 | 23 | BUILD_OPTS: --xplat | |
| 22 | 24 | - PYTHON_VERSION: 3.6 | |
| 23 | 25 | BUILD_OPTS: --xplat | |
| 26 | + - PYTHON_VERSION: 3.9 | ||
| 24 | 27 | - PYTHON_VERSION: 3.8 | |
| 25 | 28 | - PYTHON_VERSION: 3.7 | |
| 26 | 29 | - PYTHON_VERSION: 3.6 | |
| 30 | + - PYTHON_VERSION: 3.9 | ||
| 31 | + PYTHONNET_SHUTDOWN_MODE: Soft | ||
| 27 | 32 | - PYTHON_VERSION: 3.8 | |
| 28 | 33 | PYTHONNET_SHUTDOWN_MODE: Soft | |
| 29 | 34 | - PYTHON_VERSION: 3.7 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,11 @@ | |||
| 1 | 1 | # Requirements for both Travis and AppVeyor | |
| 2 | - pytest==3.2.5 | ||
| 2 | + pytest | ||
| 3 | 3 | coverage | |
| 4 | 4 | psutil | |
| 5 | 5 | ||
| 6 | 6 | # Coverage upload | |
| 7 | 7 | codecov | |
| 8 | 8 | ||
| 9 | 9 | # Platform specific requirements | |
| 10 | - # pip; sys_platform == 'win32' | ||
| 11 | - wheel; sys_platform == 'win32' | ||
| 12 | - pycparser; sys_platform != 'win32' | ||
| 10 | + wheel | ||
| 11 | + pycparser | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - <?xml version="1.0" encoding="utf-8"?> | ||
| 1 | + <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | 2 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | |
| 3 | 3 | <PropertyGroup> | |
| 4 | 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
@@ -169,6 +169,7 @@ | |||
| 169 | 169 | <Compile Include="interop36.cs" /> | |
| 170 | 170 | <Compile Include="interop37.cs" /> | |
| 171 | 171 | <Compile Include="interop38.cs" /> | |
| 172 | + <Compile Include="interop39.cs" /> | ||
| 172 | 173 | </ItemGroup> | |
| 173 | 174 | <ItemGroup> | |
| 174 | 175 | <None Include="..\pythonnet.snk" /> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,227 @@ | |||
| 1 | + | ||
| 2 | + // Auto-generated by geninterop.py. | ||
| 3 | + // DO NOT MODIFY BY HAND. | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + #if PYTHON39 | ||
| 7 | + using System; | ||
| 8 | + using System.Collections; | ||
| 9 | + using System.Collections.Specialized; | ||
| 10 | + using System.Runtime.InteropServices; | ||
| 11 | + using System.Reflection; | ||
| 12 | + using System.Text; | ||
| 13 | + | ||
| 14 | + namespace Python.Runtime | ||
| 15 | + { | ||
| 16 | + | ||
| 17 | + [StructLayout(LayoutKind.Sequential)] | ||
| 18 | + internal static partial class TypeOffset | ||
| 19 | + { | ||
| 20 | + // Auto-generated from PyHeapTypeObject in Python.h | ||
| 21 | + public static int ob_refcnt = 0; | ||
| 22 | + public static int ob_type = 0; | ||
| 23 | + public static int ob_size = 0; | ||
| 24 | + public static int tp_name = 0; | ||
| 25 | + public static int tp_basicsize = 0; | ||
| 26 | + public static int tp_itemsize = 0; | ||
| 27 | + public static int tp_dealloc = 0; | ||
| 28 | + public static int tp_vectorcall_offset = 0; | ||
| 29 | + public static int tp_getattr = 0; | ||
| 30 | + public static int tp_setattr = 0; | ||
| 31 | + public static int tp_as_async = 0; | ||
| 32 | + public static int tp_repr = 0; | ||
| 33 | + public static int tp_as_number = 0; | ||
| 34 | + public static int tp_as_sequence = 0; | ||
| 35 | + public static int tp_as_mapping = 0; | ||
| 36 | + public static int tp_hash = 0; | ||
| 37 | + public static int tp_call = 0; | ||
| 38 | + public static int tp_str = 0; | ||
| 39 | + public static int tp_getattro = 0; | ||
| 40 | + public static int tp_setattro = 0; | ||
| 41 | + public static int tp_as_buffer = 0; | ||
| 42 | + public static int tp_flags = 0; | ||
| 43 | + public static int tp_doc = 0; | ||
| 44 | + public static int tp_traverse = 0; | ||
| 45 | + public static int tp_clear = 0; | ||
| 46 | + public static int tp_richcompare = 0; | ||
| 47 | + public static int tp_weaklistoffset = 0; | ||
| 48 | + public static int tp_iter = 0; | ||
| 49 | + public static int tp_iternext = 0; | ||
| 50 | + public static int tp_methods = 0; | ||
| 51 | + public static int tp_members = 0; | ||
| 52 | + public static int tp_getset = 0; | ||
| 53 | + public static int tp_base = 0; | ||
| 54 | + public static int tp_dict = 0; | ||
| 55 | + public static int tp_descr_get = 0; | ||
| 56 | + public static int tp_descr_set = 0; | ||
| 57 | + public static int tp_dictoffset = 0; | ||
| 58 | + public static int tp_init = 0; | ||
| 59 | + public static int tp_alloc = 0; | ||
| 60 | + public static int tp_new = 0; | ||
| 61 | + public static int tp_free = 0; | ||
| 62 | + public static int tp_is_gc = 0; | ||
| 63 | + public static int tp_bases = 0; | ||
| 64 | + public static int tp_mro = 0; | ||
| 65 | + public static int tp_cache = 0; | ||
| 66 | + public static int tp_subclasses = 0; | ||
| 67 | + public static int tp_weaklist = 0; | ||
| 68 | + public static int tp_del = 0; | ||
| 69 | + public static int tp_version_tag = 0; | ||
| 70 | + public static int tp_finalize = 0; | ||
| 71 | + public static int tp_vectorcall = 0; | ||
| 72 | + public static int am_await = 0; | ||
| 73 | + public static int am_aiter = 0; | ||
| 74 | + public static int am_anext = 0; | ||
| 75 | + public static int nb_add = 0; | ||
| 76 | + public static int nb_subtract = 0; | ||
| 77 | + public static int nb_multiply = 0; | ||
| 78 | + public static int nb_remainder = 0; | ||
| 79 | + public static int nb_divmod = 0; | ||
| 80 | + public static int nb_power = 0; | ||
| 81 | + public static int nb_negative = 0; | ||
| 82 | + public static int nb_positive = 0; | ||
| 83 | + public static int nb_absolute = 0; | ||
| 84 | + public static int nb_bool = 0; | ||
| 85 | + public static int nb_invert = 0; | ||
| 86 | + public static int nb_lshift = 0; | ||
| 87 | + public static int nb_rshift = 0; | ||
| 88 | + public static int nb_and = 0; | ||
| 89 | + public static int nb_xor = 0; | ||
| 90 | + public static int nb_or = 0; | ||
| 91 | + public static int nb_int = 0; | ||
| 92 | + public static int nb_reserved = 0; | ||
| 93 | + public static int nb_float = 0; | ||
| 94 | + public static int nb_inplace_add = 0; | ||
| 95 | + public static int nb_inplace_subtract = 0; | ||
| 96 | + public static int nb_inplace_multiply = 0; | ||
| 97 | + public static int nb_inplace_remainder = 0; | ||
| 98 | + public static int nb_inplace_power = 0; | ||
| 99 | + public static int nb_inplace_lshift = 0; | ||
| 100 | + public static int nb_inplace_rshift = 0; | ||
| 101 | + public static int nb_inplace_and = 0; | ||
| 102 | + public static int nb_inplace_xor = 0; | ||
| 103 | + public static int nb_inplace_or = 0; | ||
| 104 | + public static int nb_floor_divide = 0; | ||
| 105 | + public static int nb_true_divide = 0; | ||
| 106 | + public static int nb_inplace_floor_divide = 0; | ||
| 107 | + public static int nb_inplace_true_divide = 0; | ||
| 108 | + public static int nb_index = 0; | ||
| 109 | + public static int nb_matrix_multiply = 0; | ||
| 110 | + public static int nb_inplace_matrix_multiply = 0; | ||
| 111 | + public static int mp_length = 0; | ||
| 112 | + public static int mp_subscript = 0; | ||
| 113 | + public static int mp_ass_subscript = 0; | ||
| 114 | + public static int sq_length = 0; | ||
| 115 | + public static int sq_concat = 0; | ||
| 116 | + public static int sq_repeat = 0; | ||
| 117 | + public static int sq_item = 0; | ||
| 118 | + public static int was_sq_slice = 0; | ||
| 119 | + public static int sq_ass_item = 0; | ||
| 120 | + public static int was_sq_ass_slice = 0; | ||
| 121 | + public static int sq_contains = 0; | ||
| 122 | + public static int sq_inplace_concat = 0; | ||
| 123 | + public static int sq_inplace_repeat = 0; | ||
| 124 | + public static int bf_getbuffer = 0; | ||
| 125 | + public static int bf_releasebuffer = 0; | ||
| 126 | + public static int name = 0; | ||
| 127 | + public static int ht_slots = 0; | ||
| 128 | + public static int qualname = 0; | ||
| 129 | + public static int ht_cached_keys = 0; | ||
| 130 | + public static int ht_module = 0; | ||
| 131 | + | ||
| 132 | + /* here are optional user slots, followed by the members. */ | ||
| 133 | + public static int members = 0; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + [StructLayout(LayoutKind.Sequential)] | ||
| 137 | + internal struct PyNumberMethods | ||
| 138 | + { | ||
| 139 | + public IntPtr nb_add; | ||
| 140 | + public IntPtr nb_subtract; | ||
| 141 | + public IntPtr nb_multiply; | ||
| 142 | + public IntPtr nb_remainder; | ||
| 143 | + public IntPtr nb_divmod; | ||
| 144 | + public IntPtr nb_power; | ||
| 145 | + public IntPtr nb_negative; | ||
| 146 | + public IntPtr nb_positive; | ||
| 147 | + public IntPtr nb_absolute; | ||
| 148 | + public IntPtr nb_bool; | ||
| 149 | + public IntPtr nb_invert; | ||
| 150 | + public IntPtr nb_lshift; | ||
| 151 | + public IntPtr nb_rshift; | ||
| 152 | + public IntPtr nb_and; | ||
| 153 | + public IntPtr nb_xor; | ||
| 154 | + public IntPtr nb_or; | ||
| 155 | + public IntPtr nb_int; | ||
| 156 | + public IntPtr nb_reserved; | ||
| 157 | + public IntPtr nb_float; | ||
| 158 | + public IntPtr nb_inplace_add; | ||
| 159 | + public IntPtr nb_inplace_subtract; | ||
| 160 | + public IntPtr nb_inplace_multiply; | ||
| 161 | + public IntPtr nb_inplace_remainder; | ||
| 162 | + public IntPtr nb_inplace_power; | ||
| 163 | + public IntPtr nb_inplace_lshift; | ||
| 164 | + public IntPtr nb_inplace_rshift; | ||
| 165 | + public IntPtr nb_inplace_and; | ||
| 166 | + public IntPtr nb_inplace_xor; | ||
| 167 | + public IntPtr nb_inplace_or; | ||
| 168 | + public IntPtr nb_floor_divide; | ||
| 169 | + public IntPtr nb_true_divide; | ||
| 170 | + public IntPtr nb_inplace_floor_divide; | ||
| 171 | + public IntPtr nb_inplace_true_divide; | ||
| 172 | + public IntPtr nb_index; | ||
| 173 | + public IntPtr nb_matrix_multiply; | ||
| 174 | + public IntPtr nb_inplace_matrix_multiply; | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + [StructLayout(LayoutKind.Sequential)] | ||
| 178 | + internal struct PySequenceMethods | ||
| 179 | + { | ||
| 180 | + public IntPtr sq_length; | ||
| 181 | + public IntPtr sq_concat; | ||
| 182 | + public IntPtr sq_repeat; | ||
| 183 | + public IntPtr sq_item; | ||
| 184 | + public IntPtr was_sq_slice; | ||
| 185 | + public IntPtr sq_ass_item; | ||
| 186 | + public IntPtr was_sq_ass_slice; | ||
| 187 | + public IntPtr sq_contains; | ||
| 188 | + public IntPtr sq_inplace_concat; | ||
| 189 | + public IntPtr sq_inplace_repeat; | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + [StructLayout(LayoutKind.Sequential)] | ||
| 193 | + internal struct PyMappingMethods | ||
| 194 | + { | ||
| 195 | + public IntPtr mp_length; | ||
| 196 | + public IntPtr mp_subscript; | ||
| 197 | + public IntPtr mp_ass_subscript; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + [StructLayout(LayoutKind.Sequential)] | ||
| 201 | + internal struct PyAsyncMethods | ||
| 202 | + { | ||
| 203 | + public IntPtr am_await; | ||
| 204 | + public IntPtr am_aiter; | ||
| 205 | + public IntPtr am_anext; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + [StructLayout(LayoutKind.Sequential)] | ||
| 209 | + internal struct PyBufferProcs | ||
| 210 | + { | ||
| 211 | + public IntPtr bf_getbuffer; | ||
| 212 | + public IntPtr bf_releasebuffer; | ||
| 213 | + } | ||
| 214 | + | ||
| 215 | + internal static partial class SlotTypes | ||
| 216 | + { | ||
| 217 | + public static readonly Type[] Types = { | ||
| 218 | + typeof(PyNumberMethods), | ||
| 219 | + typeof(PySequenceMethods), | ||
| 220 | + typeof(PyMappingMethods), | ||
| 221 | + typeof(PyAsyncMethods), | ||
| 222 | + typeof(PyBufferProcs), | ||
| 223 | + }; | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + } | ||
| 227 | + #endif | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,8 +50,10 @@ public class Runtime | |||
| 50 | 50 | const string _minor = "7"; | |
| 51 | 51 | #elif PYTHON38 | |
| 52 | 52 | const string _minor = "8"; | |
| 53 | + #elif PYTHON39 | ||
| 54 | + const string _minor = "9"; | ||
| 53 | 55 | #else | |
| 54 | - #error You must define one of PYTHON36 to PYTHON38 | ||
| 56 | + #error You must define one of PYTHON36 to PYTHON39 | ||
| 55 | 57 | #endif | |
| 56 | 58 | ||
| 57 | 59 | #if WINDOWS | |
@@ -123,7 +125,7 @@ internal static Version PyVersion | |||
| 123 | 125 | /// <summary> | |
| 124 | 126 | /// Initialize the runtime... | |
| 125 | 127 | /// </summary> | |
| 126 | - /// <remarks>Always call this method from the Main thread. After the | ||
| 128 | + /// <remarks>Always call this method from the Main thread. After the | ||
| 127 | 129 | /// first call to this method, the main thread has acquired the GIL.</remarks> | |
| 128 | 130 | internal static void Initialize(bool initSigs = false, ShutdownMode mode = ShutdownMode.Default) | |
| 129 | 131 | { | |
@@ -406,7 +408,7 @@ internal static void Shutdown(ShutdownMode mode) | |||
| 406 | 408 | { | |
| 407 | 409 | PyEval_SaveThread(); | |
| 408 | 410 | } | |
| 409 | - | ||
| 411 | + | ||
| 410 | 412 | } | |
| 411 | 413 | else | |
| 412 | 414 | { | |
@@ -1728,7 +1730,7 @@ internal static long PyDict_Size(IntPtr pointer) | |||
| 1728 | 1730 | internal static extern int PySet_Add(IntPtr set, IntPtr key); | |
| 1729 | 1731 | ||
| 1730 | 1732 | /// <summary> | |
| 1731 | - /// Return 1 if found, 0 if not found, and -1 if an error is encountered. | ||
| 1733 | + /// Return 1 if found, 0 if not found, and -1 if an error is encountered. | ||
| 1732 | 1734 | /// </summary> | |
| 1733 | 1735 | [DllImport(_PythonDll, CallingConvention = CallingConvention.Cdecl)] | |
| 1734 | 1736 | internal static extern int PySet_Contains(IntPtr anyset, IntPtr key); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments