Skip to content

Rename Pythonwin folder to pythonwin, matching the final module name#2738

Merged
Avasam merged 2 commits into
mhammond:mainfrom
Avasam:Rename-`Pythonwin`-folder-to-`pythonwin`,-matching-the-final-module-name
May 4, 2026
Merged

Rename Pythonwin folder to pythonwin, matching the final module name#2738
Avasam merged 2 commits into
mhammond:mainfrom
Avasam:Rename-`Pythonwin`-folder-to-`pythonwin`,-matching-the-final-module-name

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Apr 27, 2026

Do not squash merge !

This PR is intended to be in multiple commits. There's content changes in only 15 files.

  1. A simple git mv Pythonwin pythonwin
  2. Adding an entry to .git-blame-ignore-revs and doing the actual manual content changes

This is a follow-up to #2735 . But instead of updating lower-case pythonwin to match the current folder, I made Pythonwin in-source folder lower-case.

The reasoning is that this now matches 1-to-1 the source to the published wheel and module name import pythonwin.

This changes nothing for regular Windows native builds. Still fixes path issues for case-sensitive systems, and makes it easier to not have to think "Is this referencing the source folder Pythonwin or the distributed folder pythonwin"

image

@Avasam Avasam requested a review from mhammond April 27, 2026 20:51
@Avasam Avasam force-pushed the Rename-`Pythonwin`-folder-to-`pythonwin`,-matching-the-final-module-name branch from e883452 to 86d7334 Compare April 27, 2026 21:04
@Avasam Avasam force-pushed the Rename-`Pythonwin`-folder-to-`pythonwin`,-matching-the-final-module-name branch from 86d7334 to 5955fa4 Compare May 4, 2026 03:12
@mhammond
Copy link
Copy Markdown
Owner

mhammond commented May 4, 2026

I'm slightly reluctant here as some vcs are likely to get upset.

@Avasam
Copy link
Copy Markdown
Collaborator Author

Avasam commented May 4, 2026

I'm slightly reluctant here as some vcs are likely to get upset.

If you have concerns about path move/file rename + content change confusing git: That's why I'm keeping those in 2 different commits.
If the concern is that someone's local path may stay uppercase: That shouldn't cause any issue for anyone on Windows (or more generally, a case-agnostic filesystem). MinGW users are already dealing with a mess of other issues anyway.
The shipped wheel is completely unchanged (pythonwin/pywin --> pythonwin/pywin)

worst case scenario, a contributor can re-clone the repo if they're having a very weird edge case they can't fix. (something like they unknowingly configured their git to care about folder casing, but the rename isn't being applied on checkout, not sure if an actual issue, just a hypothetical)

@mhammond
Copy link
Copy Markdown
Owner

mhammond commented May 4, 2026

I personally hit this regularly in repos that rename files on disk. Splitting it across commits has never helped me. It is a mild inconvenience and rarely requires a full re-clone, although on the other side of the coin:

worst case scenario, a contributor can re-clone the repo

What's the worst case scenario of not taking this?

@Avasam
Copy link
Copy Markdown
Collaborator Author

Avasam commented May 4, 2026

of not taking this?

You mean not taking this PR?

The alternative is I have to change some code strings from pythonwin to Pythonwin (ie, the inverse of the second commit here). And there's a bit of extra mental overhead having to figure out if we're referencing the source code folder, or the distributed one.

Not against doing it, but I did want to first offer what I felt was the more "correct" change.

Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this is better I agree. And my issue is really because I use jj instead of git, which doesn't handle that well. So yeah, ok :)

@Avasam
Copy link
Copy Markdown
Collaborator Author

Avasam commented May 4, 2026

Oh interesting, and looking at their tracker I found a related issue... that you happen to already have commented on ! jj-vcs/jj#1737
I went and upvoted it.

@Avasam Avasam mentioned this pull request May 4, 2026
@Avasam Avasam merged commit 8412f31 into mhammond:main May 4, 2026
28 checks passed
@Avasam Avasam deleted the Rename-`Pythonwin`-folder-to-`pythonwin`,-matching-the-final-module-name branch May 4, 2026 05:53
@Avasam Avasam added the MinGW label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants