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

Fix #232: remove distutils and swap to poetry #238

Merged

Conversation

mlissner
Copy link
Contributor

This is a medium-sized PR that has two goals:

  1. Remove the dependency on distutils by swapping to poetry.

  2. Remove outdated support for deprecated versions of Python and Django

A few notes:

  1. My commits should be pretty tidy and have some notes worth reviewing. No big surprises, but details are in there if desired. I'd start this PR review by looking there.

  2. This includes a Github Action to push to PyPi. You'll need to add a secret to your repo for it to work. You can make PyPi tokens from your Pypi account pretty easily. See the updates to the readme for how to trigger it.

  3. As mentioned above, I took this opportunity to remove support for deprecated versions of Django and Python. The list of removed versions includes Django 3.0 and 3.1 as well as Python 3.5, 3.6.

    Details on the django vresions here.

    Details on Python versions here.

  4. I never worked with pip extras before, and wasn't completely sure how to do them with poetry. I think I got them right, but if there's a way to check, I'd certainly welcome that.

That's it for now. Please let me know what thoughts you have!

Fixes: #232

A few notes:

1. I did my best to carry over everything from setup.py and other files.

1. This removes the AUHORS file, and migrates it to the `authors` key
   in pyproject.toml. Similarly, it removes authors from the readme,
   and the __init__.py so there's one source of truth.

1. This removes the MANIFEST.in file, and migrats it to the include
   parameter of in pyproject.toml.

1. This adds a new, small dependency to allow the __version__ attribute
   to work in __init__.py. It's only needed in Python <= 3.7, so it's
   marked accordingly.

1.
@mlissner mlissner changed the title Fix: #232 remove and swap to poetry Fix #232: remove disutils and swap to poetry Mar 21, 2022
@mlissner mlissner changed the title Fix #232: remove disutils and swap to poetry Fix #232: remove distutils and swap to poetry Mar 21, 2022
Copy link
Contributor

@pcraciunoiu pcraciunoiu left a comment

Choose a reason for hiding this comment

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

Looks pretty good as far as code changes. Some small comments.

Most importantly, build is failing now so it'd be good to fix that: https://github.com/django-ses/django-ses/runs/5631560922?check_suite_focus=true

README.rst Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@mlissner
Copy link
Contributor Author

Dang, this needs approval to run the tests again. I don't think there's a way around this, but if you can give them another kick, that'd be great.

@mlissner
Copy link
Contributor Author

OK, looks like tests are passing (thank you), and I've incorporated all your feedback. I think it's good to go unless you want to pull the tests and example directories from the build.

From here, I'm headed towards the M2Crypto bug, then a release with a fat version bump?

@pcraciunoiu
Copy link
Contributor

Thank you @mlissner . Those folders weren't in the build before, right? Is it easy to exclude them with poetry/pyproject.toml? Seems worth a few minutes to check that out. If it's not easy, I'd appreciate it if you filed an issue for the future. I suspect some people will notice.

@pcraciunoiu pcraciunoiu merged commit cb1352c into django-ses:master Mar 22, 2022
@pcraciunoiu
Copy link
Contributor

Thanks again! I'd like to wait for your next PR for M2Crypto before making a release

@mlissner mlissner deleted the 232-remove-distutils-swap-to-poetry branch March 22, 2022 04:59
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.

distutils has been deprecated in Python 3.10
2 participants