cloudtools / awacs

Python library for AWS Access Policy Language creation
BSD 2-Clause "Simplified" License
395 stars 102 forks source link

Changes for Python 3.6+ (deprecating Python 2.x) #160

Closed markpeek closed 3 years ago

markpeek commented 3 years ago

Switching awacs to Python 3 only by deprecating Python 2.x support. This removes the need for 2to3.

@michael-k could you review and approve?

michael-k commented 3 years ago

If you plan to bump the major version (due to dropping Python 2), I suggest to include the following changes:

These changes aren't breaking and don't require a major version bump. But they would be a nice addition. I'm happy to open PRs for the changes.

markpeek commented 3 years ago

I love it :)

There's a similar PR for troposphere: cloudtools/troposphere#1812. It has a lot of conflicts by now, but I'm happy to resolve them if you want to forward with it. :)

Thank you @michael-k for getting to the review so quickly. I just pushed changes per your feedback. Yes, I'm intending to switch troposphere as well to Python3 and I'll comment over on your issue with details.

markpeek commented 3 years ago

If you plan to bump the major version (due to dropping Python 2), I suggest to include the following changes:

Yes, with the Python3 change I will be bumping to a new major version.

  • Switch from setup.py to setup.cfg (declarative).
  • Providing wheels via PyPI.

I haven't touched the setup and distribution side of things in awhile. Please propose changes for these first two items you listed.

  • Switch from pycodestyle to black (esp. autoformatting for generated files).

This is likely easier for me to handle via a direct commit. Let me look at it.

  • Change the default branch from master to main.

Good suggestion. I'll look to do this after all the changes are in and before the release is done.

michael-k commented 3 years ago

I haven't touched the setup and distribution side of things in awhile. Please propose changes for these first two items you listed.

I'll send a PR later today. :)