X Tutup
Skip to content

gh-126014: test_makefile_test_folders: Ignore basically-empty directories#140466

Merged
vstinner merged 2 commits intopython:mainfrom
stefanor:test-empty-dir
Jan 27, 2026
Merged

gh-126014: test_makefile_test_folders: Ignore basically-empty directories#140466
vstinner merged 2 commits intopython:mainfrom
stefanor:test-empty-dir

Conversation

@stefanor
Copy link
Contributor

@stefanor stefanor commented Oct 22, 2025

The code in test_makefile was attempting to ignore any any non-interesting files, but missed some corners:

  1. There is never a file called __pycache__.
  2. A directory containing only a __pycache__ subdirectory should be ignored.
  3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty lists.

Bisecting across the removal of Lib/test/support/interpreters/ is likely to trigger this bug.

…irectories

The code in test_makefile was attempting to ignore any any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
@vstinner vstinner merged commit 17d447e into python:main Jan 27, 2026
51 checks passed
@vstinner vstinner added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 27, 2026
@miss-islington-app
Copy link

Thanks @stefanor for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @stefanor for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 27, 2026
…irectories (pythonGH-140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
(cherry picked from commit 17d447e)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 27, 2026
…irectories (pythonGH-140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
(cherry picked from commit 17d447e)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
@bedevere-app
Copy link

bedevere-app bot commented Jan 27, 2026

GH-144268 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jan 27, 2026
@bedevere-app
Copy link

bedevere-app bot commented Jan 27, 2026

GH-144269 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jan 27, 2026
@vstinner
Copy link
Member

Merged, thanks for the fix.

vstinner pushed a commit that referenced this pull request Jan 27, 2026
…directories (GH-140466) (#144268)

gh-126014: test_makefile_test_folders: Ignore basically-empty directories (GH-140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
(cherry picked from commit 17d447e)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
vstinner pushed a commit that referenced this pull request Jan 27, 2026
…directories (GH-140466) (#144269)

gh-126014: test_makefile_test_folders: Ignore basically-empty directories (GH-140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
(cherry picked from commit 17d447e)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
@stefanor stefanor deleted the test-empty-dir branch January 27, 2026 11:57
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…irectories (python#140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup