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

Consider dropping support for python 3.8 and/or 3.9 #749

Closed
bpkroth opened this issue May 21, 2024 · 2 comments · Fixed by #905
Closed

Consider dropping support for python 3.8 and/or 3.9 #749

bpkroth opened this issue May 21, 2024 · 2 comments · Fixed by #905
Labels
low priority Low-priority issue

Comments

@bpkroth
Copy link
Contributor

bpkroth commented May 21, 2024

There may still be some deployment use cases for this so probably not just yet.

When we do get to it, don't forget to look for various sys.version_info checks to remove.

@bpkroth bpkroth added the low priority Low-priority issue label May 21, 2024
@bpkroth
Copy link
Contributor Author

bpkroth commented Oct 31, 2024

Could also modernize the way we do type hints (e.g., stop using Optional and Union)

@bpkroth bpkroth mentioned this issue Nov 22, 2024
bpkroth added a commit that referenced this issue Nov 25, 2024
# Pull Request

## Title

Additional fixups for the most recent versions of python/pylint.

---

## Description

- Converts some quote inconsistency ignores to `"""` strings
- Ignores a `Generator` typehint issue that changed with 3.13
- Adjusts a comment in pyproject.toml to help us track what needs to
change after dropping support for 3.8 - #749.

---

## Type of Change

- 🔄 Refactor

---
@bpkroth
Copy link
Contributor Author

bpkroth commented Dec 31, 2024

Started this in #902.

While playing with pyupgrade to do the syntax conversions (which are incomplete unfortunately), I also noted that we could improve our Makefile rules to use pre-commit hooks and then convert the Makefile to call those instead.

That would leave the Makefile to do tests and doc target builds, but leave all of the format and check targets in the pre-commit.

motus pushed a commit that referenced this issue Jan 3, 2025
# Pull Request

## Title

Deprecates Python 3.8 support

---

## Description

Per https://endoflife.date/python, 3.8 is no longer supported.

This PR drops Python 3.8 from the CI pipeline and changes a few small
places in the code where we have to check for the python version, but
otherwise leaves the rest of the pylint and syntax changes for a future
PR.

To manage that, we also prepare the use of `pyupgrade` as a formatter,
though may convert all formatting checks to use `pre-commit` hooks
instead in the future in order to reduce some of the `Makefile`
complexity.

- See Also: #749 

---

## Type of Change

- ✨ Dropped feature
- ⚠️ Breaking change
- 🔄 Refactor

---

## Testing

This is a small change for now, without rewrites, to keep testing
easier.
So usual CI should suffice.

---

## Additional Notes (optional)

- Python 3.9 will be supported for another 10 months. We could also
consider to drop support for it early as well and reduce another round
of large codebase rewrites. On the other hand, it might be simple to do
later with the introduction of pyupgrade anyways.

---
motus added a commit that referenced this issue Jan 3, 2025
# Pull Request

## Title

Deprecates Python 3.9 support

---

## Description

Per https://endoflife.date/python, 3.8 is no longer supported.

This PR drops Python 3.8 from the CI pipeline and changes a few small
places in the code where we have to check for the python version, but
otherwise leaves the rest of the pylint and syntax changes for a future
PR.

To manage that, we also prepare the use of `pyupgrade` as a formatter,
though may convert all formatting checks to use `pre-commit` hooks
instead in the future in order to reduce some of the `Makefile`
complexity.

- See Also: #749 

---

## Type of Change

- ✨ Dropped feature
- ⚠️ Breaking change
- 🔄 Refactor

---

## Testing

This is a small change for now, without rewrites, to keep testing
easier.
So usual CI should suffice.

---

## Additional Notes (optional)

- A variation on #902 
- Python 3.9 will be supported for another 10 months. We can also
consider to drop support for it early as well and reduce another round
of large codebase rewrites. On the other hand, it might be simple to do
later with the introduction of pyupgrade anyways.

---

---------

Co-authored-by: Sergiy Matusevych <[email protected]>
bpkroth added a commit that referenced this issue Jan 3, 2025
# Pull Request

## Title

Reworks build to use pre-commit for format and lint checks.

---

## Description

As mentioned in #902 and #903, this refactors the build system to use
[`pre-commit`](https://pre-commit.com) for the following reasons:

- less complicated Makefile rules
- pinned linter versions that can be checked with dependabot more
explicitly for easier maintenance

- See Also: #749 

---

## Type of Change

- ✨ New feature
- 🔄 Refactor
- 📝 Documentation update
- 🧪 Tests

---

## Testing

Manually locally and usual CI tests.

---

## Additional Notes (optional)

This builds off of #903 and is prep work to change the syntax of the
codebase using `pyupgrade`.

---
@motus motus closed this as completed in #905 Jan 3, 2025
@motus motus closed this as completed in 795d1b0 Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority Low-priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant