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

Add support for Python 3.13 #804

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

svrooij
Copy link

@svrooij svrooij commented Jan 17, 2025

Fixes #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.

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).
@svrooij svrooij requested a review from a team as a code owner January 17, 2025 21:16
… 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
Copy link
Member

@baywet baywet left a 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
Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

add support for python 3.13
3 participants