Skip to content

ci: Fix lint errors due to mypy with python 3.12#1890

Merged
favilo merged 6 commits intoelastic:masterfrom
favilo:lint-changes
Nov 18, 2024
Merged

ci: Fix lint errors due to mypy with python 3.12#1890
favilo merged 6 commits intoelastic:masterfrom
favilo:lint-changes

Conversation

@favilo
Copy link
Copy Markdown
Contributor

@favilo favilo commented Nov 13, 2024

Now that we're using python 3.12 for the lint github action, we need to fix the errors that it is reporting.

Lint errors in question

Now that we're using python 3.12 for the `lint` github action, we need
to fix the errors that it is reporting.
@favilo favilo added the :ci Everything related to CI label Nov 13, 2024
@gbanasiak
Copy link
Copy Markdown
Contributor

This is caused by aiohttp update, which is a transitive/unpinned dependency in Rally.

After local venv recreation:

-aiohttp==3.10.8
+aiohttp==3.11.0

It's either/or it seems. Either we pin aiohttp and previous version is OK, or we let aiohttp move and then need to remove mypy ignore. WDYT @favilo ?

@favilo
Copy link
Copy Markdown
Contributor Author

favilo commented Nov 13, 2024

How about we pin to the current version. Then we can remove the ignore and have an updated dependency, without being forced to upgrade from an unpinned one.

Also reorganize the transitive dependencies in pyproject.toml

"elasticsearch[async]==8.6.1",
"elastic-transport==8.4.1",
# License: MIT
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've also moved the license comment to here.

@favilo
Copy link
Copy Markdown
Contributor Author

favilo commented Nov 14, 2024

Ah, so currently Python 3.8 isn't supported. So I'll pin it to 3.10.8. But I'm going to take this opportunity to just remove python 3.8 support in the near future. I've already got it working with 3.12 just fine.

That will allow us to do a lot more of the improvements we were interested in doing, too.

pyproject.toml Outdated
# License: MIT
"urllib3==1.26.19",
# License: Apache 2.0
"aiohttp==3.10.8",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: The latest 3.10.x is 3.10.11, actually.

Copy link
Copy Markdown
Contributor

@gbanasiak gbanasiak Nov 18, 2024

Choose a reason for hiding this comment

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

I think we were inspired by the state of my local env too much, so eddc70c.

@favilo favilo merged commit 65ec3bd into elastic:master Nov 18, 2024
@favilo favilo deleted the lint-changes branch November 18, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ci Everything related to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants