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

Skip to content

Commit 39b2347

Browse files
committed
marked the new codecs API as unstable
1 parent 449338f commit 39b2347

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/runtime/Codecs/TupleCodecs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace Python.Runtime.Codecs
55
using System.Linq;
66
using System.Reflection;
77

8+
[Obsolete(Util.UnstableApiMessage)]
89
public sealed class TupleCodec<TTuple> : IPyObjectEncoder, IPyObjectDecoder
910
{
1011
TupleCodec() { }

src/runtime/Util.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ namespace Python.Runtime
55
{
66
internal class Util
77
{
8+
internal const string UnstableApiMessage =
9+
"This API is unstable, and might be changed or removed in the next minor release";
10+
811
internal static Int64 ReadCLong(IntPtr tp, int offset)
912
{
1013
// On Windows, a C long is always 32 bits.
@@ -30,4 +33,4 @@ internal static void WriteCLong(IntPtr type, int offset, Int64 flags)
3033
}
3134
}
3235
}
33-
}
36+
}

src/runtime/converterextensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Python.Runtime
99
/// <summary>
1010
/// Defines <see cref="PyObject"/> conversion to CLR types (unmarshalling)
1111
/// </summary>
12+
[Obsolete(Util.UnstableApiMessage)]
1213
public interface IPyObjectDecoder
1314
{
1415
/// <summary>
@@ -28,6 +29,7 @@ public interface IPyObjectDecoder
2829
/// <summary>
2930
/// Defines conversion from CLR objects into Python objects (e.g. <see cref="PyObject"/>) (marshalling)
3031
/// </summary>
32+
[Obsolete(Util.UnstableApiMessage)]
3133
public interface IPyObjectEncoder
3234
{
3335
/// <summary>
@@ -44,6 +46,7 @@ public interface IPyObjectEncoder
4446
/// This class allows to register additional marshalling codecs.
4547
/// <para>Python.NET will pick suitable encoder/decoder registered first</para>
4648
/// </summary>
49+
[Obsolete(Util.UnstableApiMessage)]
4750
public static class PyObjectConversions
4851
{
4952
static readonly List<IPyObjectDecoder> decoders = new List<IPyObjectDecoder>();

0 commit comments

Comments
 (0)