pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pythonnet/pythonnet/commit/95c1371eaccacbcb4e32ec1c8654c625cc85619a

ossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-5efd63e783ac04bb.css" /> Merge remote-tracking branch 'upstream/release' · pythonnet/pythonnet@95c1371 · GitHub
Skip to content

Commit 95c1371

Browse files
committed
Merge remote-tracking branch 'upstream/release'
2 parents 60463a3 + aae9d56 commit 95c1371

55 files changed

Lines changed: 4416 additions & 295 deletions

Some content is hidden

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

.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/doxygen-action@1.9.4
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/release'
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

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ or the DLL must be loaded in advance. This must be done before calling any other
6767
- BREAKING: disabled implicit conversion from C# enums to Python `int` and back.
6868
One must now either use enum members (e.g. `MyEnum.Option`), or use enum constructor
6969
(e.g. `MyEnum(42)` or `MyEnum(42, True)` when `MyEnum` does not have a member with value 42).
70+
- BREAKING: disabled implicit conversion from Python objects implementing sequence protocol to
71+
.NET arrays when the target .NET type is `System.Object`. The conversion is still attempted when the
72+
target type is a `System.Array`.
7073
- Sign Runtime DLL with a strong name
7174
- Implement loading through `clr_loader` instead of the included `ClrModule`, enables
7275
support for .NET Core

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($(MSBuildThisFileDirectory)version.txt))</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>

MANIFEST.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
recursive-include src/ *
1+
graft src/runtime
2+
prune src/runtime/obj
3+
prune src/runtime/bin
4+
include src/pythonnet.snk
25
include Directory.Build.*
36
include pythonnet.sln
47
include version.txt
5-
global-exclude **/obj/* **/bin/*

README.rst

Lines changed: 21 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

@@ -50,6 +64,8 @@ Embedding Python in .NET
5064
(internal, derived from ``MissingMethodException``) upon calling ``Initialize``.
5165
Typical values are ``python38.dll`` (Windows), ``libpython3.8.dylib`` (Mac),
5266
``libpython3.8.so`` (most other Unix-like operating systems).
67+
- Then call ``PythonEngine.Initialize()``. If you plan to use Python objects from
68+
multiple threads, also call ``PythonEngine.BeginAllowThreads()``.
5369
- All calls to python should be inside a
5470
``using (Py.GIL()) {/* Your code here */}`` block.
5571
- Import python modules using ``dynamic mod = Py.Import("mod")``, then

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy