Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 0 additions & 23 deletions 23 src/embed_tests/pytuple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,6 @@ namespace Python.EmbeddingTest
{
public class PyTupleTest
{
/// <summary>
/// Tests set-up. Being used to skip class on Travis/PY27
/// </summary>
/// <remarks>
/// FIXME: Fails on Travis/PY27: All tests below (unless otherwise stated)
/// Fatal Python error: auto-releasing thread-state, but no thread-state for this thread
/// Stacktrace:
/// at (wrapper managed-to-native) Python.Runtime.Runtime.PyGILState_Release (intptr)
/// at Python.Runtime.PythonEngine.ReleaseLock (intptr)
/// at Python.Runtime.PythonException.Dispose ()
/// at Python.Runtime.PythonException.Finalize ()
/// at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
/// </remarks>
[SetUp]
public void SetUp()
{
if (Environment.GetEnvironmentVariable("TRAVIS") == "true" &&
Environment.GetEnvironmentVariable("TRAVIS_PYTHON_VERSION") == "2.7")
{
Assert.Ignore("Fails on Travis/PY27: Fatal Python error: auto-releasing thread-state, but no thread-state for this thread");
}
}

/// <summary>
/// Test IsTupleType without having to Initialize a tuple.
/// PyTuple constructor use IsTupleType. This decouples the tests.
Expand Down
2 changes: 1 addition & 1 deletion 2 src/runtime/pythonexception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void Dispose()
{
if (!disposed)
{
if (Runtime.Py_IsInitialized() > 0)
if (Runtime.Py_IsInitialized() > 0 && !Runtime.IsFinalizing)
{
IntPtr gs = PythonEngine.AcquireLock();
Runtime.XDecref(_pyType);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.