| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,6 +34,10 @@ csharp_new_line_before_finally = true | |||
| 34 | 34 | [*.sln] | |
| 35 | 35 | indent_style = tab | |
| 36 | 36 | ||
| 37 | + [*.csproj] | ||
| 38 | + charset = utf-8 | ||
| 39 | + insert_final_newline = true | ||
| 40 | + | ||
| 37 | 41 | # bumpversion reformats itself after every bump | |
| 38 | 42 | [.bumpversion.cfg] | |
| 39 | 43 | trim_trailing_whitespace = false | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | - Pythonnet version: | |
| 4 | 4 | - Python version: | |
| 5 | 5 | - Operating System: | |
| 6 | + - .NET Runtime: | ||
| 6 | 7 | ||
| 7 | 8 | ### Details | |
| 8 | 9 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,77 @@ | |||
| 1 | + name: GitHub Actions | ||
| 2 | + | ||
| 3 | + on: [ pull_request, push ] | ||
| 4 | + | ||
| 5 | + jobs: | ||
| 6 | + build-test: | ||
| 7 | + name: Build and Test | ||
| 8 | + runs-on: ${{ matrix.os }}-latest | ||
| 9 | + timeout-minutes: 5 | ||
| 10 | + | ||
| 11 | + strategy: | ||
| 12 | + fail-fast: false | ||
| 13 | + matrix: | ||
| 14 | + os: [windows, ubuntu, macos] | ||
| 15 | + python: ["3.6", "3.7", "3.8", "3.9"] | ||
| 16 | + platform: [x64] | ||
| 17 | + shutdown_mode: [Normal, Soft] | ||
| 18 | + | ||
| 19 | + env: | ||
| 20 | + PYTHONNET_SHUTDOWN_MODE: ${{ matrix.SHUTDOWN_MODE }} | ||
| 21 | + | ||
| 22 | + steps: | ||
| 23 | + - name: Set Environment on macOS | ||
| 24 | + uses: maxim-lobanov/setup-xamarin@v1 | ||
| 25 | + if: ${{ matrix.os == 'macos' }} | ||
| 26 | + with: | ||
| 27 | + mono-version: latest | ||
| 28 | + | ||
| 29 | + - name: Checkout code | ||
| 30 | + uses: actions/checkout@v2 | ||
| 31 | + | ||
| 32 | + - name: Setup .NET | ||
| 33 | + uses: actions/setup-dotnet@v1 | ||
| 34 | + | ||
| 35 | + - name: Set up Python ${{ matrix.python }} | ||
| 36 | + uses: actions/setup-python@v2 | ||
| 37 | + with: | ||
| 38 | + python-version: ${{ matrix.python }} | ||
| 39 | + architecture: ${{ matrix.platform }} | ||
| 40 | + | ||
| 41 | + - name: Install dependencies | ||
| 42 | + run: | | ||
| 43 | + pip install --upgrade -r requirements.txt | ||
| 44 | + | ||
| 45 | + - name: Build and Install | ||
| 46 | + run: | | ||
| 47 | + pip install -v . | ||
| 48 | + | ||
| 49 | + - name: Set Python DLL path (non Windows) | ||
| 50 | + if: ${{ matrix.os != 'windows' }} | ||
| 51 | + run: | | ||
| 52 | + python -m pythonnet.find_libpython --export >> $GITHUB_ENV | ||
| 53 | + | ||
| 54 | + - name: Set Python DLL path (Windows) | ||
| 55 | + if: ${{ matrix.os == 'windows' }} | ||
| 56 | + run: | | ||
| 57 | + python -m pythonnet.find_libpython --export | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
| 58 | + | ||
| 59 | + - name: Python Tests (Mono) | ||
| 60 | + if: ${{ matrix.os != 'windows' }} | ||
| 61 | + run: pytest --runtime mono | ||
| 62 | + | ||
| 63 | + - name: Python Tests (.NET Core) | ||
| 64 | + run: pytest --runtime netcore | ||
| 65 | + | ||
| 66 | + - name: Python Tests (.NET Framework) | ||
| 67 | + if: ${{ matrix.os == 'windows' }} | ||
| 68 | + run: pytest --runtime netfx | ||
| 69 | + | ||
| 70 | + - name: Embedding tests | ||
| 71 | + run: dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/ | ||
| 72 | + | ||
| 73 | + - name: Python tests run from .NET | ||
| 74 | + run: dotnet test --runtime any-${{ matrix.platform }} src/python_tests_runner/ | ||
| 75 | + | ||
| 76 | + # TODO: Run perf tests | ||
| 77 | + # TODO: Run mono tests on Windows? | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,60 @@ | |||
| 1 | + name: NuGet Preview Release | ||
| 2 | + | ||
| 3 | + on: | ||
| 4 | + schedule: | ||
| 5 | + - cron: "5 4 3 */1 *" # once a month, at 4:05 on 3rd | ||
| 6 | + workflow_dispatch: | ||
| 7 | + | ||
| 8 | + jobs: | ||
| 9 | + release: | ||
| 10 | + name: Release Preview | ||
| 11 | + runs-on: ubuntu-latest | ||
| 12 | + environment: NuGet | ||
| 13 | + timeout-minutes: 10 | ||
| 14 | + | ||
| 15 | + env: | ||
| 16 | + PYTHONNET_SHUTDOWN_MODE: Normal | ||
| 17 | + | ||
| 18 | + steps: | ||
| 19 | + - name: Get Date | ||
| 20 | + run: | | ||
| 21 | + echo "DATE_VER=$(date "+%Y-%m-%d")" >> $GITHUB_ENV | ||
| 22 | + | ||
| 23 | + - name: Checkout code | ||
| 24 | + uses: actions/checkout@v2 | ||
| 25 | + | ||
| 26 | + - name: Setup .NET | ||
| 27 | + uses: actions/setup-dotnet@v1 | ||
| 28 | + | ||
| 29 | + - name: Set up Python 3.8 | ||
| 30 | + uses: actions/setup-python@v2 | ||
| 31 | + with: | ||
| 32 | + python-version: 3.8 | ||
| 33 | + architecture: x64 | ||
| 34 | + | ||
| 35 | + - name: Install dependencies | ||
| 36 | + run: | | ||
| 37 | + pip install --upgrade -r requirements.txt | ||
| 38 | + | ||
| 39 | + - name: Build and Install | ||
| 40 | + run: | | ||
| 41 | + pip install -v . | ||
| 42 | + | ||
| 43 | + - name: Python Tests | ||
| 44 | + run: pytest | ||
| 45 | + env: | ||
| 46 | + PYTHONNET_PYDLL: libpython3.8.so | ||
| 47 | + | ||
| 48 | + - name: Embedding tests | ||
| 49 | + run: dotnet test --runtime any-ubuntu src/embed_tests/ | ||
| 50 | + env: | ||
| 51 | + PYTHONNET_PYDLL: libpython3.8.so | ||
| 52 | + | ||
| 53 | + - name: Pack | ||
| 54 | + run: dotnet pack --configuration Release --version-suffix preview${{env.DATE_VER}} --output "Release-Preview" | ||
| 55 | + | ||
| 56 | + - name: Publish NuGet | ||
| 57 | + run: dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_MONTHLY }} Release-Preview/*.nupkg | ||
| 58 | + | ||
| 59 | + # TODO: Run perf tests | ||
| 60 | + # TODO: Run mono tests on Windows? | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,10 @@ | |||
| 1 | + /src/runtime/interopNative.cs | ||
| 2 | + | ||
| 1 | 3 | # General binaries and Build results | |
| 2 | 4 | *.dll | |
| 3 | 5 | *.exe | |
| 4 | 6 | *.pdb | |
| 7 | + *.deps.json | ||
| 5 | 8 | ||
| 6 | 9 | ### JetBrains ### | |
| 7 | 10 | .idea/ | |
@@ -15,6 +18,7 @@ __pycache__/ | |||
| 15 | 18 | build/ | |
| 16 | 19 | dist/ | |
| 17 | 20 | *.egg-info/ | |
| 21 | + .eggs/ | ||
| 18 | 22 | ||
| 19 | 23 | # Unit test / coverage reports | |
| 20 | 24 | htmlcov/ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,19 +20,23 @@ | |||
| 20 | 20 | - Alexandre Catarino([@AlexCatarino](https://github.com/AlexCatarino)) | |
| 21 | 21 | - Andrey Sant'Anna ([@andreydani](https://github.com/andreydani)) | |
| 22 | 22 | - Arvid JB ([@ArvidJB](https://github.com/ArvidJB)) | |
| 23 | + - Avinash Maddikonda ([@SFM61319](https://github.com/SFM61319)) | ||
| 23 | 24 | - Benoît Hudson ([@benoithudson](https://github.com/benoithudson)) | |
| 24 | 25 | - Bradley Friedman ([@leith-bartrich](https://github.com/leith-bartrich)) | |
| 25 | 26 | - Callum Noble ([@callumnoble](https://github.com/callumnoble)) | |
| 27 | + - Christabella Irwanto([@christabella](https://github.com/christabella)) | ||
| 26 | 28 | - Christian Heimes ([@tiran](https://github.com/tiran)) | |
| 27 | 29 | - Christoph Gohlke ([@cgohlke](https://github.com/cgohlke)) | |
| 28 | 30 | - Christopher Bremner ([@chrisjbremner](https://github.com/chrisjbremner)) | |
| 29 | 31 | - Christopher Pow ([@christopherpow](https://github.com/christopherpow)) | |
| 32 | + - Daniel Abrahamsson ([@danabr](https://github.com/danabr)) | ||
| 30 | 33 | - Daniel Fernandez ([@fdanny](https://github.com/fdanny)) | |
| 31 | 34 | - Daniel Santana ([@dgsantana](https://github.com/dgsantana)) | |
| 32 | 35 | - Dave Hirschfeld ([@dhirschfeld](https://github.com/dhirschfeld)) | |
| 33 | 36 | - David Lassonde ([@lassond](https://github.com/lassond)) | |
| 34 | 37 | - David Lechner ([@dlech](https://github.com/dlech)) | |
| 35 | 38 | - Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse)) | |
| 39 | + - Félix Bourbonnais ([@BadSingleton](https://github.com/BadSingleton)) | ||
| 36 | 40 | - Florian Treurniet ([@ftreurni](https://github.com/ftreurni)) | |
| 37 | 41 | - He-chien Tsai ([@t3476](https://github.com/t3476)) | |
| 38 | 42 | - Inna Wiesel ([@inna-w](https://github.com/inna-w)) | |
@@ -57,21 +61,25 @@ | |||
| 57 | 61 | - Sean Freitag ([@cowboygneox](https://github.com/cowboygneox)) | |
| 58 | 62 | - Serge Weinstock ([@sweinst](https://github.com/sweinst)) | |
| 59 | 63 | - Simon Mourier ([@smourier](https://github.com/smourier)) | |
| 64 | + - Tom Minka ([@tminka](https://github.com/tminka)) | ||
| 60 | 65 | - Viktoria Kovescses ([@vkovec](https://github.com/vkovec)) | |
| 61 | 66 | - Ville M. Vainio ([@vivainio](https://github.com/vivainio)) | |
| 62 | 67 | - Virgil Dupras ([@hsoft](https://github.com/hsoft)) | |
| 63 | 68 | - Wenguang Yang ([@yagweb](https://github.com/yagweb)) | |
| 64 | - - William Sardar ([@williamsardar])(https://github.com/williamsardar) | ||
| 69 | + - William Sardar ([@williamsardar](https://github.com/williamsardar)) | ||
| 65 | 70 | - Xavier Dupré ([@sdpython](https://github.com/sdpython)) | |
| 66 | 71 | - Zane Purvis ([@zanedp](https://github.com/zanedp)) | |
| 72 | + - ([@amos402](https://github.com/amos402)) | ||
| 67 | 73 | - ([@bltribble](https://github.com/bltribble)) | |
| 68 | 74 | - ([@civilx64](https://github.com/civilx64)) | |
| 69 | 75 | - ([@GSPP](https://github.com/GSPP)) | |
| 70 | 76 | - ([@omnicognate](https://github.com/omnicognate)) | |
| 71 | 77 | - ([@OneBlue](https://github.com/OneBlue)) | |
| 72 | 78 | - ([@rico-chet](https://github.com/rico-chet)) | |
| 73 | 79 | - ([@rmadsen-ks](https://github.com/rmadsen-ks)) | |
| 80 | + - ([@SnGmng](https://github.com/SnGmng)) | ||
| 74 | 81 | - ([@stonebig](https://github.com/stonebig)) | |
| 75 | 82 | - ([@testrunner123](https://github.com/testrunner123)) | |
| 76 | 83 | - ([@DanBarzilian](https://github.com/DanBarzilian)) | |
| 77 | - | ||
| 84 | + - ([@alxnull](https://github.com/alxnull)) | ||
| 85 | + - ([@gpetrou](https://github.com/gpetrou)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,16 +9,73 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. | |||
| 9 | 9 | ||
| 10 | 10 | ### Added | |
| 11 | 11 | ||
| 12 | + - Ability to instantiate new .NET arrays using `Array[T](dim1, dim2, ...)` syntax | ||
| 13 | + - Python operator method will call C# operator method for supported binary and unary operators ([#1324][p1324]). | ||
| 14 | + - Add GetPythonThreadID and Interrupt methods in PythonEngine | ||
| 15 | + - Ability to implement delegates with `ref` and `out` parameters in Python, by returning the modified parameter values in a tuple. ([#1355][i1355]) | ||
| 16 | + - `PyType` - a wrapper for Python type objects, that also permits creating new heap types from `TypeSpec` | ||
| 12 | 17 | - Improved exception handling: | |
| 13 | 18 | - exceptions can now be converted with codecs | |
| 14 | 19 | - `InnerException` and `__cause__` are propagated properly | |
| 15 | - - .NET and Python exceptions are preserved when crossing Python/.NET boundary | ||
| 16 | 20 | ||
| 17 | 21 | ### Changed | |
| 22 | + - Drop support for Python 2, 3.4, and 3.5 | ||
| 23 | + - `wchar_t` size aka `Runtime.UCS` is now determined at runtime | ||
| 24 | + - `clr.AddReference` may now throw errors besides `FileNotFoundException`, that provide more | ||
| 25 | + details about the cause of the failure | ||
| 26 | + - `clr.AddReference` no longer adds ".dll" implicitly | ||
| 27 | + - `PyIter(PyObject)` constructor replaced with static `PyIter.GetIter(PyObject)` method | ||
| 28 | + - BREAKING: Return values from .NET methods that return an interface are now automatically | ||
| 29 | + wrapped in that interface. This is a breaking change for users that rely on being | ||
| 30 | + able to access members that are part of the implementation class, but not the | ||
| 31 | + interface. Use the new __implementation__ or __raw_implementation__ properties to | ||
| 32 | + if you need to "downcast" to the implementation class. | ||
| 33 | + - BREAKING: Parameters marked with `ParameterAttributes.Out` are no longer returned in addition | ||
| 34 | + to the regular method return value (unless they are passed with `ref` or `out` keyword). | ||
| 35 | + - BREAKING: Drop support for the long-deprecated CLR.* prefix. | ||
| 36 | + - `PyObject` now implements `IEnumerable<PyObject>` in addition to `IEnumerable` | ||
| 37 | + - floating point values passed from Python are no longer silently truncated | ||
| 38 | + when .NET expects an integer [#1342][i1342] | ||
| 39 | + - More specific error messages for method argument mismatch | ||
| 40 | + - BREAKING: Methods with `ref` or `out` parameters and void return type return a tuple of only the `ref` and `out` parameters. | ||
| 41 | + - BREAKING: to call Python from .NET `Runtime.PythonDLL` property must be set to Python DLL name | ||
| 42 | + or the DLL must be loaded in advance. This must be done before calling any other Python.NET functions. | ||
| 43 | + - BREAKING: `PyObject.Length()` now raises a `PythonException` when object does not support a concept of length. | ||
| 44 | + - BREAKING: disabled implicit conversion from C# enums to Python `int` and back. | ||
| 45 | + One must now either use enum members (e.g. `MyEnum.Option`), or use enum constructor | ||
| 46 | + (e.g. `MyEnum(42)` or `MyEnum(42, True)` when `MyEnum` does not have a member with value 42). | ||
| 47 | + - Sign Runtime DLL with a strong name | ||
| 48 | + - Implement loading through `clr_loader` instead of the included `ClrModule`, enables | ||
| 49 | + support for .NET Core | ||
| 50 | + - .NET and Python exceptions are preserved when crossing Python/.NET boundary | ||
| 51 | + - BREAKING: custom encoders are no longer called for instances of `System.Type` | ||
| 18 | 52 | ||
| 19 | 53 | ### Fixed | |
| 20 | 54 | ||
| 21 | - - Fix incorrect dereference of wrapper object in tp_repr, which may result in a program crash | ||
| 55 | + - Fix incorrect dereference of wrapper object in `tp_repr`, which may result in a program crash | ||
| 56 | + - Fix incorrect dereference in params array handling | ||
| 57 | + - Fixes issue with function resolution when calling overloaded function with keyword arguments from python ([#1097][i1097]) | ||
| 58 | + - Fix `object[]` parameters taking precedence when should not in overload resolution | ||
| 59 | + - Fixed a bug where all .NET class instances were considered Iterable | ||
| 60 | + - Fix incorrect choice of method to invoke when using keyword arguments. | ||
| 61 | + - Fix non-delegate types incorrectly appearing as callable. | ||
| 62 | + - Indexers can now be used with interface objects | ||
| 63 | + - Fixed a bug where indexers could not be used if they were inherited | ||
| 64 | + - Made it possible to use `__len__` also on `ICollection<>` interface objects | ||
| 65 | + - Fixed issue when calling PythonException.Format where another exception would be raise for unnormalized exceptions | ||
| 66 | + - Made it possible to call `ToString`, `GetHashCode`, and `GetType` on inteface objects | ||
| 67 | + - Fixed objects returned by enumerating `PyObject` being disposed too soon | ||
| 68 | + - Incorrectly using a non-generic type with type parameters now produces a helpful Python error instead of throwing NullReferenceException | ||
| 69 | + - `import` may now raise errors with more detail than "No module named X" | ||
| 70 | + - Exception stacktraces on `PythonException.StackTrace` are now properly formatted | ||
| 71 | + - Providing an invalid type parameter to a generic type or method produces a helpful Python error | ||
| 72 | + - Empty parameter names (as can be generated from F#) do not cause crashes | ||
| 73 | + | ||
| 74 | + ### Removed | ||
| 75 | + | ||
| 76 | + - implicit assembly loading (you have to explicitly `clr.AddReference` before doing import) | ||
| 77 | + - support for .NET Framework 4.0-4.6; Mono before 5.4. Python.NET now requires .NET Standard 2.0 | ||
| 78 | + (see [the matrix](https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support)) | ||
| 22 | 79 | ||
| 23 | 80 | ## [2.5.0][] - 2020-06-14 | |
| 24 | 81 | ||
@@ -38,6 +95,7 @@ This version improves performance on benchmarks significantly compared to 2.3. | |||
| 38 | 95 | - Support for Python 3.8 | |
| 39 | 96 | - Codecs as the designated way to handle automatic conversions between | |
| 40 | 97 | .NET and Python types | |
| 98 | + - Added Python 3 buffer api support and PyBuffer interface for fast byte and numpy array read/write ([#980][p980]) | ||
| 41 | 99 | ||
| 42 | 100 | ### Changed | |
| 43 | 101 | ||
@@ -100,6 +158,7 @@ This version improves performance on benchmarks significantly compared to 2.3. | |||
| 100 | 158 | - PythonEngine.Intialize will now call `Py_InitializeEx` with a default value of 0, so signals will not be configured by default on embedding. This is different from the previous behaviour, where `Py_Initialize` was called instead, which sets initSigs to 1. ([#449][i449]) | |
| 101 | 159 | - Refactored MethodBinder.Bind in preparation to make it extensible (#829) | |
| 102 | 160 | - Look for installed Windows 10 sdk's during installation instead of relying on specific versions. | |
| 161 | + - Remove `LoadLibrary` call. ([#880][p880]) | ||
| 103 | 162 | ||
| 104 | 163 | ### Fixed | |
| 105 | 164 | ||
@@ -776,3 +835,4 @@ This version improves performance on benchmarks significantly compared to 2.3. | |||
| 776 | 835 | [i755]: https://github.com/pythonnet/pythonnet/pull/755 | |
| 777 | 836 | [p534]: https://github.com/pythonnet/pythonnet/pull/534 | |
| 778 | 837 | [i449]: https://github.com/pythonnet/pythonnet/issues/449 | |
| 838 | + [i1342]: https://github.com/pythonnet/pythonnet/issues/1342 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments