gha-utils 4.17.7__py3-none-any.whl → 4.17.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gha-utils might be problematic. Click here for more details.

gha_utils/__init__.py CHANGED
@@ -17,4 +17,4 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- __version__ = "4.17.7"
20
+ __version__ = "4.17.9"
gha_utils/cli.py CHANGED
@@ -165,7 +165,7 @@ def metadata(ctx, unstable_targets, format, overwrite, output_path):
165
165
  # Extract targets from the raw string provided by the user.
166
166
  valid_targets = set()
167
167
  if unstable_targets:
168
- for target in re.split("[^a-z0-9\-]", unstable_targets.lower()):
168
+ for target in re.split(r"[^a-z0-9\-]", unstable_targets.lower()):
169
169
  if target:
170
170
  if target not in NUITKA_BUILD_TARGETS:
171
171
  logging.fatal(
gha_utils/metadata.py CHANGED
@@ -687,14 +687,40 @@ class Metadata:
687
687
 
688
688
  @staticmethod
689
689
  def glob_files(*patterns: str) -> Iterator[Path]:
690
- """Glob files in patterns, while optionally ignoring some."""
691
- yield from map(
692
- Path,
693
- iglob(
694
- patterns,
695
- flags=NODIR | GLOBSTAR | DOTGLOB | GLOBTILDE | BRACE | FOLLOW | NEGATE,
696
- ),
697
- )
690
+ """Return all file path matching the ``patterns``.
691
+
692
+ Patterns are glob patterns supporting ``**`` for recursive search, and ``!``
693
+ for negation.
694
+
695
+ All directories are traversed, whether they are hidden (i.e. starting with a
696
+ dot ``.``) or not, including symlinks.
697
+
698
+ Returns both hidden and non-hidden files, but no directories.
699
+
700
+ All files are normalized to their absolute path, so that duplicates produced by
701
+ symlinks are ignored.
702
+
703
+ Files that doesn't exist and broken symlinks are skipped.
704
+ """
705
+ seen = set()
706
+ for file_path in iglob(
707
+ patterns,
708
+ flags=NODIR | GLOBSTAR | DOTGLOB | GLOBTILDE | BRACE | FOLLOW | NEGATE,
709
+ ):
710
+ # Normalize the path to avoid duplicates.
711
+ try:
712
+ normalized_path = Path(file_path).resolve(strict=True)
713
+ # Skip files that do not exist or broken symlinks.
714
+ except OSError:
715
+ logging.warning(
716
+ f"Skipping non-existing file / broken symlink: {file_path}"
717
+ )
718
+ continue
719
+ if normalized_path in seen:
720
+ logging.debug(f"Skipping duplicate file: {normalized_path}")
721
+ continue
722
+ seen.add(normalized_path)
723
+ yield normalized_path
698
724
 
699
725
  @cached_property
700
726
  def gitignore_exists(self) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gha-utils
3
- Version: 4.17.7
3
+ Version: 4.17.9
4
4
  Summary: ⚙️ CLI helpers for GitHub Actions + reuseable workflows
5
5
  Author-email: Kevin Deldycke <kevin@deldycke.com>
6
6
  Project-URL: Homepage, https://github.com/kdeldycke/workflows
@@ -1,14 +1,14 @@
1
- gha_utils/__init__.py,sha256=dFsPTSBN91em6OnZXL66jLt2NV20RxPU8bd2LZamLio,866
1
+ gha_utils/__init__.py,sha256=USpmOfv62pqoE9bNW_qKSAekPiCNcPTqNFgpuPn6BtQ,866
2
2
  gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
3
  gha_utils/changelog.py,sha256=JR7iQrWjLoIOpVNe6iXQSyEii82_hM_zrYpR7QO_Uxo,5777
4
- gha_utils/cli.py,sha256=dj_n4ouQRNVzt5e9793sYsldaub1IgzFi6sEfA-kg-A,15295
4
+ gha_utils/cli.py,sha256=1xx7gG0fXwqHQJSQWzBLEKO1p9rAnFnkcuPnmqPS5M4,15296
5
5
  gha_utils/mailmap.py,sha256=g3LQiPNjHsAgCbEYOJcQwdlXqxzmFh697vv2sxHZq-s,7014
6
6
  gha_utils/matrix.py,sha256=_afJD0K-xZLNxwykVnUhD0Gj9cdO0Z43g3VHa-q_tkI,11941
7
- gha_utils/metadata.py,sha256=CGULj_-p48746gtLtiSpPTDaWQy3behFqsEwjrKj7og,51250
7
+ gha_utils/metadata.py,sha256=o7vyW8d97PGtoGZ1pyvJQbeKl86mRRfbxJnEo5dxUos,52322
8
8
  gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  gha_utils/test_plan.py,sha256=AE8Mf1vSQG5EZTytoTts-gzMwUg2Zy21gUwkMlzXT94,13394
10
- gha_utils-4.17.7.dist-info/METADATA,sha256=lLpftTKJ4cuOMDb7VqxzCdJFEXw8QZLF3pFB2TaOqJ4,21260
11
- gha_utils-4.17.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- gha_utils-4.17.7.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
13
- gha_utils-4.17.7.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
14
- gha_utils-4.17.7.dist-info/RECORD,,
10
+ gha_utils-4.17.9.dist-info/METADATA,sha256=xcDI8qdaaaJGxnW8DrV6ImnZkrYzWQ1QBit9-WgVmW4,21260
11
+ gha_utils-4.17.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ gha_utils-4.17.9.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
13
+ gha_utils-4.17.9.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
14
+ gha_utils-4.17.9.dist-info/RECORD,,