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

Remove all vendoring #169

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

s-t-e-v-e-n-k
Copy link

With this project removing support for Python 2 as well as any version of Python 3 that is < 3.8, utilise pyupgrade to bring this project to that level of Python 3 code, as well as removing all vestiges of vendored backports.

@wbarnha
Copy link
Owner

wbarnha commented Mar 18, 2024

I coincidentally ran pyupgrade in #171 but I'll go ahead and review this to see what I missed.

@s-t-e-v-e-n-k
Copy link
Author

I'm braced and ready for doing the rebase. :-)

@wbarnha
Copy link
Owner

wbarnha commented Mar 19, 2024

I'm braced and ready for doing the rebase. :-)

You responded as I was opening this PR. This is going to be a chunky one to rebase, I'll get around to merging it tomorrow

@s-t-e-v-e-n-k
Copy link
Author

Yeah, I suspect it is going to be easier to carry over the vendor removal bits I want, and drop every other change. I can probably sort that out in the next 30 minutes if you wish.

@wbarnha
Copy link
Owner

wbarnha commented Mar 19, 2024

Yeah, I suspect it is going to be easier to carry over the vendor removal bits I want, and drop every other change. I can probably sort that out in the next 30 minutes if you wish.

If you could, that would be great! I'm pretty eager to get this merged.

Now that the codebase has been modernised by using pyupgrade, we can
also remove all backported vendor modules, and all uses of them.
@s-t-e-v-e-n-k
Copy link
Author

Forced pushed, let's see if I missed anything. I'm not 100% happy with the crimes I committed in benchmarks/variant_speed.py, but I also didn't want to completely rewrite it to remove its reliance on the Python 2 construct of int2byte.

Comment on lines +68 to +70
def int2byte(i):
return bytes((i),)

Copy link
Owner

Choose a reason for hiding this comment

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

Forced pushed, let's see if I missed anything. I'm not 100% happy with the crimes I committed in benchmarks/variant_speed.py, but I also didn't want to completely rewrite it to remove its reliance on the Python 2 construct of int2byte.

It happens, it's a sacrifice that sometimes must be made to keep the ball rolling 😅

Copy link
Owner

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

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

Tests pass, so I'm satisfied. LGTM!

@wbarnha wbarnha merged commit a856dc4 into wbarnha:master Mar 19, 2024
21 checks passed
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