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

Move to only using pyproject.toml #10432

Merged
merged 5 commits into from Mar 12, 2024
Merged

Move to only using pyproject.toml #10432

merged 5 commits into from Mar 12, 2024

Conversation

silv-io
Copy link
Member

@silv-io silv-io commented Mar 11, 2024

Motivation

Using only pyproject.toml to define project metadata and dependencies is the new preferred way of doing things. Future distributions will only use pyproject.toml instead of a combination of pyproject.toml, setup.py and setup.cfg. Having all those things homogenized is helpful for introducing a multi-distribution project.

Changes

  • Remove setup.cfg and setup.py (and all references thereof) in favor of storing all this information in pyproject.toml
  • To define relationships between optional dependencies, we now don't use the %(extra)s syntax from the setup.cfg but recursively reference the package itself (so if extra test depends on extra runtime, extra test needs to contain "localstack-ext[runtime]"). This means that the package itself needs to be marked as unsafe for the pinning of dependencies.
  • Upgrade all pinned dependencies, because the build package needs to be added, and the unsafe packages need to be adapted.
  • Use the build package for building distributions instead of setup.py
  • Use plux for creating the entrypoints instead of setup.py
  • Update pre-commit hooks (adding support for pyproject.toml in pinned dependency checker and align black version with pinned version)
  • Note: Beforehand the setup.cfg defined the minimum Python version. This got transferred to the pyproject.toml. black beforehand did not properly deduce from the setup.cfg that it should only produce 3.8 compatible code. With this information now being in the pyproject.toml it does. For this reason some of the existing code needs to be reformatted (every single generated AWS API)

Testing

The pipeline should be green and the produced artifacts should remain equivalent

TODO

What's left to do:

  • Green pipeline

@silv-io silv-io force-pushed the move-to-pyproject-toml-core branch from f039d39 to 635446d Compare March 11, 2024 19:07
@silv-io silv-io added the semver: patch Non-breaking changes which can be included in patch releases label Mar 11, 2024
@silv-io silv-io force-pushed the move-to-pyproject-toml-core branch from 279db25 to 90b6043 Compare March 11, 2024 19:26
Copy link

github-actions bot commented Mar 11, 2024

S3 Image Test Results (AMD64 / ARM64)

  2 files  ±0    2 suites  ±0   3m 30s ⏱️ -5s
393 tests ±0  342 ✅ ±0   51 💤 ±0  0 ❌ ±0 
786 runs  ±0  684 ✅ ±0  102 💤 ±0  0 ❌ ±0 

Results for commit 68da688. ± Comparison against base commit 5d27f04.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Mar 11, 2024

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 29m 8s ⏱️ -22s
2 705 tests ±0  2 449 ✅ ±0  256 💤 ±0  0 ❌ ±0 
2 707 runs  ±0  2 449 ✅ ±0  258 💤 ±0  0 ❌ ±0 

Results for commit 68da688. ± Comparison against base commit 5d27f04.

♻️ This comment has been updated with latest results.

@silv-io silv-io marked this pull request as ready for review March 11, 2024 21:47
@silv-io silv-io force-pushed the move-to-pyproject-toml-core branch 2 times, most recently from 4c823f2 to 0b88b6c Compare March 12, 2024 10:56
@silv-io silv-io force-pushed the move-to-pyproject-toml-core branch from 0b88b6c to 68da688 Compare March 12, 2024 13:02
@coveralls
Copy link

coveralls commented Mar 12, 2024

Coverage Status

coverage: 85.69%. remained the same
when pulling 9ba53d5 on move-to-pyproject-toml-core
into 5d27f04 on master.

Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Awesome! This is quite a step forward towards up-to-date best-practices with python project config / packaging! 🚀
I only had a few questions (basically just for comments), afterwards we are good to go! 🚀 💯 🧹

bin/release-helper.sh Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@silv-io silv-io merged commit 2df0d12 into master Mar 12, 2024
13 of 14 checks passed
@silv-io silv-io deleted the move-to-pyproject-toml-core branch March 12, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants