File: 03_fix_version_check.diff

package info (click to toggle)
pywayland 0.4.18-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 672 kB
  • sloc: python: 3,625; xml: 189; makefile: 174
file content (24 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Relax version check in test_protocol_interface
 Wayland protocol versions are backward compatible.
Author: Daniel Echeverri <epsilon@debian.org>
Forwarded: https://github.com/flacjacket/pywayland/issues/76
Last-Update: 2025-09-12
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113697

--- a/test/test_protocol_interface.py
+++ b/test/test_protocol_interface.py
@@ -153,7 +153,13 @@
     py_ptr = py_cls._ptr
 
     assert ffi.string(wl_ptr.name) == ffi.string(py_ptr.name)
-    assert wl_ptr.version == py_ptr.version
+    # Wayland protocol versions are backward compatible, so the native library
+    # version should be >= the Python binding version
+    assert wl_ptr.version >= py_ptr.version, (
+        f"Native Wayland version ({wl_ptr.version}) should be >= "
+        f"Python binding version ({py_ptr.version}) for interface "
+        f"{ffi.string(py_ptr.name).decode()}"
+    )
     assert wl_ptr.event_count == py_ptr.event_count
 
     assert wl_ptr.method_count == py_ptr.method_count