-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Fixed #29983 -- Replaced os.path with pathlib.Path. #10684
Conversation
When converting my tutorial I get "TypeError: argument of type 'PosixPath' is not iterable" from
I guess all the paths needs to use |
Interesting... according to the Python docs: From this I take that we should either expose the uri option, and internally call str on the path when it's set [or require a str, not a path], or stop supporting URI syntax in sqlite DB names. |
I'm not sure what you mean by "exposing the uri option." That uri stuff dates to 8c99b79 if that helps you understand it better. I also tested the GIS tutorial changes and got this error I think the way to proceed here is to make each documentation change in a separate commit along with a test addition (and a code change, if necessary) -- assuming your chosen solution isn't to wrap each |
I mean exposing a way to pass Otherwise, from how I read it, we shouldn't be assuming the |
I'm still not following how that's relevant to the issue but feel free to offer a patch that explains it. With my (perhaps superficial) understanding of the issue, I would pursue the option of making Django coerce |
The error you showed was caused by: |
You can fix the crash by casting |
What is status on this? |
Closing due to inactivity. |
I'm personally interested in seeing this one go through as I'm trying to standardize on @funkybob's changes already work in Python 3.7 but Python 3.6 and earlier don't support Since I made those changes here: treyhunner@6f7e782 Instead of simply converting the Should I open this in a new PR? Is there anything else you'd like to see changed before I do so? |
Of course tests are needed. |
I still maintain the sqlite NAME handling should be fixed, but apparently that passed everyone else by :/ |
@timgraham would you want tests to demonstrate the sqlite issue and show that it is resolved? @funkybob I don't understand the URL thing well enough to judge. Though I know that when I fixed that |
Tests for all changes made, e.g. using a |
pathlib.Path is more "intuitive" to use, and avoids problems with portability between Windows and not-Windows.
The trouble encountered in #29983 would not have happened if we were using pathlib.