Skip to content

Commit

Permalink
undo r5236 (redo r4159), we don't support ancient servers anyway (0.1…
Browse files Browse the repository at this point in the history
…1 or earlier): don't sort dictionaries in bencoded packets - which we cannot do anyway since the keys may not all be of the same type, also bump the version number and make it match the current source version

git-svn-id: https://xpra.org/svn/Xpra/trunk@20839 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 25, 2018
1 parent 0b2d322 commit cb30c1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/xpra/net/bencode/bencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Original version written by Petru Paler

__version__ = (b"Python", 0, 12)
__version__ = (b"Python", 2, 5)

import sys
if sys.version_info[0] >= 3:
Expand Down Expand Up @@ -138,7 +138,7 @@ def encode_list(x, r):

def encode_dict(x,r):
r.append('d')
for k in sorted(x.keys()):
for k in x.keys():
v = x[k]
encode_func[type(k)](k, r)
encode_func[type(v)](v, r)
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/net/bencode/cython_bencode.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from __future__ import absolute_import


__version__ = (b"Cython", 0, 14)
__version__ = (b"Cython", 2, 5)

from xpra.buffers.membuf cimport object_as_buffer

Expand Down Expand Up @@ -157,7 +157,7 @@ cdef int encode_list(object x, r) except -1:

cdef int encode_dict(object x, r) except -1:
r.append(b'd')
for k in sorted(x.keys()):
for k in x.keys():
v = x[k]
assert encode(k, r)==0
assert encode(v, r)==0
Expand Down

0 comments on commit cb30c1c

Please sign in to comment.