On 13 Jul 2026, at 19:44, Dmitry Mityugov wrote:
> The original code produced (with Python 3.14.6 and earlier versions):
>
> DeprecationWarning: 'count' is passed as positional argument
>
> This patch fixes it.
>
> Signed-off-by: Dmitry Mityugov <[email protected]>
Thanks Dmitry for fixing this, as the named parameter exists since 3.0
we should be good with our supported 3.7 minimal version.
The subject should be more descriptive, i.e., less general, so I would
suggest something like:
build-aux/extract-ofp-actions: Fix re.sub() DeprecationWarning.
Also the commit message could be a more accurate, like;
Python 3.12 deprecated passing 'count' as a positional argument to
re.sub(). Fix this by using the keyword form instead.
We can apply this during commit. The rest looks good to me.
Acked-by: Eelco Chaudron <[email protected]>
> ---
> build-aux/extract-ofp-actions | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
> index cc5c1dbb0..82c5c0931 100755
> --- a/build-aux/extract-ofp-actions
> +++ b/build-aux/extract-ofp-actions
> @@ -276,7 +276,7 @@ def extract_ofp_actions(fn, definitions):
> print(" %s," % d["arg_ofs"])
> print(" %s," % d["arg_len"])
> print(" \"%s\","
> - % re.sub(r'_RAW[0-9]*', '', d["enum"], 1))
> + % re.sub(r'_RAW[0-9]*', '', d["enum"], count=1))
> if d["deprecation"]:
> print(" \"%s\","
> % re.sub(r'(["\\])', r'\\\1',
> d["deprecation"]))
> --
> 2.55.0
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev