Skip to content

chore: drop poetry, migrate to pip + flit_core#563

Merged
MIchaelMainer merged 5 commits into
mmainer/cd-enhancementfrom
mmainer/cd-enhancement-drop-poetry
Jun 5, 2026
Merged

chore: drop poetry, migrate to pip + flit_core#563
MIchaelMainer merged 5 commits into
mmainer/cd-enhancementfrom
mmainer/cd-enhancement-drop-poetry

Conversation

@MIchaelMainer
Copy link
Copy Markdown
Member

@MIchaelMainer MIchaelMainer commented Jun 4, 2026

It was highly suggested from an internal Pythonista that we should drop Poetry as it adds extra complexity when encountering edge scenarios. This will also make Kiota-Python better match what we are doing for the graph repos.

  • Replace poetry-core build backend with flit_core in all 8 packages
  • Convert all pyproject.toml from [tool.poetry] to PEP 621 [project] format
  • Fix [mypy] -> [tool.mypy] in abstractions, authentication/azure, bundle, tests/validation
  • Fix tests/validation mypy files setting to 'validation'
  • Create requirements-dev.txt per package (8 packages + tests/validation)
  • Update build.yml: replace poetry install/run with pip and direct commands
  • Update cd-publish-python.yml: replace poetry with pip install build + python -m build
  • Remove poetry-plugin-mono-repo-deps from root requirements_dev.txt

Validation runs:
https://github.com/microsoft/kiota-python/actions/runs/26969442452
https://dev.azure.com/microsoftgraph/Graph%20Developer%20Experiences/_build/results?buildId=221616&view=results

- Replace poetry-core build backend with flit_core in all 8 packages
- Convert all pyproject.toml from [tool.poetry] to PEP 621 [project] format
- Fix [mypy] -> [tool.mypy] in abstractions, authentication/azure, bundle, tests/validation
- Fix tests/validation mypy files setting to 'validation'
- Create requirements-dev.txt per package (8 packages + tests/validation)
- Update build.yml: replace poetry install/run with pip and direct commands
- Update cd-publish-python.yml: replace poetry with pip install build + python -m build
- Remove poetry-plugin-mono-repo-deps from root requirements_dev.txt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MIchaelMainer MIchaelMainer marked this pull request as ready for review June 4, 2026 23:05
@MIchaelMainer MIchaelMainer requested a review from a team as a code owner June 4, 2026 23:05
Comment on lines +1 to +6
-e ../abstractions
-e ../http/httpx
-e ../serialization/json
-e ../serialization/form
-e ../serialization/text
-e ../serialization/multipart
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

one thing that we should validate before merging this is whether a "publish" (to local file) leads to the package metadata being emitted with the corresponding dependency, instead of local reference. This would otherwise lead to broken packages and has bitten us a couple of times in the past.

And I don't know enough about Python to "tell that from just looking at the configuration"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think this will be a problem as those are dev dependencies. The dependencies in the project file point to the packages

dependencies = [
    "microsoft-kiota-abstractions>=1.10.2,<2.0.0",
    "microsoft-kiota-http>=1.10.2,<2.0.0",
    "microsoft-kiota-serialization-json>=1.10.2,<2.0.0",
    "microsoft-kiota-serialization-form>=1.10.2,<2.0.0",
    "microsoft-kiota-serialization-text>=1.10.2,<2.0.0",
    "microsoft-kiota-serialization-multipart>=1.10.2,<2.0.0",
]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 5, 2026

@MIchaelMainer MIchaelMainer merged commit b63c010 into mmainer/cd-enhancement Jun 5, 2026
3 checks passed
@MIchaelMainer MIchaelMainer deleted the mmainer/cd-enhancement-drop-poetry branch June 5, 2026 20:59
@github-project-automation github-project-automation Bot moved this to Done ✔️ in Kiota Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

2 participants