Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Drop support for Python 2; prevent errors due to race condition with existing directories #18

wants to merge 1 commit into from

Conversation

zbentley
Copy link

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:

  • Uses that flag.
  • Drops support for Python 2; Py3.2 or greater is now required.
  • Updates gitignore to be the GitHub standard.

"Programming Language :: Python :: 3",
"Topic :: Desktop Environment",
],
setup(
Copy link
Author

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.

Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you!

@zbentley
Copy link
Author

@takluyver will you be able to review this at some point?

@zbentley zbentley closed this by deleting the head repository Jan 29, 2023
@zbentley zbentley reopened this Jan 29, 2023
@takluyver
Copy link
Owner

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" ]
Copy link
Owner

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. 🙂

Copy link
Owner

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. 🤔

image

Copy link
Author

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.

Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants