-
Notifications
You must be signed in to change notification settings - Fork 28
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
Drop support for Python 2; prevent errors due to race condition with existing directories #18
base: master
Are you sure you want to change the base?
Drop support for Python 2; prevent errors due to race condition with existing directories #18
Conversation
…existing directories
"Programming Language :: Python :: 3", | ||
"Topic :: Desktop Environment", | ||
], | ||
setup( |
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.
Most of the diff is because black
auto-reformats files on edit for me; I can back this out if it is a problem. The python_requires
line is the relevant part.
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.
In general, if a project isn't already auto-formatted, I'd ask contributors to turn off their autoformatter when working on it, to avoid changing unrelated lines. The changes here are small enough that I won't ask you to revert them, though.
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.
Makes sense, thank you!
@takluyver will you be able to review this at some point? |
Right, sorry it's taken me so long to look at this - life has been getting in the way. |
@@ -7,7 +7,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
strategy: | |||
matrix: | |||
python-version: [ "2.7", "3.6", "3.7", "3.8", "3.9", "3.10" ] | |||
python-version: [ "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10" ] |
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.
Unfortunately this doesn't work - the ubuntu-latest
images now only have Python 3.7 and up. It's possible to use an older image to test on older Python versions (see e.g. this PR), though I doubt that goes all the way back to 3.2.
We probably have to leave at least some older versions untested. And then decide whether the metadata should claim the minimum version we think is likely to work, or the minimum we actually test. 🙂
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.
I should be more concrete. Looking at the download stats for PyXDG, it appears that for whatever reason, there are still a lot of downloads on Python 3.6. 🤷 Let's make that the new minimum supported version, and do the workaround I pointed to in the comment above to test on 3.6. Then whoever is using it can benefit from this fix.
Intriguingly, downloads from Python 2.7 dropped off a cliff in October 2022. I wonder if this was somehow related to the release of pyxdg 0.27, or of Ubuntu 21.10. There's no corresponding rise in downloads from Python 3. 🤔
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.
Sounds good, I'll make those changes this month. You may see this close and reopen in a different PR because (as you can see from the history above) a stale-forks cleaner script mistakenly deleted my fork and closed this, so if I can't resurrect it in place I'll reopen and link here. Sorry in advance for any confusion.
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, no problem if it comes as a new PR. I think it should be possible to retrieve this branch to work from even though your repo is deleted, something like this:
git fetch upstream pull/18/head
git checkout FETCH_HEAD
Per abandoned-looking #15, the easiest way to suppress race conditions regarding existing directories is to use the Python 3.2+
exist_ok
flag.This PR: