Skip to content

chore: untrack compiled bytecode - #20

Merged
srpatcha merged 1 commit into
masterfrom
chore/untrack-compiled-bytecode
Sep 1, 2026
Merged

srpatcha merged 1 commit into
masterfrom
chore/untrack-compiled-bytecode

Conversation

@srpatcha

Copy link
Copy Markdown
Member

Closes #19.

194 .pyc files are tracked. .gitignore already lists __pycache__/ and
*.pyc, but it has no effect on files that are already tracked — the rule was
added after these were committed and has been doing nothing for them since.

Running the suite once rewrites them, so the working tree is dirty immediately
after any normal action:

$ pytest -q
1648 passed
$ git status --porcelain | wc -l
180

180 modified files, none of them source. Every contributor sees this on a clean
checkout the moment they run the tests. It makes git status useless for its
purpose, and a real edit sitting among 180 bytecode changes is easy to miss —
including on the way into a commit, where git add -A sweeps the lot in.

The tracked bytecode is cpython-312; this machine runs 3.14, so it is
regenerated rather than reused. It was not serving as a cache for anyone.

No other Python repository in the organisation tracks any — EoStudio, ebuild,
eDB and eApps are all at zero.

Verified

git rm --cached only. Nothing leaves the disk, and no source file is touched:

staged removals       194
non-pyc among them      0
.pyc still on disk    440

Suite unchanged: 1648 passed, 0 failed before and after.

Branches from master and is independent of #16 and #18, so it can merge in any
order relative to them.

194 .pyc files are tracked. .gitignore already lists __pycache__/ and *.pyc,
but .gitignore has no effect on files that are already tracked, so the rule
was added after these were committed and has been doing nothing for them
since.

Running the suite once rewrites them, so the working tree is dirty
immediately after any normal action:

    $ pytest -q
    1648 passed
    $ git status --porcelain | wc -l
    180

180 modified files, none of them source. Every contributor sees this on a
clean checkout the moment they run the tests. It makes git status useless
for its purpose, and a real edit sitting among 180 bytecode changes is easy
to miss — including on the way into a commit, where git add -A sweeps the
lot in.

The tracked bytecode is cpython-312 and this machine runs 3.14, so it is
regenerated rather than reused. It was not serving as a cache for anyone.

No other Python repository in the organisation tracks any: EoStudio, ebuild,
eDB and eApps are all at zero.

git rm --cached only. Nothing leaves the disk — 440 .pyc files are still
there and still regenerate on import — and no source file is touched:

    staged removals      194
    non-pyc among them     0

Suite unchanged at 1648 passed, 0 failed.

Closes #19

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@srpatcha
srpatcha requested a review from hshanmug12 as a code owner August 30, 2026 13:56
@srpatcha
srpatcha merged commit f4b221a into master Sep 1, 2026
13 of 15 checks passed
@srpatcha
srpatcha deleted the chore/untrack-compiled-bytecode branch September 1, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

194 tracked .pyc files leave the working tree dirty after every test run

1 participant