From nobody Tue Nov 05 03:20:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XjDB32Rhtz5cvqh; Tue, 05 Nov 2024 03:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XjDB31xhYz48WS; Tue, 5 Nov 2024 03:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730776843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y92KKazwHeeFNvd2AMgTynFfCGeVtbHuTb1GRlrk7B4=; b=qwBsTNt20SEgNeg18AydGr4mZsjgvM2cFXeWpchPfPGnq0QuG06lW5lPNDIjsA2Q+K2mJi x4cE6KtDh39dygncIDeN+eRuF7L8Es/HVWc/sdAs1sWgMNy6b793Gj2TkJIKcT7bXlkKd0 A6W1P2uDoqETOjwacJZnuRXpM8cCt7l+IFUrQPc2hHRUOU0A9FcV3UEKnyOZjQMLI1p55v xpf5F5lLHiDZsJqwS2kXGkCYr6giuRq01xgTkLR3A5/o/PqjZaToAJYAXflmAYZn+GrxFz 3P7the2SeKDMd11S80gqNEWV3VKfYHA8/9ArPY1i88W43jDPrYIAdl1z2I9g6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730776843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y92KKazwHeeFNvd2AMgTynFfCGeVtbHuTb1GRlrk7B4=; b=wk+UcyjSCw1FuaYIVPdWjiN6tG+CGOhTr1IczSjV9hdgtLNE49B7QXG2aoYTxvKU4WwKmU jLsamfffLG4pBj9VFdDhMflsiCef0TfNtymwkPDQefLlgFB3QZHC44ijUyFnWEOALY0HJo wzOR+uwYxBn6vjyVZYi0pXKulsUnBFSx9O2LOTmAwxM5jjfFs8slSrBe5mZNfy2FWeYgVU okljKHyhfs5vbbKTDzYvLZKLJkQCTC77af7gGD4Y+Tw1RzZtk/H/bY2dUVL5b3OFETlZED YCZBvwCsV7saFMH/uudiTxUO+LRB3Eywn9fOmO7TaZpdiYVy2w7mnyV0N74JwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730776843; a=rsa-sha256; cv=none; b=EneMLDrSf0YELWcPnct7lCB2XaNEmfjNFqlLUeR86TY7gb4V/pGVzSCVg1uc7YFcbWeN0U Edc23iE3LUkpdxgdbzKgpRH+dTaAo65xpi6VB6znjk35eKlhLqrhJdppkTnNOV38e8dsCT /YwfxdptrqAEJhFGuGX84+NwO6OCstxX9OkXeTnViVPt1HwLRQge2abSZxYVNSLxVEZF/l nodhHntQii21t8lnZ2uc6XdGgwVOO+n+sAL81vgSCMaRNyoVikvi9PQRVa5uhnye9Dm0Fg IE+CVz/FJ3Ru+vZfHo1zO9lQ0cViPWyIpiVNJ+nrGxeU9KoLeNnJ7zBsWyWowQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XjDB31Y3kz10wp; Tue, 5 Nov 2024 03:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A53KhDX048014; Tue, 5 Nov 2024 03:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A53Khi5048011; Tue, 5 Nov 2024 03:20:43 GMT (envelope-from git) Date: Tue, 5 Nov 2024 03:20:43 GMT Message-Id: <202411050320.4A53Khi5048011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 8b13cb9d654c - main - ping tests: Silence deprecation warnings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b13cb9d654c985534d24a09ec5dab02cc4dea6e Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=8b13cb9d654c985534d24a09ec5dab02cc4dea6e commit 8b13cb9d654c985534d24a09ec5dab02cc4dea6e Author: Jose Luis Duran AuthorDate: 2024-11-05 03:04:53 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-05 03:07:03 +0000 ping tests: Silence deprecation warnings Declare some regex patterns as a raw string by prepending `r`. Reviewed by: markj Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D42174 --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index cf2e46a146c8..93b42d7d53bd 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -270,15 +270,15 @@ def pinger( def redact(output): """Redact some elements of ping's output""" pattern_replacements = [ - ("localhost \([0-9]{1,3}(\.[0-9]{1,3}){3}\)", "localhost"), - ("from [0-9]{1,3}(\.[0-9]{1,3}){3}", "from"), + (r"localhost \([0-9]{1,3}(\.[0-9]{1,3}){3}\)", "localhost"), + (r"from [0-9]{1,3}(\.[0-9]{1,3}){3}", "from"), ("hlim=[0-9]*", "hlim="), ("ttl=[0-9]*", "ttl="), ("time=[0-9.-]*", "time="), ("cp: .*", "cp: xx xx xx xx xx xx xx xx"), ("dp: .*", "dp: xx xx xx xx xx xx xx xx"), - ("\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), - ("[0-9\.]+/[0-9.]+", "/"), + (r"\(-[0-9\.]+[0-9]+ ms\)", "(- ms)"), + (r"[0-9\.]+/[0-9.]+", "/"), ] for pattern, repl in pattern_replacements: output = re.sub(pattern, repl, output)