Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ed89819

Browse files
committed
Merge remote-tracking branch 'github/master'
2 parents 61c5d99 + c05f578 commit ed89819

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4766
-453
lines changed

.github/workflows/ARM.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ jobs:
2727
2828
- name: Install dependencies
2929
run: |
30-
pip install --upgrade -r requirements.txt
31-
pip install pytest numpy # for tests
30+
pip3.8 install -r requirements.txt
31+
pip3.8 install pytest numpy # for tests
3232
3333
- name: Build and Install
3434
run: |
35-
pip install -v .
35+
pip3.8 install -v .
3636
3737
- name: Set Python DLL path (non Windows)
3838
run: |
39-
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
39+
echo PYTHONNET_PYDLL=$(python3.8 -m find_libpython) >> $GITHUB_ENV
4040
4141
- name: Embedding tests
4242
run: dotnet test --logger "console;verbosity=detailed" src/embed_tests/
4343

4444
- name: Python Tests (Mono)
45-
run: python -m pytest --runtime mono
45+
run: python3.8 -m pytest --runtime mono
4646

4747
- name: Python Tests (.NET Core)
48-
run: python -m pytest --runtime coreclr
48+
run: python3.8 -m pytest --runtime coreclr
4949

5050
- name: Python tests run from .NET
5151
run: dotnet test src/python_tests_runner/

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Documentation
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Doxygen Action
11+
uses: mattnotmitt/[email protected]
12+
with:
13+
working-directory: "doc/"
14+
15+
- name: Build Sphinx documentation
16+
run: |
17+
pip install -r doc/requirements.txt
18+
sphinx-build doc/source/ ./doc/build/html/
19+
20+
- name: Upload artifact
21+
# Automatically uploads an artifact from the './_site' directory by default
22+
uses: actions/upload-pages-artifact@v1
23+
with:
24+
path: doc/build/html/
25+
26+
deploy:
27+
if: github.ref == 'refs/heads/master'
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
pages: write
32+
id-token: write
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
needs: build
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v1

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [windows, ubuntu, macos]
19-
python: ["3.7", "3.8", "3.9", "3.10"]
19+
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
2020
platform: [x64, x86]
2121
exclude:
2222
- os: ubuntu
@@ -54,15 +54,17 @@ jobs:
5454
run: |
5555
pip install -v .
5656
57-
- name: Set Python DLL path (non Windows)
57+
- name: Set Python DLL path and PYTHONHOME (non Windows)
5858
if: ${{ matrix.os != 'windows' }}
5959
run: |
6060
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
61+
echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
6162
62-
- name: Set Python DLL path (Windows)
63+
- name: Set Python DLL path and PYTHONHOME (Windows)
6364
if: ${{ matrix.os == 'windows' }}
6465
run: |
6566
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(python -m find_libpython)"
67+
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(python -c 'import sys; print(sys.prefix)')"
6668
6769
- name: Embedding tests
6870
run: dotnet test --runtime any-${{ matrix.platform }} --logger "console;verbosity=detailed" src/embed_tests/

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@
8585
- ([@alxnull](https://github.com/alxnull))
8686
- ([@gpetrou](https://github.com/gpetrou))
8787
- Ehsan Iran-Nejad ([@eirannejad](https://github.com/eirannejad))
88+
- ([@legomanww](https://github.com/legomanww))

CHANGELOG.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,52 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
99

1010
### Added
1111

12+
### Changed
13+
14+
### Fixed
15+
16+
17+
## [3.0.3](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.3) - 2023-10-11
18+
19+
### Added
20+
21+
- Support for Python 3.12
22+
23+
### Changed
24+
25+
- Use enum name in `repr`
26+
27+
## [3.0.2](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.2) - 2023-08-29
28+
29+
### Fixed
30+
31+
- Fixed error occuring when inheriting a class containing a virtual generic method
32+
- Make a second call to `pythonnet.load` a no-op, as it was intended
33+
- Added support for multiple inheritance when inheriting from a class and/or multiple interfaces
34+
- Fixed error occuring when calling `GetBuffer` for anything other than `PyBUF.SIMPLE`
35+
- Bumped `clr_loader` dependency to incorporate patches
36+
37+
## [3.0.1](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.1) - 2022-11-03
38+
39+
### Added
40+
41+
- Support for Python 3.11
42+
43+
### Changed
44+
45+
- Allow decoders to override conversion of types derived from primitive types
46+
47+
### Fixed
48+
49+
- Fixed objects leaking when Python attached event handlers to them even if they were later removed
50+
- Fixed `PyInt` conversion to `BigInteger` and `System.String` produced incorrect result for values between 128 and 255.
51+
- Fixed implementing a generic interface with a Python class
52+
53+
54+
## [3.0.0](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.0) - 2022-09-29
55+
56+
### Added
57+
1258
- Ability to instantiate new .NET arrays using `Array[T](dim1, dim2, ...)` syntax
1359
- Python operator method will call C# operator method for supported binary and unary operators ([#1324][p1324]).
1460
- Add GetPythonThreadID and Interrupt methods in PythonEngine
@@ -134,7 +180,24 @@ There is no need to specify it.
134180
- support for .NET Framework 4.0-4.6; Mono before 5.4. Python.NET now requires .NET Standard 2.0
135181
(see [the matrix](https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support))
136182

137-
## [2.5.0][] - 2020-06-14
183+
## [2.5.2](https://github.com/pythonnet/pythonnet/releases/tag/v2.5.2) - 2021-02-05
184+
185+
Bugfix release.
186+
187+
### Fixed
188+
- Fix `object[]` parameters taking precedence when should not in overload resolution
189+
- Empty parameter names (as can be generated from F#) do not cause crashes
190+
191+
## [2.5.1](https://github.com/pythonnet/pythonnet/releases/tag/v2.5.1) - 2020-06-18
192+
193+
Bugfix release.
194+
195+
### Fixed
196+
197+
- Fix incorrect dereference of wrapper object in `tp_repr`, which may result in a program crash
198+
- Fix incorrect dereference in params array handling
199+
200+
## [2.5.0](https://github.com/pythonnet/pythonnet/releases/tag/v2.5.0) - 2020-06-14
138201

139202
This version improves performance on benchmarks significantly compared to 2.3.
140203

@@ -779,7 +842,7 @@ This version improves performance on benchmarks significantly compared to 2.3.
779842

780843
[semantic versioning]: http://semver.org/
781844

782-
[unreleased]: ../../compare/v2.3.0...HEAD
845+
[unreleased]: ../../compare/v3.0.1...HEAD
783846

784847
[2.3.0]: ../../compare/v2.2.2...v2.3.0
785848

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyProduct>Python.NET</AssemblyProduct>
77
<LangVersion>10.0</LangVersion>
88
<IsPackable>false</IsPackable>
9-
<FullVersion>$([System.IO.File]::ReadAllText("version.txt").Trim())</FullVersion>
9+
<FullVersion>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)version.txt").Trim())</FullVersion>
1010
<VersionPrefix>$(FullVersion.Split('-', 2)[0])</VersionPrefix>
1111
<VersionSuffix Condition="$(FullVersion.Contains('-'))">$(FullVersion.Split('-', 2)[1])</VersionSuffix>
1212
</PropertyGroup>

README.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ provides a powerful application scripting tool for .NET developers. It
1717
allows Python code to interact with the CLR, and may also be used to
1818
embed Python into a .NET application.
1919

20-
.. note::
21-
The master branch of this repository tracks the ongoing development of version 3.0.
22-
Backports of patches to 2.5 are tracked in the
23-
`backports-2.5 branch <https://github.com/pythonnet/pythonnet/tree/backports-2.5>`_.
24-
2520
Calling .NET code from Python
2621
-----------------------------
2722

@@ -42,6 +37,25 @@ module:
4237
clr.AddReference("System.Windows.Forms")
4338
from System.Windows.Forms import Form
4439
40+
By default, Mono will be used on Linux and macOS, .NET Framework on Windows. For
41+
details on the loading of different runtimes, please refer to the documentation.
42+
43+
.NET Core
44+
~~~~~~~~~
45+
46+
If .NET Core is installed in a default location or the ``dotnet`` CLI tool is on
47+
the ``PATH``, loading it instead of the default (Mono/.NET Framework) runtime
48+
just requires setting either the environment variable
49+
``PYTHONNET_RUNTIME=coreclr`` or calling ``pythonnet.load`` explicitly:
50+
51+
.. code-block:: python
52+
53+
from pythonnet import load
54+
load("coreclr")
55+
56+
import clr
57+
58+
4559
Embedding Python in .NET
4660
------------------------
4761

doc/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
doxygen_xml/
2+
build/

0 commit comments

Comments
 (0)