-
Notifications
You must be signed in to change notification settings - Fork 142
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
AttributeError: 'Path' object has no attribute 'walk' #794
Comments
IIRC, implementing |
|
I suppose because there are other methods that I did implement for all Python versions where their stdlib counterparts required a specific minimum Python version. I can't remember off hand which methods those were though. |
Well, its a question of documentation in this case. I can submit a PR. BUT - arguing with me whether this is a bug or not, will not in any way help your users, who will eventually find this issue and either traceback to this issue or have to debug it like I have done to find it. |
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
AnyIO version
4.6.0
Python version
3.11
What happened?
Anyio.Path implements the
walk
method which is available in pathlib.Parth from python 3.12 onwards. For lower versions of python, this causes anyio.Path.walk to through an attribute error.I expected anyio to implement an alternative using os.walk on lower python versions, or at least to through an informative error instructing the user.
How can we reproduce the bug?
Try using anyio.Path.walk in a lower Python version.
The text was updated successfully, but these errors were encountered: