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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
marked the new codecs API as unstable
  • Loading branch information
lostmsu committed Feb 1, 2020
commit 39b2347e10b11f23747d45f9e0f2c4a0624d61b7
1 change: 1 addition & 0 deletions src/runtime/Codecs/TupleCodecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Python.Runtime.Codecs
using System.Linq;
using System.Reflection;

[Obsolete(Util.UnstableApiMessage)]
public sealed class TupleCodec<TTuple> : IPyObjectEncoder, IPyObjectDecoder
{
TupleCodec() { }
Expand Down
5 changes: 4 additions & 1 deletion src/runtime/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace Python.Runtime
{
internal class Util
{
internal const string UnstableApiMessage =
"This API is unstable, and might be changed or removed in the next minor release";

internal static Int64 ReadCLong(IntPtr tp, int offset)
{
// On Windows, a C long is always 32 bits.
Expand All @@ -30,4 +33,4 @@ internal static void WriteCLong(IntPtr type, int offset, Int64 flags)
}
}
}
}
}
3 changes: 3 additions & 0 deletions src/runtime/converterextensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Python.Runtime
/// <summary>
/// Defines <see cref="PyObject"/> conversion to CLR types (unmarshalling)
/// </summary>
[Obsolete(Util.UnstableApiMessage)]
public interface IPyObjectDecoder
{
/// <summary>
Expand All @@ -28,6 +29,7 @@ public interface IPyObjectDecoder
/// <summary>
/// Defines conversion from CLR objects into Python objects (e.g. <see cref="PyObject"/>) (marshalling)
/// </summary>
[Obsolete(Util.UnstableApiMessage)]
public interface IPyObjectEncoder
{
/// <summary>
Expand All @@ -44,6 +46,7 @@ public interface IPyObjectEncoder
/// This class allows to register additional marshalling codecs.
/// <para>Python.NET will pick suitable encoder/decoder registered first</para>
/// </summary>
[Obsolete(Util.UnstableApiMessage)]
public static class PyObjectConversions
{
static readonly List<IPyObjectDecoder> decoders = new List<IPyObjectDecoder>();
Expand Down