-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Settings: build all paths with posix_join
#2431
Conversation
I would've gone the other way. I mean, they are all string literals... |
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.
but this is fine too.
Just out of curiosity, can I ask why |
Some were using |
The advantage of using Personally, I would prefer to use |
Actually, as far as I can tell the With the As for being explicit: these are the default settings used internally, they are not user-facing, so it's not clear to me whom this explicitness is aimed at? And even supposing we wanted to be explicit, I know that the first time I saw |
Sadly no, not without random errors.
|
Ok, but escaping characters in strings is an orthogonal issue. (I'm not sure why you'd say raw strings are not designed for this purpose.) Once you escape the |
Thank you for the contribution, @MinchinWeb, and apologies for the long delay in chiming in here. You previously said:
Given that Python 2.7 is no longer supported, perhaps we should use this opportunity to switch to a |
Generally, I'm in favor of moving to |
Given that Python 3.5's EOL date is less than five months away, I have no problem dropping support for it now in preparation. For users on Ubuntu "Xenial" 16.04 and other LTS distributions that ship with Python 3.5, they only have another year before their underlying OS reaches its own end-of-life, so they have to make a move soon anyway. Plus, tools like Pyenv, Pythonz, and I say we make the jump to Python 3.6+. |
I would even support going Python3.7+. There is no reason to rely on 3.6 as 3.8 is already out there. |
I'm also in favour of dropping 3.5 now (i.e. with the next release). @dertuxmalwieder do you see any particular advantage in also dropping 3.6? I don't think we should unnecessarily limit the supported range of Python versions. |
3.7 is two years old soon, it is not unlikely that most people can use it in 2020. |
It's clear how we benefit from dropping Python 3.5 support ( |
I like Pathlib. I can rework this with Pathlib, but I can't offer an ETA at the moment. |
I've created #2738 to do settings via Pathlib. It doesn't address dropping Python 3.5 support, although we could typecast these settings to strings to sidestep the issue. |
Further to this, after playing with moving to Ultimately, in the generated sites, the URL's are strings within HTML and most of the websevers I've dealt with assume posix paths in the URLs they're fed, even on Windows (no idea how IIS does it...). If we do move to |
Looking at this again, I agree. I think we should keep these as strings, primarily because they require formatting later. And for that we need to
|
So after much discussion and some exploration, it seems this is the way to go. @justinmayer do you have to push this to master then to finish it off? |
… instead of `posix_join`. Fixes #2431
If I understand the perspective that @avaris and @oulenz have shared here — and please correct me if I am wrong — it seems the consensus is that this unification effort is indeed worthwhile but that string literals are preferred over @MinchinWeb: Between this and the Pathlib-related PR, you have spent a decent amount of time on this endeavor, and I want to recognize that and express my gratitude for your efforts. Truly much appreciated! 👏 |
Last call... Any comments before I merge the aforementioned branch? |
@justinmayer looks good to me |
@justinmayer thank you for shepherding this PR and the project generally. It's always a little disappointing to see something I've worked on not work out, but the discussion here has been constructive in understanding why the final solution was chosen, and I think that discussion helps make me a better programmer. I'm happy to see it resolved! |
c.f. #2383