FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[pull] master from pythonnet:master by pull[bot] · Pull Request #65 · ehtick/pythonnet · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .lock  (1) .md  (1) .rst  (3) .toml  (1) .txt  (1) All 5 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 15 additions & 0 deletions CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,25 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].

### Added

- Support for Python 3.15 (#2729)
- Support for free-threaded Python 3.14 (`Py_GIL_DISABLED`) (#2721)
- Threading documentation covering GIL ownership, managed threads, and
free-threaded Python (#2721)

### Changed

- Raise the minimum supported Python version from 3.10 to 3.11 (#2729)
- Make runtime caches and CLR type binding safe for concurrent access (#2721)
- Migrate the Visual Studio solution to the `.slnx` format (#2733)
- Update GitHub Actions dependencies (#2739)

### Fixed

- Fix races in finalization, buffer disposal, assembly path updates, and
Python subclass creation (#2721)
- Fix method binding initialization when methods are first accessed (#2721)
- Fix wheel and NuGet preview package builds

## 3.1.0 - 2026-05-23

### Added
Expand Down
5 changes: 3 additions & 2 deletions doc/source/index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ speeds for Python code. If you are interested in a pure managed-code
implementation of the Python language, you should check out the
`IronPython`_ project.

Python.NET is currently compatible and tested with Python releases from 3.7
onwards.
Python.NET is currently compatible and tested with Python releases 3.11
through 3.15. Free-threaded CPython is supported starting with Python 3.14;
see :doc:`threading` for the threading and GIL guidance.

Current releases are available on `PyPi <https://pypi.org/project/pythonnet/>`_
and `Nuget.org <https://nuget.org/packages/pythonnet>`_.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/python.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ Python idioms:
name = item.GetName()

Using Context Managers (IDisposable)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.NET types that implement ``IDisposable`` can be used with Python's context manager
protocol using the standard ``with`` statement. This automatically calls the object's
Expand Down
11 changes: 7 additions & 4 deletions doc/source/threading.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Threading

This page explains how Python.NET interacts with the Python Global Interpreter
Lock (GIL) and with managed threads, and what guarantees the runtime makes
when your code is multi-threaded. It covers both classic CPython builds and
the free-threaded build introduced in CPython 3.13 (``Py_GIL_DISABLED``).
when your code is multi-threaded. It covers classic CPython builds for Python
3.11 through 3.15 and the free-threaded builds introduced in CPython 3.13
(``Py_GIL_DISABLED``). Python.NET supports free-threaded CPython starting with
Python 3.14.

The model in one paragraph
--------------------------
Expand Down Expand Up @@ -180,17 +182,18 @@ If you start a managed thread while holding the GIL and the thread needs to
call back into Python, release the GIL first so the new thread can acquire
it::

IntPtr threadState;
using (Py.GIL())
{
var pyCallback = scope.Get("on_done");
PythonEngine.BeginAllowThreads(); // let workers acquire the GIL
threadState = PythonEngine.BeginAllowThreads(); // let workers acquire the GIL
try
{
// spawn workers, wait for them...
}
finally
{
PythonEngine.EndAllowThreads(...);
PythonEngine.EndAllowThreads(threadState);
}
}

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ classifiers = [
"Intended Audience :: Developers",
"Programming Language :: C#",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down
331 changes: 91 additions & 240 deletions uv.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion version.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0-dev
3.2.0-rc1
Loading

Back | FazBrowse Home | New Git URL