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

Work around keyword arguments missing in older versions of Python #144

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

diazona
Copy link
Owner

@diazona diazona commented Dec 18, 2023

This fixes a couple issues in test support code that were affecting older Python versions.

I also deleted a changelog fragment that didn't get deleted previously, for some reason.

Closes #143

The filter keyword to tarfile.TarFile.extract_all() was added in Python
3.8. This change patches the code to work on earlier Python versions as
well.
functools.cache() was only introduced in Python 3.9, so for earlier
Python versions we should use lru_cache() instead. This commit
implements that.
I went through the process of running towncrier locally to generate
a changelog fragment, then ran it again to add that fragment into
the changelog, and manually combined it with the previous version.

This normally shouldn't be necessary, I'm only doing it this time to
help recover from a failed release.
@diazona diazona added this to the v0.2 milestone Dec 18, 2023
@diazona diazona requested a review from sjlongland December 18, 2023 06:28
@sjlongland sjlongland merged commit 43d9538 into main Dec 18, 2023
11 checks passed
@sjlongland sjlongland deleted the unexpected-keyword-argument-py37/1/dev branch December 18, 2023 22:42
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.

TypeError: extractall() got an unexpected keyword argument 'filter'
2 participants