Skip to content

gitignore, folder fix, like __pycache__ #5762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2025
Merged

Conversation

Undersk0re
Copy link
Contributor

@Undersk0re Undersk0re commented Apr 30, 2025

Fix the path for better usability. We can clean the __pycache__ directory instead of using the downloaded one. It can sometimes cause errors

@arihant2math arihant2math added the skip:ci Skip running the ci label Apr 30, 2025
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

I agree to the changes because the lines intends to point directories.

But I didn't get what you meant by below. Could you explain it more?

We can clean the pycache directory instead of using the downloaded one.

@Undersk0re
Copy link
Contributor Author

It's better to make sure the pycache folder is empty, to avoid the risk of cache state being shared between multiple users

@youknowone
Copy link
Member

Could you tell me more details? I cannot imagine any difference before and after about current setting can make shared cache. I know / prefix notate the strict directory, but no idea how it goes further like that.

@Undersk0re
Copy link
Contributor Author

If the pycache folder is unintentionally shared on Git, it can be downloaded by multiple users who might read someone else's cache or mistakenly consider it their own.

@youknowone
Copy link
Member

Yes, I got that point. That's why __pycache__ was in .gitignore. I wonder what is the additional "better usability" by this change.

@Undersk0re
Copy link
Contributor Author

Undersk0re commented May 2, 2025

To exclude a folder (anywhere in the project), use: folder/ (for Linux, Windows and macOS , Git is platform-independent in this context)

...if this is the right answer for the question

@youknowone
Copy link
Member

That's not the answer for the question. __pycache__ is already in the .gitignore file. Directory notation narrow the filter down only to directory, to allow __pycache__ file to be added to git.
I doubt this change give any kind of "better usability" as described in the PR body in practical scenario. Please leave a comment if you can make one.

I merge this not for better usability but to describe the gitignore intention better they were expected to be directory.

@youknowone youknowone merged commit 6aa80aa into RustPython:main May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip:ci Skip running the ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants