Disable and remove old patches.

parent e30ddf31
From 59da8450fdfc4c794307299c378cd7c38efaab9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Luis=20Boya=20Garc=C3=ADa?= <ntrrgc@gmail.com>
Date: Sun, 23 Feb 2014 17:21:09 +0100
Subject: [PATCH] Fix get_best_auth for Python 3
All self.entries items are byte strings, but get_best_auth receives
Unicode strings. Convert them to bytes before comparing.
This fixes a bug that prevented python3-xlib to find X11 cookies in
Xauthority, thus not allowing to use it without `xhost +`.
---
Xlib/xauth.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Xlib/xauth.py b/Xlib/xauth.py
index d10338b..bf841dc 100644
--- a/Xlib/xauth.py
+++ b/Xlib/xauth.py
@@ -97,7 +97,7 @@ def __getitem__(self, i):
return self.entries[i]
def get_best_auth(self, family, address, dispno,
- types = ( "MIT-MAGIC-COOKIE-1", )):
+ types = ( b"MIT-MAGIC-COOKIE-1", )):
"""Find an authentication entry matching FAMILY, ADDRESS and
DISPNO.
@@ -110,7 +110,8 @@ def get_best_auth(self, family, address, dispno,
otherwise XNoAuthError is raised.
"""
- num = str(dispno)
+ num = str(dispno).encode()
+ address = address.encode()
matches = {}
Index: trunk/examples/draw.py
===================================================================
--- trunk.orig/examples/draw.py 2009-04-11 19:18:15.000000000 -0400
+++ trunk/examples/draw.py 2009-11-05 06:06:25.000000000 -0500
@@ -115,7 +115,7 @@
sys.exit(0)
# A drawed objects, consisting of either a single
-# romboid, or two romboids connected by a winding line
+# rhomboid, or two rhomboids connected by a winding line
class Movement:
def __init__(self, win, ev):
@@ -129,7 +129,7 @@
self.time = ev.time
self.lines = [(ev.event_x, ev.event_y)]
- self.first = Romboid(self.win, ev)
+ self.first = Rhomboid(self.win, ev)
self.last = None
def motion(self, ev):
@@ -182,7 +182,7 @@
def finish(self, ev):
self.motion(ev)
if len(self.lines) > 1:
- self.last = Romboid(self.win, ev)
+ self.last = Rhomboid(self.win, ev)
self.left = min(ev.event_x - 5, self.left)
self.right = max(ev.event_x + 5, self.right)
@@ -204,8 +204,8 @@
self.last.draw()
-# A romboid, drawed around the Movement endpoints
-class Romboid:
+# A rhomboid, drawed around the Movement endpoints
+class Rhomboid:
def __init__(self, win, ev):
self.win = win
self.x = ev.event_x
@@ -213,7 +213,7 @@
self.draw()
def draw(self):
- # Draw the segments of the romboid
+ # Draw the segments of the rhomboid
self.win.window.poly_line(self.win.gc, X.CoordModePrevious,
[(self.x, self.y - 5),
(5, 5),
Index: trunk/examples/draw-proto.py
===================================================================
--- trunk.orig/examples/draw-proto.py 2009-04-11 19:18:15.000000000 -0400
+++ trunk/examples/draw-proto.py 2009-11-05 06:06:25.000000000 -0500
@@ -104,7 +104,7 @@
current.motion(e)
# A drawed objects, consisting of either a single
-# romboid, or two romboids connected by a winding line
+# rhomboid, or two rhomboids connected by a winding line
class Movement:
def __init__(self, win, ev):
@@ -118,7 +118,7 @@
self.time = ev.time
self.lines = [(ev.event_x, ev.event_y)]
- self.first = Romboid(self.win, ev)
+ self.first = Rhomboid(self.win, ev)
self.last = None
def motion(self, ev):
@@ -179,7 +179,7 @@
def finish(self, ev):
self.motion(ev)
if len(self.lines) > 1:
- self.last = Romboid(self.win, ev)
+ self.last = Rhomboid(self.win, ev)
self.left = min(ev.event_x - 5, self.left)
self.right = max(ev.event_x + 5, self.right)
@@ -203,8 +203,8 @@
self.last.draw()
-# A romboid, drawed around the Movement endpoints
-class Romboid:
+# A rhomboid, drawed around the Movement endpoints
+class Rhomboid:
def __init__(self, win, ev):
self.win = win
self.x = ev.event_x
@@ -212,7 +212,7 @@
self.draw()
def draw(self):
- # Draw the segments of the romboid
+ # Draw the segments of the rhomboid
PolyLine(self.win.d, None,
X.CoordModePrevious,
self.win.window,
From 7691a04a3e5bf4539c886418d7f3e95135066e26 Mon Sep 17 00:00:00 2001
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Date: Mon, 25 Sep 2017 10:31:02 +0000
Subject: [PATCH] Always return unicode from String8.parse_binary_value().
---
Xlib/protocol/rq.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Xlib/protocol/rq.py b/Xlib/protocol/rq.py
index 9a27eba..4535b4e 100644
--- a/Xlib/protocol/rq.py
+++ b/Xlib/protocol/rq.py
@@ -415,8 +415,14 @@ class String8(ValueField):
s = s.decode('UTF-8')
except UnicodeDecodeError:
pass # return as bytes
- return s, data[slen:]
+ d = data[slen:]
+ try:
+ d = d.decode('UTF-8')
+ except UnicodeDecodeError:
+ pass
+
+ return s, d
class String16(ValueField):
structcode = None
--
2.11.0
Index: trunk/Xlib/protocol/display.py
===================================================================
--- trunk.orig/Xlib/protocol/display.py 2008-03-18 16:08:27.000000000 -0400
+++ trunk/Xlib/protocol/display.py 2009-11-05 06:06:15.000000000 -0500
@@ -533,7 +533,7 @@
# We're the recieving thread, parse the data
if recieving:
try:
- bytes_recv = self.socket.recv(2048)
+ bytes_recv = self.socket.recv(4096)
except socket.error, err:
self.close_internal('server: %s' % err[1])
raise self.socket_error
This diff is collapsed.
--- a/Xlib/ext/randr.py
+++ b/Xlib/ext/randr.py
@@ -1139,8 +1139,6 @@
# Initialization #
def init(disp, info):
- print(info.__class__)
-
disp.extension_add_method('display', 'xrandr_query_version', query_version)
disp.extension_add_method('window', 'xrandr_select_input', select_input)
disp.extension_add_method('window', 'xrandr_get_screen_info', get_screen_info)
fix-unix-socket-in-display.patch
increase-receiving-buffer.patch
# fix-unix-socket-in-display.patch
add-texinfo-dir-entry.patch
fix-ssh-tunnel-auth.patch
fix-rhomboid-examples.patch
python3.patch
remove-debugging-output.patch
texi2html.patch
fix-auth-lp1482844.patch
fix-unicode-876728.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment