From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B3A001F44D for ; Wed, 17 Apr 2024 02:08:35 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=KmK3tqP2; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwuih-0002aY-9k; Tue, 16 Apr 2024 22:08:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwuif-0002aJ-O4 for bug-gnulib@gnu.org; Tue, 16 Apr 2024 22:08:17 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwuid-0002Zk-M6 for bug-gnulib@gnu.org; Tue, 16 Apr 2024 22:08:17 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1e2c725e234so2713745ad.1 for ; Tue, 16 Apr 2024 19:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713319693; x=1713924493; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=bp/ZJDReP0Q6VmsFbFuqsuYL8/rgRiu2g9W0rV2wO+w=; b=KmK3tqP2zH0CacMANh5Ue+md8IMBdgTFVMJa43WApNceFsuLFt6EEzVWEd6M5TBSa5 KhygOzbgBd5A98Oy4mflZc2rfbc0lpVlzyZNq9Cbmxrq2ohO6oHGSREGyJYBdg8bHfI9 D7HCwEpotNDlRB6hn9eH9D+YjA5EAhiycX1EKSSJOfb4Vjq4PZmSAOstYuzxSLF6eFTm xQLR+tHlsmp9umTCrbJDC+zGtkZ6g6BerzDFnAc+vMEPaodjQ/aMaf4KbyrxWMrsS9nR ScM5jTSHjQbtqcUNyiob4Fdw5cJWwwvN1KhTC7CNnALSQtdfyZQtt/nU6lQmRFb7ftox b1zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713319693; x=1713924493; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bp/ZJDReP0Q6VmsFbFuqsuYL8/rgRiu2g9W0rV2wO+w=; b=sTS6l6D00YbcB973FB0kYoRS2vd87RHmvLqLKJTacVWeCm1drds9QNbiGcSc+JIRKB 6PTiPqtGgtOGzE4Uzw6XW+PomMKLpYz/KcMY0+5B/gT9R15hUC11co7qdBLBxmp4x7S5 Z8+1buvtJEeGKdS2dmDZ4StJFvC4368OoBCZflglUe0OpIGF+it/EOQnH4HXT1FGtLkA sixJBidUooPPn6/GKC1cV2NX+Ss5k/XIF2MNGbkDPCmyBjUS1WLPFvgPb2QHFjKxlk3M 0+ViDkKJECW/gshN7Wy+lGtYglv+QStL1nj9Xe3le8fUXi6gQ4G838nff0FPL6HxvlCW x2jQ== X-Forwarded-Encrypted: i=1; AJvYcCX4CLLdbSVsznJQbjVmYmlgpOObODumKWYRPV6o29LDE4nrJTZwvfaQ4WGGEWhnVmEGyTvudtH07tLxFGUHh1+mlBI= X-Gm-Message-State: AOJu0Yxc1PCP4TXQwNRin5Y6yP5qT0wf+Wet9gKgpLVgxDLwO2rvEw5m c+mlm+pZGBRQ2YWvVR7GWW5Rn9qwnmK6YfRBu/uleXLyRv/iAIa0DvJkOw== X-Google-Smtp-Source: AGHT+IFbbNZc2IlfTWhjrJidTOisF8QJHLT8HbGJHE6zCzS26z1who8K5xVqp9GSDkJuyUev0STiWw== X-Received: by 2002:a17:902:a987:b0:1e5:a3b2:3da9 with SMTP id bh7-20020a170902a98700b001e5a3b23da9mr3971071plb.17.1713319693005; Tue, 16 Apr 2024 19:08:13 -0700 (PDT) Received: from [192.168.1.5] (c-73-189-213-139.hsd1.ca.comcast.net. [73.189.213.139]) by smtp.gmail.com with ESMTPSA id b18-20020a170903229200b001e21ddacb20sm10413772plh.297.2024.04.16.19.08.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 19:08:12 -0700 (PDT) Message-ID: <6bd41271-7bb6-4fab-9f6d-f44830a5328d@gmail.com> Date: Tue, 16 Apr 2024 19:08:10 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Refactoring rewrite_filename functions To: Bruno Haible , bug-gnulib@gnu.org References: <6055935.ntHmXhgcp8@nimes> <4f567b55-2b44-48a3-9cdb-1a8a9570d589@gmail.com> <26909173.d79VK8dOqj@nimes> Content-Language: en-US From: Collin Funk In-Reply-To: <26909173.d79VK8dOqj@nimes> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=collin.funk1@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org On 4/16/24 6:35 PM, Bruno Haible wrote: > This does not make sense. GLConfig is meant to hold settings and configuration, > nothing more. > > I see the home of this function more in GLFileSystem.py. Maybe in class > GLFileAssistant, maybe in a new class in that same file. Hmm, thanks for the advice. At the moment I think GLFileAssistant makes sense. Since it performs transformations on the files based on their categories, transforming the path names seems somewhat in its domain. This will require some code reordering first though. The GLFileAssistant used by GLImport is not defined until GLImport.execute(). The file name transformations are done in GLImport.prepare(). This function also returns the transformers used by GLFileAssistant.__init__(). I think the correct solution there is to define the GLFileAssistant in GLImport.__init__() with it's default arguments and then set them later. I've been meaning to do this anyways because I find defining things outside of __init__ makes things harder to follow. This was also a reason I had in the back of my head when fixing the default arguments here: https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00228.html > 'tests=lib/' should not occur in the scope of mode == 'copy-file'. > But this string is an indicator inside gnulib-tool; users of gnulib-tool > should not be allowed to pass it. Okay I see. I'll leave it as-is now since it works and I rather not do accidental replacements. :) Collin