-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add support for Python 3.13 #804
base: main
Are you sure you want to change the base?
Conversation
Fixes microsoftgraph#704 Add support for Python 3.13 and update dependencies. * **pyproject.toml** - Add Python 3.13 to the `requires-python` field. - Add Python 3.13 to the `classifiers` field. - Set higher requirement for all `microsoft-kiota-....` packages to at least 1.8.0. * **.github/workflows/build.yml** - Add Python 3.13 to the `matrix` for testing. * **requirements-dev.txt** - Update dependencies to be compatible with Python 3.13. * **tests/conftest.py** - Add a test to check for Python 3.13 compatibility. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoftgraph/msgraph-sdk-python-core/issues/704?shareId=XXXX-XXXX-XXXX-XXXX).
… requirements * Add Python 3.13 to the `requires-python` field * Add Python 3.13 to the `classifiers` field * Set higher requirement for all `microsoft-kiota-....` packages to at least 1.8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update the publish workflow please?
from dataclasses import dataclass | ||
from typing import Optional, TypeVar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Global: I believe the import changes should be reverted. According to https://docs.python.org/3/library/typing.html#typing.Callable, the alias typing.Callable
is deprecated and should use the import from collections.abc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be so, but the test framework does not import it from collections.abc so the tests would fail on 3.13 (which is why I also tried updating pytest, but that didn't work out).
Apart from that, all other things are imported from typings, in my opinion this looks better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's fix the test project configuration then. This is a change we've made on the kiota dependencies, and we'll want to be consistent across the repositories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, @svrooij could you share the errors you mentioned seeing for everyone's benefit?
As @baywet, the kiota dependencies do have this change too and don't seem to fail. As, these are aliases that will probably be removed in the future so it would be better to be set for this if we can.
Quality Gate failedFailed conditions |
Fixes #704
Add support for Python 3.13 and update dependencies.
pyproject.toml
requires-python
field.classifiers
field.microsoft-kiota-....
packages to at least 1.8.0..github/workflows/build.yml
matrix
for testing.requirements-dev.txt
tests/conftest.py
For more details, open the Copilot Workspace session.