From patchwork Fri Sep 15 09:40:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike FABIAN X-Patchwork-Id: 76119 X-Patchwork-Delegate: mfabian@redhat.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2CB1385783F for ; Fri, 15 Sep 2023 09:41:28 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 18F543858D35 for ; Fri, 15 Sep 2023 09:41:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 18F543858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694770868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bCAU9W4acfi4Cyi6CHn+kdnCB5ekzmiY7Gi2HUPktX0=; b=NR4gwsAQtc5QKWwktCRis0ifTab5DcF89GIOv1qiXfmFmvS+811JM3YMZYQ84xWH7j7vGX bEn1AzqiR3Zdb26lofnDGXZ0h5ANwkSroL8svhqN4EQaMhkL/i4kuCWYK0/qqIX9Mh3UgC 2ckeVUsNqG4Z0tYiYYBOqcRnTSNY+9M= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-178-0UMbZwdzP3ascQtlmTBWmg-1; Fri, 15 Sep 2023 05:41:07 -0400 X-MC-Unique: 0UMbZwdzP3ascQtlmTBWmg-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-500a6ae8392so2454867e87.0 for ; Fri, 15 Sep 2023 02:41:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694770863; x=1695375663; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bCAU9W4acfi4Cyi6CHn+kdnCB5ekzmiY7Gi2HUPktX0=; b=bZjLsjgRNZFtgdZiYi+eX2SP+g1E3wSXomLfn6aTpgCdUEkv0IyMJB5oNgUGeMmZOQ 3KsKiIsmPqEEX2sfNiVcd90rT0KsruLbVcyHiZ7eof8vcPdDu+gJARsx9fe/ugb68f09 zc4VE8EfcXPZ1+2co//XpIDV1D9V/Z6bN02XRwnn/iLwwcIC5BIwEyNXYPyFKjVsVZz3 FUXoiNI0orgoy3DcQHwth22rnP2E2urX6F4gGG6KAX418ca5ssUrryrySNCzkI3BrwSS 43bHJ0CtMrBV0LWNVjFJmvRSCN+Ys/tDNeaFdku2z0pcjwU9z96IYRKe2wl8qqJxBs7K O8pA== X-Gm-Message-State: AOJu0YzVRmeYQcJLmE/WVQvm++nIiB6KqF5BVHtlxYCqqXe/M5HM9tbB q0vx8fktr2OEnxA1X3SsV6ukZtUvnIo09WAdQx/RAVKDN9/3b5vmhy+xnNcel8Bn+6JcVq/lPzw eApwmR51M/lnGR51PkrGB9Kv1w88= X-Received: by 2002:a05:6512:2142:b0:4ff:80d4:e132 with SMTP id s2-20020a056512214200b004ff80d4e132mr876873lfr.29.1694770863434; Fri, 15 Sep 2023 02:41:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEA6Nwyuk47GwsG/L9i7JZWVxFvHTCK+FRQzmJE0FDYDQ4wiCuD2UI/e7m4YEkQSpEH2XNN7A== X-Received: by 2002:a05:6512:2142:b0:4ff:80d4:e132 with SMTP id s2-20020a056512214200b004ff80d4e132mr876855lfr.29.1694770862950; Fri, 15 Sep 2023 02:41:02 -0700 (PDT) Received: from hathi.site (p57b61769.dip0.t-ipconnect.de. [87.182.23.105]) by smtp.gmail.com with ESMTPSA id m24-20020aa7d358000000b005231e1780aasm1999736edr.91.2023.09.15.02.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 02:41:02 -0700 (PDT) Received: by hathi.site (Postfix, from userid 10030) id C663484B58; Fri, 15 Sep 2023 11:41:01 +0200 (CEST) From: Mike FABIAN To: libc-alpha@sourceware.org Cc: Mike FABIAN Subject: [PATCH 1/3] Fix regexp syntax warnings in localedata/unicode-gen/ctype_compatibility.py Date: Fri, 15 Sep 2023 11:40:23 +0200 Message-ID: <20230915094038.1178807-1-mfabian@redhat.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Fix these: $ python -m py_compile ./ctype_compatibility.py ./ctype_compatibility.py:146: SyntaxWarning: invalid escape sequence '\)' Reviewed-by: Carlos O'Donell --- localedata/unicode-gen/ctype_compatibility.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/localedata/unicode-gen/ctype_compatibility.py b/localedata/unicode-gen/ctype_compatibility.py index a22ea2bbc9..09eac2fbc3 100755 --- a/localedata/unicode-gen/ctype_compatibility.py +++ b/localedata/unicode-gen/ctype_compatibility.py @@ -89,12 +89,12 @@ def extract_character_classes(filename): 'tolower', 'totitle']: match = re.match(r'^(' - +'(?:(?:class|map)\s+")' + r'(?:(?:class|map)\s+")' +re.escape(char_class)+ - '(?:";)\s+' - +'|' - +re.escape(char_class)+'\s+' - +')', line) + r'(?:";)\s+' + r'|' + +re.escape(char_class)+r'\s+'+ + r')', line) if match: if char_class not in ctype_dict: ctype_dict[char_class] = [] @@ -117,8 +117,8 @@ def process_chars(char_class_list, code_point_line): continue match = re.match( r'^[0-9A-F]{4,8})>' - +'\.\.'+ - '[0-9A-F]{4,8})>$', + r'\.\.' + r'[0-9A-F]{4,8})>$', code_points) if match: # .. for codepoint in range( @@ -128,8 +128,8 @@ def process_chars(char_class_list, code_point_line): continue match = re.match( r'^[0-9A-F]{4,8})>' - +'\.\.\(2\)\.\.'+ - '[0-9A-F]{4,8})>$', + r'\.\.\(2\)\.\.' + r'[0-9A-F]{4,8})>$', code_points) if match: # ..(2).. for codepoint in range( @@ -140,10 +140,10 @@ def process_chars(char_class_list, code_point_line): continue match = re.match( r'^\(' - +'[0-9A-F]{4,8})>' - +','+ - '[0-9A-F]{4,8})>' - +'\)$', + r'[0-9A-F]{4,8})>' + r',' + r'[0-9A-F]{4,8})>' + r'\)$', code_points) if match: # (,) char_class_list.append((