dev-python/watchdog: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2021-10-03 08:55:19 +02:00
parent 3b4d28c429
commit 40af04dcc7
4 changed files with 0 additions and 168 deletions

View File

@@ -1,4 +1,2 @@
DIST watchdog-1.0.2.tar.gz 91796 BLAKE2B 001cbe82ff8aff0c4e56e4d1f02519047580cccb48466566ad7c9c1f462f90a9a036cf90846eb38ec4fb24ff1df2a1ddfec20b3f0587afdc1f938ada1bb0b1ef SHA512 e87a0955ce822daabd7d030804876698f98ed2aad58486e26a94585763655302063f091b653abd385ea99642361b6253d8e051d96019b243a77b078ba86b0d6e
DIST watchdog-2.1.2.tar.gz 97407 BLAKE2B a847089409537391287a146670864c7721344ba8a6378c89483e9e08abe3f61690bfca48016f628ab0e6b0ff317679db3c72e27594e049ea03334dd20c305008 SHA512 2a127faffebb35f0b14d578570a4c5a7c27d6bd38042e34ea50f4b654be1ca07b193dfa72dfe25442d3e6da746f1cfbdda71c38be1386cc5a3e69204843c16f1
DIST watchdog-2.1.4.tar.gz 98695 BLAKE2B 2a15b362c6e776146df4738096fe0cd8ec49894c6b767e86ed5749c2f97447fb890f172ec989a17140594070eefa1fa2b40275aff5ba9d212f77a059ac3ead25 SHA512 88bed725c045f59091902a1fe4673036a679d263c71269e36125df2a4c851864bddee0cf4f8c3f20bfc2d5f735804b7c7b1ff07a3d89d8649bfa16d3e7e1fe21
DIST watchdog-2.1.5.tar.gz 98791 BLAKE2B b7663e5aa8918321d570c842abf7c70647712d2045f3cc06ccdff86e305fecc5b95c93048aae9f0a7b2629c2c4f10911ef21077a570b9fb0c3eb03e9597f555f SHA512 850feaf4f5d61b8c8f1521464853df65b72af80c86c63fa87769d17f2bc464112daf3e09a8d83e30474d398315ce854e5a45703c5eabad8b0f5f98f6840d2590

View File

@@ -1,76 +0,0 @@
From ab6508716f95fb65481ab6232301a095452e9b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 19 Aug 2021 15:13:39 +0200
Subject: [PATCH] Fix test mocks for big endian systems
Fix the mocked inotify data to respect system endianness. Instead of
harcoding the raw data, reconstruct it using struct.pack(), respecting
host endianness. This should also benefit readability a bit.
Closes #804
---
tests/test_inotify_c.py | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/tests/test_inotify_c.py b/tests/test_inotify_c.py
index 81f6586..dc336a3 100644
--- a/tests/test_inotify_c.py
+++ b/tests/test_inotify_c.py
@@ -10,6 +10,7 @@ import ctypes
import errno
import logging
import os
+import struct
from functools import partial
from queue import Queue
@@ -52,6 +53,19 @@ def teardown_function(function):
pass
+def struct_inotify(wd, mask, cookie, length, name):
+ assert len(name) <= length
+ struct_format = (
+ "=" # (native endianness, standard sizes)
+ "i" # int wd
+ "i" # uint32_t mask
+ "i" # uint32_t cookie
+ "i" # uint32_t len
+ "%ds" % (length,) # char[] name
+ )
+ return struct.pack(struct_format, wd, mask, cookie, length, name)
+
+
def test_late_double_deletion(monkeypatch):
inotify_fd = type(str("FD"), (object,), {})() # Empty object
inotify_fd.last = 0
@@ -60,20 +74,18 @@ def test_late_double_deletion(monkeypatch):
# CREATE DELETE CREATE DELETE DELETE_SELF IGNORE DELETE_SELF IGNORE
inotify_fd.buf = (
# IN_CREATE|IS_DIR (wd = 1, path = subdir1)
- b"\x01\x00\x00\x00\x00\x01\x00\x40\x00\x00\x00\x00\x10\x00\x00\x00"
- b"\x73\x75\x62\x64\x69\x72\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ struct_inotify(1, 0x40000100, 0, 16, b"subdir1") +
# IN_DELETE|IS_DIR (wd = 1, path = subdir1)
- b"\x01\x00\x00\x00\x00\x02\x00\x40\x00\x00\x00\x00\x10\x00\x00\x00"
- b"\x73\x75\x62\x64\x69\x72\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ struct_inotify(1, 0x40000200, 0, 16, b"subdir1")
) * 2 + (
# IN_DELETE_SELF (wd = 2)
- b"\x02\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ struct_inotify(2, 0x00000400, 0, 0, b"") +
# IN_IGNORE (wd = 2)
- b"\x02\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ struct_inotify(2, 0x00008000, 0, 0, b"") +
# IN_DELETE_SELF (wd = 3)
- b"\x03\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ struct_inotify(3, 0x00000400, 0, 0, b"") +
# IN_IGNORE (wd = 3)
- b"\x03\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ struct_inotify(3, 0x00008000, 0, 0, b"")
)
os_read_bkp = os.read
--
2.33.0

View File

@@ -1,47 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1 optfeature
DESCRIPTION="Python API and shell utilities to monitor file system events"
HOMEPAGE="https://github.com/gorakhargosh/watchdog"
SRC_URI="https://github.com/gorakhargosh/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~sparc x86"
CDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]"
RDEPEND="${CDEPEND}
dev-python/argh[${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}
test? (
>=dev-python/pytest-timeout-0.3[${PYTHON_USEDEP}]
)"
distutils_enable_tests pytest
src_prepare() {
local PATCHES=(
"${FILESDIR}"/${P}-big-endian.patch
)
sed -i -e '/--cov/d' setup.cfg || die
default
}
python_test() {
local deselect=()
[[ ${EPYTHON} == pypy3 ]] && deselect+=(
tests/test_inotify_buffer.py::test_move_internal_batch
)
epytest -p no:django ${deselect[@]/#/--deselect }
}
pkg_postinst() {
optfeature "Bash completion" dev-python/argcomplete
}

View File

@@ -1,43 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1 optfeature
DESCRIPTION="Python API and shell utilities to monitor file system events"
HOMEPAGE="https://github.com/gorakhargosh/watchdog"
SRC_URI="https://github.com/gorakhargosh/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
CDEPEND="dev-python/pyyaml[${PYTHON_USEDEP}]"
RDEPEND="${CDEPEND}
dev-python/argh[${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}
test? (
>=dev-python/pytest-timeout-0.3[${PYTHON_USEDEP}]
)"
distutils_enable_tests pytest
src_prepare() {
sed -i -e '/--cov/d' setup.cfg || die
default
}
python_test() {
local deselect=()
[[ ${EPYTHON} == pypy3 ]] && deselect+=(
tests/test_inotify_buffer.py::test_move_internal_batch
)
epytest -p no:django ${deselect[@]/#/--deselect }
}
pkg_postinst() {
optfeature "Bash completion" dev-python/argcomplete
}