Re: [PATCH] gnulib-tool.py: Fix function call on incorrect object.

2024-02-19 Thread Collin Funk
Bruno Haible writes: > The status: It's about 2/3 complete. 4 months of work have gone into it, > and 2 months of work still remaining. (That's my estimation, based on > two weeks of work that I put in, in 2022.) > 65% of the .py code has been verified to be in sync with the bash code; > 35%

Re: [PATCH] gnulib-tool.py: Fix function call on incorrect object.

2024-02-19 Thread Collin Funk
On 2/19/24 1:36 PM, Bruno Haible wrote: > You don't need to go to the './configure' and 'make' stages at this point. > Just ensuring that the outputs of gnulib-tool and gnulib-tool.py are the > same will sufficiently guide you. Ah, I see. Thanks for this and the rest of the advice. Collin

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-20 Thread Collin Funk
nto the Makefile... Sorry about that. I attached the fix. Collin From 1f526466d4a2c54ea227e438c12127fc305c2a43 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 20 Feb 2024 12:16:40 -0800 Subject: [PATCH] maint.mk: Fix include header typo. top/maint.mk: Change arpa_inet.h to arpa/inet

Re: new modules for libunistring metadata

2024-02-20 Thread Collin Funk
On 2/20/24 4:15 PM, Bruno Haible wrote: > It's better if this metadata is generated from gen-uni-tables.c. This > eliminates a manual step. These patches do it. Would it make sense to provide a macro to check if the current version is greater than or equal to a given version? Or should that just

Re: new modules for libunistring metadata

2024-02-20 Thread Collin Funk
On 2/20/24 6:10 PM, Bruno Haible wrote: > For my feeling, there's too little added value in such a macro. > > Remember the costs of documenting a function or macro: > - The user needs more time to read the documentation. > - The developer needs to code and document it. Fair enough. I assume

[PATCH] gnulib-tool.py: Comment out undefined variable.

2024-02-21 Thread Collin Funk
he dummy module so I can start comparing the output while learning the code.From 6d94d65bfb0afc77c28b9c3a4633d156eb94906a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 21 Feb 2024 03:25:37 -0800 Subject: [PATCH] gnulib-tool.py: Comment out undefined variable. * pygnulib/GLTestDir.py (GLTest

Re: [PATCH] gnulib-tool.py: Comment out undefined variable.

2024-02-21 Thread Collin Funk
5 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 21 Feb 2024 08:54:51 -0800 Subject: [PATCH] gnulib-tool.py: Fix undefined variable while emitting testdir. * pygnulib/GLTestDir.py (GLTestDir.execute): Fix undefined variable refrence caused by commit 01cd78f9d682ff75cc5ab1c2d21b911bdd9215b8.

[PATCH] gnulib-tool.py: Improve output of testdir Makefile.am.

2024-02-21 Thread Collin Funk
-stringsFrom 159fec290bd19f20f98fce1de053cff2bc69d67d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 21 Feb 2024 12:21:24 -0800 Subject: [PATCH] gnulib-tool.py: Improve output of testdir Makefile.am. * pygnulib/GLEmiter.py (GLEmiter.tests_Makefile_am): Add 'all-notice' rule as dependency of 'all

Re: [PATCH] gnulib-tool.py: Improve output of testdir Makefile.am.

2024-02-21 Thread Collin Funk
On 2/21/24 4:10 PM, Bruno Haible wrote: > I'm a bit unhappy with this way of working. Your patches surely > go into the right direction, but I would prefer to receive them > 1) one by one, > 2) with the corresponding gnulib-tool.py.TODO entry removal. > Because if we don't keep track of which

Re: [PATCH] gnulib-tool.py: Improve output of testdir Makefile.am.

2024-02-21 Thread Collin Funk
out a part number. I wasn't sure if you wanted to continue them/restart since all of them are your patches from ~2 years ago. Feel free to add one if you would like and I'll see it before submitting another. Thanks, CollinFrom f6051b9bb07b5474879f4f462984b8a1f02aa221 Mon Sep 17 00:00:00 2001 From:

[PATCH] gnulib-tool.py: Fix function call on incorrect object.

2024-02-18 Thread Collin Funk
2a2ad90f52fde10df9929506fb Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 18 Feb 2024 16:52:45 -0800 Subject: [PATCH] gnulib-tool.py: Fix function call on incorrect object. * pygnulib/GLImport.py: Call checkInclTestCategory on the GLConfig member instead of the GLImport object itself.

Re: [PATCH] math: Silence -Winclude-next-absolute-path warning.

2024-02-17 Thread Collin Funk
On 2/17/24 2:51 AM, Bruno Haible wrote: > I also applied this patch, to complete > : Thanks, gettext warns a lot about that header. I'll submit a patch over there later today.

[PATCH] math: Silence -Winclude-next-absolute-path warning.

2024-02-17 Thread Collin Funk
. Thanks! CollinFrom 269dfab932a01cfbbb5382b8955f06d065eea149 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 17 Feb 2024 00:19:17 -0800 Subject: [PATCH] math: Silence -Winclude-next-absolute-path warning. See commit f4fccf8efdd09d5e38f49f6ae1962797ce3e8e9c for more information. * lib/math.c

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-19 Thread Collin Funk
Jim Meyering writes: > Thank you both. I've just pushed an improvement. > The new version runs grep only once rather than many times, and seems simpler. Thanks. This one seems much better. It also returns 1 if an invalid quoted header is found which I forgot to do. This Makefile would probably

Re: limits-h: Fix BOOL_MAX value

2024-02-12 Thread Collin Funk
On 2/12/24 5:09 AM, Bruno Haible wrote: > BOOL_WIDTH = 1, BOOL_MAX = 1 > with CC="gcc -std=gnu2x", but > BOOL_WIDTH = 8, BOOL_MAX = 1 > with CC="clang -std=gnu2x" (for all clang version 14 ... 17). Same results with GCC 14 and Clang 19. > Apparently I had misinterpreted the meaning of

Re: syntax-check rule to silence -Winclude-next-absolute-path warning

2024-02-18 Thread Collin Funk
9da067516c1ec7c2a23a203 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 18 Feb 2024 12:02:33 -0800 Subject: [PATCH] maint.mk: Add syntax-check rule to check for #include syntax. * top/maint.mk (sc_verify_absolute_include_headers): New rule to check for #includes that might cause -Winclud

Re: gnulib-tool.py: Fix some unbound variables.

2024-04-09 Thread Collin Funk
On 4/9/24 1:06 PM, Eric Blake wrote: > It does, since callable objects exist as first class citizens. For > example: Ah, I see. Thanks for the examples. Collin

Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Collin Funk
On 4/11/24 12:25 PM, Bruno Haible wrote: > Oh, this means that r'[x\$]' contains dollar and backslash, whereas the > programmer might have thought that it contains only the dollar? Indeed, > it's worth to listen to these warnings! I don't think it changes the meaning: import re

gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Collin Funk
al meaning dropped, so there is no need to backslash them. CollinFrom 5069a4633590a6f165c2ec650682c26d8db578b0 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 11 Apr 2024 11:00:47 -0700 Subject: [PATCH 1/2] gnulib-tool.py: Simplify regular expressions. * pygnulib/GLEmiter.py (GLEmiter.lib_M

Re: gnulib-tool.py: Optimize module set lookups

2024-04-11 Thread Collin Funk
Hi Bruno, On 4/11/24 12:51 PM, Bruno Haible wrote: > The func_transitive_closure function in the shell implementation can take > a lot of time. So I wondered whether in the Python implementation, there > is room for speedup at this place as well. And indeed, there is. Nice work. I noticed this

Re: gnulib-tool.py: Fix some unbound variables.

2024-04-10 Thread Collin Funk
the HACKING file. I meant to add information there earlier but got lazy... [1] https://docs.python.org/3/library/typing.html#annotating-callable-objects [2] https://github.com/microsoft/pyright CollinFrom 45a750586980579c44c14e5d95ac4434f2d61313 Mon Sep 17 00:00:00 2001 From: Collin Funk Date:

Re: gnulib-tool.py in gettext

2024-04-10 Thread Collin Funk
inFrom bdfd181f77bcc8f81f34fb81c3c356effc2add7a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 10 Apr 2024 05:56:34 -0700 Subject: [PATCH] gnulib-tool: Fix a typo. * gnulib-tool.sh: Fix a typo. * pygnulib/main.py (main): Likewise. --- ChangeLog| 6 ++ gnulib-tool.sh | 2 +- py

Re: gnulib-tool.py: Fix some unbound variables.

2024-04-10 Thread Collin Funk
attached the patch with the callable(module_filter) check. CollinFrom ff1164711c1397f0f76f6919b395ff132312864f Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 10 Apr 2024 08:24:58 -0700 Subject: [PATCH] gnulib-tool.py: Use function arguments instead of magic numbers. * pygnulib/GLEmiter.py (

Re: gnulib-tool.py: Refactor directory tree removals

2024-04-13 Thread Collin Funk
Hi Bruno, On 4/13/24 3:17 AM, Bruno Haible wrote: > +def rmtree(dest: str) -> None: > +'''Removes the file or directory tree at dest, if it exists.''' > +# These two implementations are nearly equivalent. > +# Speed: 'rm -rf' can be a little faster. > +# Exceptions: shutil.rmtree

Re: gnulib-tool.py in gettext

2024-04-12 Thread Collin Funk
inFrom be1f5c620cbf207038594c4718731a7927f1abfe Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 12 Apr 2024 18:34:49 -0700 Subject: [PATCH] gnulib-tool.py: Fix --copy-file directory creation. Reported by Bruno Haible in <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00140.html>

Refactoring rewrite_filename functions

2024-04-16 Thread Collin Funk
Hi Bruno, On 4/16/24 8:09 AM, Bruno Haible wrote: > I'm talking about this piece of code: > > filetable = [] > for src in filelist: > dest = self.rewrite_files([src])[-1] > filetable.append(tuple([dest, src])) > > which can be written as > >

Re: Refactoring rewrite_filename functions

2024-04-16 Thread Collin Funk
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

gnulib-tool.py: Make GLModule's __eq__ and __hash__ method agree.

2024-04-16 Thread Collin Funk
0.000 {built-in method builtins.hash} [1] https://docs.python.org/3/reference/datamodel.html#object.__hash__ CollinFrom f86f0505eade741af47a7cb5e603240ba5f03b9d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 16 Apr 2024 12:13:08 -0700 Subject: [PATCH] gnulib-tool.py: Make GLModule's

Re: gnulib-tool.py: Remove a redundant function.

2024-04-15 Thread Collin Funk
Hi Bruno, On 4/15/24 4:47 AM, Bruno Haible wrote: > No. I'm adding 3 unit tests that prove that the patch is wrong, > one for each of docbase, sourcebase, testsbase. (For auxdir and m4base > gnulib-tool.{sh,py} does not support changing the value while preserving > the rest: For auxdir the old

Re: gnulib-tool.py: Remove a redundant function.

2024-04-15 Thread Collin Funk
Hi Bruno, On 4/15/24 7:58 AM, Bruno Haible wrote: > Patch 0002 is not applicable because it relies on 0001, which was not good. Yes, I need to rewrite it. But I think the idea of the patch is still correct. Since it doesn't make sense to accept a list and then only use it with one element lists.

Simplified Python caching

2024-04-15 Thread Collin Funk
I was looking at the documentation for the Python standard library yesterday and discovered the 'lru_cache()' function [1]. Python 3.9 defines 'cache()' to be 'lru_cache(maxsize=None)' [2]. This is a simple cache doesn't require a list and keeping track of size for LRU replacements [3]. I was

gnulib-tool.py: Optimize directory creation.

2024-04-15 Thread Collin Funk
with self.testdir. I ran it without this and the directories were made in the current working directory, causing the tests to crash. [1] https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00245.html CollinFrom 709ff282c0093f696594810298bdc21c251489cd Mon Sep 17 00:00:00 2001 From: Collin Funk Date

gnulib-tool.py: Fix pylint 'attribute-defined-outside-init' warnings.

2024-04-16 Thread Collin Funk
b.git/tree/pygnulib/GLImport.py?id=64a7072ee8636c53bc2000505668bd0e33bb427e#n305 [3] https://git.savannah.gnu.org/cgit/gnulib.git/tree/pygnulib/GLImport.py?id=64a7072ee8636c53bc2000505668bd0e33bb427e#n1134 CollinFrom 583b0470f53a3ed707c3a809ac209747780fa490 Mon Sep 17 00:00:00 2001 From: Collin Funk Dat

gnulib-tool.py: Fix extra arguments to function call.

2024-04-13 Thread Collin Funk
' % basename) CollinFrom f0990590b62f0a5e18970643ac31c967b4a5f19d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 13 Apr 2024 10:09:17 -0700 Subject: [PATCH] gnulib-tool.py: Fix extra arguments to function call. * pygnulib/GLImport.py (GLImport.execute): Add the missing joinpath call on two

Re: gnulib-tool.py: Fix extra arguments to function call.

2024-04-13 Thread Collin Funk
On 4/13/24 10:12 AM, Collin Funk wrote: > diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py > index d44ceedcec..098bbc59ac 100644 > --- a/pygnulib/GLImport.py > +++ b/pygnulib/GLImport.py > @@ -1230,7 +1230,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix Also, I found

Improve 'git diff' of Python files.

2024-04-13 Thread Collin Funk
Hi Bruno, On 4/13/24 11:08 AM, Bruno Haible wrote: > That will be nice, indeed. Please, can you provide a patch (with a ChangeLog > entry)? Sure, I attached a patch. CollinFrom 9e2fcc6d5e8f30b402627cc73b7da1109c047249 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 13 Apr 2024 11

gnulib-tool.py: Don't use mutable default arguments.

2024-04-13 Thread Collin Funk
: 0} {'one': 0, 'two': 0, 'three': 0} To avoid this behavior we can set the default value of 'transformers' to None. Then in the body of __init__() we can set it to an empty dictionary if it is None. CollinFrom 07dcab221be80ca4d8dae4bfafc0dd80bff85c69 Mon Sep 17 00:00:00 2001 From: Collin Funk D

hash_delete safe to remove?

2024-04-13 Thread Collin Funk
A month or two ago I updated gnulib in GNU patch to fix some build failures. I also noticed some deprecation warnings from 'hash_delete' and changed them to 'hash_remove'. I forgot to ask here, but should this be removed now? Or bump the date? :) In lib/hash.c: /* Same as hash_remove. This

Re: hash_delete safe to remove?

2024-04-13 Thread Collin Funk
On 4/13/24 5:50 PM, Bruno Haible wrote: > Has there been an official 'patch' release that includes the change, > already? If not, it's too early: Some people (or distros) like to > take the git checkout of the latest release and rebuild the generated > files with the newest gnulib. There will be

Re: gnulib-tool.py: Fix pylint 'attribute-defined-outside-init' warnings.

2024-04-17 Thread Collin Funk
makes this GLFileAssistant local to GLImport.execute(). Since it is only used there I agree that it makes more sense. >> We already unnecessarily create a >> GLFileSystem that we don't need to [2] [3]. :) > > You're welcome to remove the unneeded property. In patch 0001 attached.

Re: gnulib-tool.py: Fix pylint 'attribute-defined-outside-init' warnings.

2024-04-17 Thread Collin Funk
s is a standard convention, but maybe we should add a note in main.py? Collin [1] https://pylint.readthedocs.io/en/stable/user_guide/messages/message_control.html#block-disablesFrom b41ca5909ffe95d49f00a654d0fbb6dea2092340 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 17 Apr 2024 16:20:3

gnulib-tool.py: Simplify data structures for dependencies.

2024-04-19 Thread Collin Funk
me module.getName() which are all used in various places... [1] https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00112.html CollinFrom 71ddeb2f8bee6788f83d7c78acf9bd417ddc2517 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 19 Apr 2024 11:32:44 -0700 Subject: [PATCH 1/

Re: beta-tester call draft

2024-04-19 Thread Collin Funk
On 4/19/24 5:22 PM, Bruno Haible wrote: > 5. Regenerate the fetched and generated files of your package. > Depending on the packge, this may be a command such as >$ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR Forgive me if this is a silly question, I have focused on

Re: gnulib-tool.py: Update authors list

2024-04-20 Thread Collin Funk
ow.com/a/9531279/23476799 CollinFrom 5468442826688f02b778b8fddbc4850255838c6e Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 19 Apr 2024 23:42:24 -0700 Subject: [PATCH] gnulib-tool.py: Remove duplicate per-module definitions. * pygnulib/constants.py: Remove duplicate __authors__, __lic

Re: gnulib-tool.py: Simplify data structures for dependencies.

2024-04-19 Thread Collin Funk
On 4/19/24 2:37 PM, Bruno Haible wrote: > You're right. Maybe Dmitry wanted to have the full data structure > available somewhere; but since the 'conditionals' and 'unconditionals' > tables contain the same info in a different way, it's redundant. > > I would leave it in, for possible future

gnulib-tool.py: Add a comment about coding style.

2024-04-18 Thread Collin Funk
to say they are unused. Patch 0002 adds a comment about "private" functions and instance variables to main.py. CollinFrom b3dce6e6d9548c21e0a6f98b2f5342c8b9dd413a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 18 Apr 2024 10:46:33 -0700 Subject: [PATCH 1/2] gnulib-tool.py: Remove s

Re: gnulib-tool.py: Fix pylint 'attribute-defined-outside-init' warnings.

2024-04-18 Thread Collin Funk
Hi Bruno, On 4/18/24 6:05 AM, Bruno Haible wrote: > The same holds for GCC, glibc, qemu, and many other project: They have > many open issues because the developers prioritize them. They nevertheless > depend on their users for reporting issues. Paul Eggert and I regularly > report issues in GCC,

gnulib-tool.py: Update type hints and docstring.

2024-04-20 Thread Collin Funk
rk fine. CollinFrom f1b179f77fb64aed33f40cdd8ad3bd7a2c83ba8d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 20 Apr 2024 19:47:28 -0700 Subject: [PATCH] gnulib-tool.py: Update type hints and docstring. * pygnulib/GLImport.py (GLImport.execute): Update transformer type hint to reflect change from sed e

gnulib-tool.py: Make temporary directories recognizable.

2024-04-21 Thread Collin Funk
testing my /tmp would be full of directories named with the template "tmp", which I assume gets used by other programs too. Thankfully that is less of an issue now since gnulib-tool.py crashes less... CollinFrom 68e59ded4b879011d2a8b3ff3b3342225dcdf312 Mon Sep 17 00:00:00 2001 Fro

gnulib-tool.py: Don't fail when given a bad module name.

2024-04-20 Thread Collin Funk
ing them. I also documented the meaning of a None return in GLModuleSystem.find() since this problem occurred in GLImport previously. CollinFrom f9ff066e21adcd12de167ceea5a4c64a1f012a6b Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 20 Apr 2024 20:29:44 -0700 Subject: [PATCH] gnulib-tool.py:

Re: gnulib-tool.py speedup

2024-04-20 Thread Collin Funk
Hi Bruno, On 4/20/24 3:50 PM, Bruno Haible wrote: > On Linux: On Cygwin 2.9.0: > > in create-tests: time ./test-all.sh in create-tests: time > ./test-all.sh > sh: 1225 secsh: 27406 sec > py: 155 sec

Re: gnulib-tool.py speedup

2024-04-20 Thread Collin Funk
On 4/20/24 4:50 PM, Bruno Haible wrote: > What I measure (with "GNULIB_TOOL_IMPL=sh time ./test-create-testdir-1.sh") > is: > dash 22 sec > bash 20 sec dash 31 sec bash 28 sec Similar here. Looks like my desktop is just older than I remembered originally. > I think that 'dash' is

Re: GNU gnulib: calling for beta-testers

2024-04-22 Thread Collin Funk
Hi Paul, On 4/22/24 12:56 AM, Paul Eggert wrote:> export GNULIB_TOOL_IMPL=sh+py > ./bootstrap > ./configure > make -k distclean > git submodule foreach git pull origin master > git commit -m 'build: update gnulib submodule to latest' gnulib > ./bootstrap --no-git

diffutils __pycache__ failure.

2024-04-22 Thread Collin Funk
On 4/22/24 1:23 AM, Collin Funk wrote: > It looks like it can be turned off with 'python3 -B' or setting the > PYTHONDONTWRITEBYTECODE environment variable to a non-empty string [1] > [2]. I was able to reproduce the issue. Modifying the 'gnulib-tool.py' shell script in the 'gnulib' sub

Re: GNU gnulib: calling for beta-testers

2024-04-22 Thread Collin Funk
On 4/22/24 4:22 AM, Bruno Haible wrote: > The first workaround should fix trouble similar to what we regularly > see with 'autom4te.cache': Unnecessary difference while comparing source > trees, unnecessary "git status" noise. Clutter. I don't think the Python stuff should clutter 'git status'

Re: gnulib-tool.py: Use absolute imports consistently.

2024-04-22 Thread Collin Funk
inFrom 96b746aca8cd77c121ffd4b4343e1b37aec1f745 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 22 Apr 2024 17:57:52 -0700 Subject: [PATCH] gnulib-tool.py: Make better use of imports. * pygnulib/*.py: Import functions from constants.py directly instead of assigning them to module-specific va

Re: diffutils __pycache__ failure.

2024-04-22 Thread Collin Funk
On 4/22/24 4:38 AM, Bruno Haible wrote: > Collin Funk wrote: >> I have no clue if this has a noticeable performance impact or not. > > Can you measure it, please? For example, with > GNULIB_TOOL_IMPL=py time ./test-all.sh > > I measure a difference in the 2% range,

Re: Update HACKING

2024-04-23 Thread Collin Funk
On 4/23/24 10:03 AM, Paul Eggert wrote: > I use 'git format-patch' and then read the patch; this works > reasonably well for me. gitk is nice, but can be a hassle if I'm in > Emacs or logged in remotely. I do the same, but also regenerate the patch before submitting because I am paranoid of

Re: new committer questions

2024-04-23 Thread Collin Funk
Hi Bruno, On 4/23/24 8:34 AM, Bruno Haible wrote: > Regarding the git repository: When it appears to not respond, you can > - see whether it's a planned maintenance, at > https://hostux.social/@fsfstatus > - or ask the savannah admins on IRC (host libera.chat, channel #savannah). Thanks!

Re: gnulib-tool.py: Use absolute imports consistently.

2024-04-23 Thread Collin Funk
Hi Bruno, On 4/23/24 8:37 AM, Bruno Haible wrote: > I also checked the effect on the warnings in Eclipse: No new warnings, > and 1 existing "unused import" warning is fixed. > > The patch is OK to push. Done. Thanks! Collin

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-23 Thread Collin Funk
Hi Bruno, On 4/19/24 3:12 PM, Bruno Haible wrote: > The reason is that on this system, the function 'memset_s' exists in libc, > but is only declared (in /usr/include/iso/string_iso.h) if __EXT1_VISIBLE > is set. __EXT1_VISIBLE is defined by if > __STDC_WANT_LIB_EXT1__ is defined to non-zero at

Re: Simplified Python caching

2024-04-15 Thread Collin Funk
Hi Bruno, On 4/15/24 11:24 AM, Bruno Haible wrote: > It's better to not do it, and keep the code as-is. That is fine with me. Though I will offer my perspective on some of your reasonings. Similar considerations to a previous thread [1]. > * As I already mentioned, it's good to keep the code

Re: gnulib-tool.py: Stop using codecs.open

2024-04-14 Thread Collin Funk
Hi Bruno, On 4/14/24 3:16 PM, Bruno Haible wrote: > I verified that on Cygwin, the test suite passes; this is because > - Cygwin programs produce LF as line terminator, > - Python's platform.system() returns "CYGWIN_NT-10.0". > > Regarding native Windows, I don't think there's a realistic

gnulib-tool.py: Remove some unused variables.

2024-04-14 Thread Collin Funk
unconditionally, the None is never used. CollinFrom 1d7f51cf310ac6ffbf531a85ddeda124f075630b Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 14 Apr 2024 09:37:17 -0700 Subject: [PATCH] gnulib-tool.py: Remove some unused variables. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Remove

Re: gnulib-tool.py: Stop using codecs.open

2024-04-14 Thread Collin Funk
hive/html/bug-gnulib/2024-03/msg00370.html CollinFrom fbdd4e7783b8a4b6e637bac2b392024b0e880622 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 14 Apr 2024 10:18:03 -0700 Subject: [PATCH 1/2] gnulib-tool.py: Don't perform newline conversions. * pygnulib/constants.py (nlconvert): Remove function.

gnulib-tool.py: Fix incorrect type hint.

2024-04-14 Thread Collin Funk
str" [arg-type] pygnulib/GLModuleSystem.py:612: error: Argument 2 has incompatible type "list[str]"; expected "str" [arg-type] [1] https://mypy.readthedocs.io/en/stable/ CollinFrom bbedce3f21422bfd9058f33bfaab3d4eac421631 Mon Sep 17 00:00:00 2001 From: Collin Funk Date:

gnulib-tool.py: Remove a redundant function.

2024-04-14 Thread Collin Funk
ec3d2f70a06e93b6cd730dd1f3629d5a6ad386fc Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 14 Apr 2024 18:09:39 -0700 Subject: [PATCH] gnulib-tool.py: Remove a redundant function. * pygnulib/GLImport.py (GLImport.rewrite_old_files): Remove function. (GLImport.rewrite_new_files): Rename to rewrite_files. (GLImport.prepare): Use

Re: gnulib-tool.py in jugtail

2024-04-12 Thread Collin Funk
On 4/12/24 5:08 AM, Bruno Haible wrote: > OK, if you want to rework this part, we need unit tests for it first. > I have now added unit tests for the gnulib-cache.m4 handling; essentially, > one test for each possible option. > > Before dealing with the 'jugtail' package, it would be good to make

Re: argp --help formatting bug with non-ASCII characters

2024-04-12 Thread Collin Funk
reak things. CollinFrom 0f18bb3f38e4189a4f164d716fe411f7a3a868cf Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 12 Apr 2024 08:55:48 -0700 Subject: [PATCH] argp: Fix alignment of option doc strings. Reported by Lasse Collin in <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00179.h

Re: argp --help formatting bug with non-ASCII characters

2024-04-12 Thread Collin Funk
Hi Bruno, On 4/12/24 10:19 AM, Bruno Haible wrote: > So, my feeling would be that the first thing to do is to create a new > unit test for it: > 1. so that we don't need to build and try GNU tar in order to see > whether there is a regression in the future, > 2. so as to cover the tricky

Re: gnulib-tool.py: Remove a redundant function.

2024-04-14 Thread Collin Funk
On 4/14/24 6:23 PM, Collin Funk wrote: > Also, I noticed we have: > > for src in old_files: > dest = self.rewrite_files([src])[-1] > old_table.append(tuple([dest, src])) > > This is looping over a list, creating a new list wit

Re: gnulib-tool.py: Remove some unused instance variables.

2024-04-26 Thread Collin Funk
Hi Bruno, On 4/26/24 2:20 AM, Bruno Haible wrote: > However, please hold pushing patches for the next 3 days. I will be > posting the announcement of the faster gnulib-tool in the next few > hours; therefore I expect that several GNU package maintainers will > give it a try for the first time in

gnulib-tool.py: Remove some unused instance variables.

2024-04-26 Thread Collin Funk
Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 26 Apr 2024 01:58:09 -0700 Subject: [PATCH] gnulib-tool.py: Remove some unused instance variables. * pygnulib/GLTestDir.py (GLMegaTestDir.__init__): Don't define instance variables that are never used. --- ChangeLog | 6

Re: WIP patch to reduce rewrite_filename duplication

2024-04-25 Thread Collin Funk
On 4/25/24 5:14 PM, Bruno Haible wrote: > Yes, the other heuristic is that when many functions operate on the > same object, like methods in class do, the pointer to that object > is often passed first. And, as you noticed, the two heuristics collide... > > Here, I would not think of

Re: WIP patch to reduce rewrite_filename duplication

2024-04-25 Thread Collin Funk
34bb1a01b Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 25 Apr 2024 15:30:29 -0700 Subject: [PATCH] gnulib-tool.py: Reduce code duplication in file name transformations. * pygnulib/functions.py: New file for shared functions between modules. Add a function based on functions removed from

test-sprintf-posix and test-snprintf-posix test failures

2024-04-26 Thread Collin Funk
I see two similar test failures for test-sprintf-posix and test-sprintf-posix on Fedora 40, gcc 14, glibc 2.39. Using: $ ./gnulib-tool --create-testdir --dir testdir sprintf-posix snprintf-posix $ cd testdir $ ./configure $ make check The following tests fail: ./../build-aux/test-driver: line

Re: gnulib-tool: Use the Python implementation by default

2024-04-26 Thread Collin Funk
's worth I thought it was already mature, but the v0.1 to v1.0 jump makes my work feel more important so I'm happy with it. :) > Many thanks to Dmitry Selyutin for the ground work in 2012, and to Collin Funk > for the finishing work in the last two months! Many thanks to Dmitry to doing most of th

Re: test-sprintf-posix and test-snprintf-posix test failures

2024-04-27 Thread Collin Funk
Hi Bruno, On 4/26/24 10:51 PM, Bruno Haible wrote: > welcome to the daily business of Gnulib test failures and workarounds! Thanks for the welcome! I would have worked a bit harder and tried to come up with a patch, but I am not very familiar with the wide character and multibyte string

Re: gnulib-tool: Use the Python implementation by default

2024-04-27 Thread Collin Funk
On 4/27/24 11:49 AM, Bruno Haible wrote: > - In many older systems, 'python3' exists and 'python' exists as well and is > a 2.7.x version. > > I have not seen a single system where 'python' exists, is version 3, and > 'python3' does not exist. There is this PEP which came about with the

Re: gnulib-tool.py --create-megatestdir bug

2024-04-27 Thread Collin Funk
Hi Bruno, On 4/27/24 8:48 AM, Bruno Haible wrote: > Could you please look at this one? I created a megatestdir for some > portability testing, with gnulib-tool.py (of course), and it failed > on macOS: Thanks for the report! I can reproduce it. I have only had a brief look and it looks like

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Collin Funk
On 4/24/24 11:06 AM, Bruno Haible wrote: >> $ env GNULIB_TOOL_IMPL=py gnulib-tool --create-testdir --dir testdir1 fstatat >> $ cd testdir1 >> $ ./configure --enable-silent-rules >> $ make 2>&1 | grep '__STDC_WANT_LIB_EXT1__' | wc -l >> 354 > > I don't reproduce this. What are your CPPFLAGS and

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Collin Funk
Hi Simon, On 4/24/24 6:22 AM, Simon Josefsson wrote: > I think this was fairly common before. If there had been a 'make > syntax-check' rule for this, we would have caught it! I have removed > use of HAVE_CONFIG_H and fixed telnetd.h in Inetutils now, thanks. Thanks! It showed up from some

gnulib-tool.py: Add a new GLFileTable class.

2024-04-24 Thread Collin Funk
Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 24 Apr 2024 16:04:25 -0700 Subject: [PATCH] gnulib-tool.py: Add a new GLFileTable class. * pygnulib/GLFileTable.py: New file. Define the GLFileTable class with five attributes which can be individually typed. * pygnulib/GLTestDir.py (GLTestDir.e

WIP patch to reduce rewrite_filename duplication

2024-04-24 Thread Collin Funk
Any opinions on these ideas? If not, I will probably sleep on it and push an improved patch. CollinFrom 3d937ef8f553e91183d10e6bb328a47f4dfa539d Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 24 Apr 2024 22:36:56 -0700 Subject: [PATCH] gnulib-tool.py: Reduce code duplication in filename tr

Re: gnulib-tool.py: Add a new GLFileTable class.

2024-04-25 Thread Collin Funk
On 4/25/24 1:11 AM, Bruno Haible wrote: > Interesting syntax. This makes the class easier to understand. You're welcome > to do the same thing with the other classes (except for GLError.message, which > is private to a single method). I agree. I originally wanted to add it to GLModuleTable when I

Re: WIP patch to reduce rewrite_filename duplication

2024-04-25 Thread Collin Funk
Hi Bruno, Thank you for the detailed explanations as always. On 4/25/24 1:48 AM, Bruno Haible wrote: > Object-oriented programming is not easy, and it comes with constant > hesitations and deliberations. :) My least favorite part of my degree was object-oriented design and database

[PATCH] HACKING: Fix a typo.

2024-04-25 Thread Collin Funk
* HACKING: Add missing 't' to platforms. --- ChangeLog | 5 + HACKING | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8d1e0e981b..e635e316b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-04-25 Collin Funk + + HACKING

Re: GNULIB_REVISION

2024-04-25 Thread Collin Funk
On 4/25/24 10:00 AM, Paul Eggert wrote: > Is there some way to cajole 'git clone' into using less memory, with a > '--depth 1' or similar options? Cloning shallowly would clone Gnulib a > lot faster, if you're cloning from a remote repository. Maybe '--single-branch' would help too. If space is

Re: memset_explicit: Fix compilation error on some OpenSolaris derivatives

2024-04-24 Thread Collin Funk
Hi Paul, On 4/23/24 11:22 PM, Paul Eggert wrote: > Why is telnetd.h including config.h? Only a top-level C file should > include config.h, and it should so so at the start. I don't disagree. Most of those lines are 20 years old, so I assume it wasn't a problem then. Though I do wonder how common

Re: gnulib-tool.py in wget

2024-04-11 Thread Collin Funk
Hi Bruno, On 4/10/24 5:07 AM, Bruno Haible wrote: > The reason is a different order of the languages in LINGUAS. > gnulib-tool.sh uses > LC_ALL=C ls -1 *.po | sed -e 's,\.po$,,' > which produces sorted output. Whereas GLImport.py uses > for file in os.listdir(joinpath(destdir, pobase)) >

Re: gnulib-tool.py in jugtail

2024-04-11 Thread Collin Funk
On 4/10/24 7:23 PM, Bruno Haible wrote: > $ cat ../glpyFfCgil-sh-err > .../gnulib-tool.sh: *** missing --doc-base option. --doc-base has been > introduced on 2006-07-11; if your last invocation of 'gnulib-tool > --import' is before that date, you need to run 'gnulib-tool --import' > once, with

Re: gnulib-tool.py in wget

2024-04-11 Thread Collin Funk
On 4/11/24 3:51 AM, Bruno Haible wrote: > => Applied. Thanks. Nice! Thanks for writing the ChangeLog entry. Collin

Re: gnulib-tool.py in jugtail

2024-04-12 Thread Collin Funk
Hi Bruno, On 4/12/24 3:28 PM, Bruno Haible wrote: > I am applying these two refactorings. Hope it makes this piece of code > easier to understand. Thanks! It looks like you got all the cache tests passing. Nice work. Collin

Re: gnulib-tool.py: Make data structures more clear.

2024-04-16 Thread Collin Funk
On 4/16/24 9:06 AM, Collin Funk wrote: > Patch 0001 changes GLModuleTable's unconditionals member from a > dictionary to a set. Forgot attachments, oops. CollinFrom be8c8ce23d090269f52124630b1b0b4d6034052e Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 16 Apr 2024 08:21:27 -0700 S

Re: gnulib-tool.py: Remove a redundant function.

2024-04-16 Thread Collin Funk
Hi Bruno, On 4/16/24 8:09 AM, Bruno Haible wrote: > I'm talking about this piece of code: > > filetable = [] > for src in filelist: > dest = self.rewrite_files([src])[-1] > filetable.append(tuple([dest, src])) > > which can be written as > >

gnulib-tool.py: Make data structures more clear.

2024-04-16 Thread Collin Funk
Patch 0001 changes GLModuleTable's unconditionals member from a dictionary to a set. Since we only use it to check membership in GLModuleTable.addConditional() it is effectively a set anyways. Then in GLModuleTable.addUnconditional() we have: self.unconditionals.add(str(module)) instead

Re: Simplified Python caching

2024-04-16 Thread Collin Funk
Hi Bruno, On 4/16/24 8:47 AM, Bruno Haible wrote: > Yes, they _can_ be made static, but they can also be left as-is. And so, > as a developer, you start to spend time considering whether to make a > function static or not. That time is not well spent. We are in agreement there. PyCharm gives

Re: gnulib-tool.py: Update authors list

2024-04-19 Thread Collin Funk
Hi Bruno, On 4/19/24 8:49 AM, Bruno Haible wrote: > This patch changes the './gnulib-tool.py --version' output to end like this: > > Written by Bruno Haible, Paul Eggert, Simon Josefsson, Dmitry Selyutin, and > Collin Funk. Thanks. I think I can consider myself famous now

Re: gnulib-tool.py: Simplify running some commands in a given directory

2024-04-19 Thread Collin Funk
On 4/19/24 9:24 AM, Bruno Haible wrote: > This patch optimizes some subprocess invocations. > > I did not change the os.chdir calls around larger blocks of code. Looks good. I had a look at doing this previously but in GLTestDir for example, we use 'constants.execute' to deal with the:

Re: gnulib-tool.py: Don't fail when given a bad module name.

2024-04-21 Thread Collin Funk
Hi Bruno, On 4/21/24 4:37 AM, Bruno Haible wrote: > The former makes an implicit statement that the function is searching > for the file. The latter does not; it does not say or hint to as what > function internally does. Thus it is better to use the latter wording. Agreed, thanks for the change

  1   2   3   4   5   6   >