Skip to content

Remove support for Python 3.8 #101

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

Closed
wants to merge 4 commits into from
Closed

Conversation

kgodlewski
Copy link
Contributor

@kgodlewski kgodlewski commented Dec 3, 2024

Changes:

  • bump the minimal Python version to 3.9 in all the tools
  • run pyupgrade --py39-plus on the codebase to change typehints to PEP585-style
  • manually change typing.Callable to collections.abc.Callable

@kgodlewski kgodlewski changed the base branch from kg/remove-python-9.8 to main December 3, 2024 12:18
@kgodlewski kgodlewski changed the title Change typehints to PEP585-style Remove support for Python 3.8 Dec 3, 2024
@kgodlewski kgodlewski force-pushed the kg/python-3.9-typehints branch 3 times, most recently from fb1d6fc to b44e542 Compare December 6, 2024 14:04
@@ -90,21 +84,21 @@ def __init__(
self,
*,
run_id: str,
project: Optional[str] = None,
api_token: Optional[str] = None,
project: str | None = None,
Copy link
Contributor

@michalsosn michalsosn Dec 17, 2024

Choose a reason for hiding this comment

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

didn't | syntax for type union appear in python 3.10? at least that's what https://docs.python.org/3/library/typing.html#typing.Union says.
It should have failed in some tests on 3.9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like it should be so, however both mypy, and python 3.9 interpreter don't have issues with importing the code, which is quite weird, but I don't have the space to dig into this deeper -- I'll just go back to Optional

Make sure Python 3.13 is configured in all the tools.
# Conflicts:
#	CHANGELOG.md
@kgodlewski kgodlewski force-pushed the kg/python-3.9-typehints branch from b44e542 to 4f14a11 Compare December 18, 2024 11:29
This was done using `pyupgrade`

# Conflicts:
#	src/neptune_scale/api/validation.py
@kgodlewski kgodlewski force-pushed the kg/python-3.9-typehints branch from 4f14a11 to ffd8133 Compare December 18, 2024 11:32
@kgodlewski
Copy link
Contributor Author

#105 contains changes without introducing | to typehints (keeps Union instead)

@kgodlewski kgodlewski closed this Dec 18, 2024
@kgodlewski kgodlewski deleted the kg/python-3.9-typehints branch April 7, 2025 16:37
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