-
Notifications
You must be signed in to change notification settings - Fork 91
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
[WIP] Make fake filesystem, fake os
and fake os.path
respect additional_skip_names
#1025
Conversation
This is mostly brainstorm material to see if we want to go in this direction. Implementation details:
It is working for Python 3.12, 3.11 and mostly 3.10, but 3.9, 3.8 and 3.7 have yet different internals for pathlib. |
@mrbean-bremen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - as noted, I like that approach. There will be some work to do for the other Python versions (I don't think there is special handling needed for Windows), and we have to check the performance after the changes, but I think this is on a good way! 🚀
@sassanh - are you still working on this, or have you given up? |
I'm not actively working on it but I have it on my radar. |
The PR isn't blocking anything - I just wanted to know if you are still on it, or if you need help. Take all the time you need - and thanks for the effort! |
Feel free to add any commits or make any changes to this pull request as needed. Your help is greatly appreciated! I might not have the capacity to address tests for older versions in the new future. |
4b6aecd
to
e02c3dc
Compare
- fix wrapped functions in pathlib (accessor not available in most Python versions) - fix open_code handling - make module path comparisons case-insensitive under Windows and macOS - disable one failing test for PyPy 3.7
e02c3dc
to
2e8fcfb
Compare
@sassanh - I've rebased against main and fixed the failing tests (disabled one test for PyPy 3.7, as I didn't want to invest time in that outdated version), but other than that, only the release notes are missing as far as I can see. |
@mrbean-bremen Thank you so much! I appreciate your help! |
@mrbean-bremen I checked the changes and it all looks good to me. I added the release notes too. Let's merge it if it looks good to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that! This change was something that I had in mind for quite some time, but never really got to it.
updates: - [github.com/asottile/pyupgrade: v3.16.0 → v3.17.0](asottile/pyupgrade@v3.16.0...v3.17.0) - [github.com/astral-sh/ruff-pre-commit: v0.5.4 → v0.5.5](astral-sh/ruff-pre-commit@v0.5.4...v0.5.5)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.5 → v0.5.6](astral-sh/ruff-pre-commit@v0.5.5...v0.5.6) - [github.com/pre-commit/mirrors-mypy: v1.11.0 → v1.11.1](pre-commit/mirrors-mypy@v1.11.0...v1.11.1)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.5.7](astral-sh/ruff-pre-commit@v0.5.6...v0.5.7)
Describe the changes
Add a call stack check for fake filesystem,
os
andos.path
methods in theirhandle_original_call
wrapper to see if they are being called from a module listed inskip_modules
.Tasks