Skip to content

Commit 249290d

Browse files
committed
bump protocol version to 47 (pyro 4.26)
1 parent b9220ff commit 249290d

File tree

10 files changed

+1071
-1017
lines changed

10 files changed

+1071
-1017
lines changed

README.txt

Lines changed: 277 additions & 277 deletions
Large diffs are not rendered by default.

dotnet/Pyrolite.Tests/Pyro/MessageTests.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,35 @@ public void testRecvAnnotations()
198198
}
199199

200200
[Test]
201-
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 25390")]
202-
public void testProtocolVersion()
201+
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 25455")]
202+
public void testProtocolVersionKaputt()
203203
{
204204
byte[] msg = new Message(Message.MSG_RESULT, new byte[0], this.serializer_id, 0, 1, null).to_bytes().Take(Message.HEADER_SIZE).ToArray();
205205
msg[4] = 99; // screw up protocol version in message header
206+
msg[5] = 111; // screw up protocol version in message header
206207
Message.from_header(msg);
207208
}
208209

210+
[Test]
211+
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 46")]
212+
public void testProtocolVersionsNotSupported1()
213+
{
214+
byte[] msg = new Message(Message.MSG_RESULT, new byte[0], this.serializer_id, 0, 1, null).to_bytes().Take(Message.HEADER_SIZE).ToArray();
215+
msg[4] = 0;
216+
msg[5] = 46;
217+
Message.from_header(msg);
218+
}
219+
220+
[Test]
221+
[ExpectedException(typeof(PyroException), ExpectedMessage="invalid protocol version: 48")]
222+
public void testProtocolVersionsNotSupported2()
223+
{
224+
byte[] msg = new Message(Message.MSG_RESULT, new byte[0], this.serializer_id, 0, 1, null).to_bytes().Take(Message.HEADER_SIZE).ToArray();
225+
msg[4] = 0;
226+
msg[5] = 48;
227+
Message.from_header(msg);
228+
}
229+
209230
[Test]
210231
public void testHmac()
211232
{

dotnet/Pyrolite/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
//
2929
// You can specify all the values or you can use the default the Revision and
3030
// Build Numbers by using the '*' as shown below:
31-
[assembly: AssemblyVersion("3.0.*")]
31+
[assembly: AssemblyVersion("3.1.*")]

dotnet/Pyrolite/Pyro/Config.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public enum SerializerType {
2121
public static bool SERPENT_SET_LITERALS = false; // set to true if talking to Python 3.2 or newer
2222
public static SerializerType SERIALIZER = SerializerType.serpent;
2323

24-
public const int PROTOCOL_VERSION = 46; // Pyro 4.22 and newer, cannot be modified
25-
public const string PYROLITE_VERSION="3.0";
24+
public const int PROTOCOL_VERSION = 47; // Pyro 4.26
25+
public const string PYROLITE_VERSION="3.1";
2626
}
2727

2828
}

0 commit comments

Comments
 (0)