forked from pool/python-python-xlib
Accepting request 855004 from home:bnavigator:branches:devel:languages:python
- Update to version 0.29 * Drawable & XInput: Avoid using array.array.tostring() which will be removed in Python 3.9 (thanks @t-wissmann). - Changelog for version 0.28 * DPMS: Display Power Management Signaling (by @thiagokokada) - Add remove-mock.patch gh#python-xlib/python-xlib#186 - Let the python-rpm-macros do their job for correct provides and obsoletes tag for all python3 flavors gh#openSUSE/python-rpm-macros#66 OBS-URL: https://build.opensuse.org/request/show/855004 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-xlib?expand=0&rev=16
This commit is contained in:
45
remove-mock.patch
Normal file
45
remove-mock.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 8bab50254d78370398dcbdf247d59976b866c27f Mon Sep 17 00:00:00 2001
|
||||
From: Ben Greiner <code@bnavigator.de>
|
||||
Date: Sat, 12 Dec 2020 00:57:16 +0100
|
||||
Subject: [PATCH 1/2] remove mock from dev-requirments
|
||||
|
||||
---
|
||||
dev-requirements.txt | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/dev-requirements.txt b/dev-requirements.txt
|
||||
index b2f5288..22fc710 100644
|
||||
--- a/dev-requirements.txt
|
||||
+++ b/dev-requirements.txt
|
||||
@@ -1,5 +1,4 @@
|
||||
coverage
|
||||
codecov
|
||||
-mock
|
||||
nose
|
||||
setuptools-scm
|
||||
|
||||
From 4c08116d51e2b2b2bc53d01ee8dd9698793cad5d Mon Sep 17 00:00:00 2001
|
||||
From: Ben Greiner <code@bnavigator.de>
|
||||
Date: Sat, 12 Dec 2020 00:58:19 +0100
|
||||
Subject: [PATCH 2/2] Use mock from standard lib if possible
|
||||
|
||||
---
|
||||
test/test_unix_connect.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/test_unix_connect.py b/test/test_unix_connect.py
|
||||
index 7680ba5..36abede 100644
|
||||
--- a/test/test_unix_connect.py
|
||||
+++ b/test/test_unix_connect.py
|
||||
@@ -6,7 +6,10 @@
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
-from mock import patch
|
||||
+try:
|
||||
+ from unittest.mock import patch
|
||||
+except ImportError:
|
||||
+ from mock import patch
|
||||
|
||||
from Xlib.support import unix_connect
|
||||
from Xlib.error import DisplayConnectionError, DisplayNameError
|
Reference in New Issue
Block a user