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

Shrink the compatibility module and remove Python <3.7 support #1441

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

alfawal
Copy link
Contributor

@alfawal alfawal commented Aug 3, 2023

Proposed Changes

Reducing the usage of the pika.compat usage. It's really depressing for a first-time contributor to see Python 2 being used nowadays.

I believe/hope that these changes will encourage more people to contribute!

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

Checklist

Put an x in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to
ask on the
pika-python
mailing list. We're here to help! This is simply a reminder of what we
are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further Comments

On the consistency side. I believe that this repository should:

  • Add pre-commit config and inform the contributors to use it. The pre-commit config:
    • Use black as its formatter.
    • Use isort as its imports reordering handler.
    • (Optional) Use items from ruff.
    • (Optional) Use pydocstyle for docstrings with the Google style.
    • etc.
  • Do an initial run with the pre-commit on all files.

@alfawal
Copy link
Contributor Author

alfawal commented Aug 3, 2023

What is the status of the file utils/codegen.py? it runs on Python 2 only, should I remove it? is it just a normal file deletion or is there anything that I have to do?

@alfawal alfawal mentioned this pull request Aug 3, 2023
@lukebakken lukebakken self-assigned this Aug 3, 2023
Copy link
Member

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution. Please note that these changes have broken the test suites! I will leave this PR as a draft until the tests are fixed. Thanks.

@lukebakken lukebakken marked this pull request as draft August 3, 2023 22:35
@alfawal alfawal changed the title Reduce redundant usage of the compatibility module Shrink the compatibility module and remove Python <3.7 support Aug 4, 2023
@alfawal alfawal marked this pull request as ready for review August 5, 2023 21:05
@alfawal alfawal requested a review from lukebakken August 5, 2023 21:06
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.

None yet

2 participants