build: Modernize, use setuptools 69 #428
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrate
setup.cfg
topyproject.toml
for newer setuptools compat and create py.typed marker for automatic type checker discovery.The
py.typed
marker should solve the "Cannot find implementation or library stub" errors from mypy if installed properly. Since the code already has internal type hints, adding the marker is sufficient for mypy to use them.The
setuptools>=69
dependency includes a fix to automatically include thepy.typed
marker in the distribution, thus making type hints usage much easier. The newer version however fails to build when the basic project metadata is missing inpyproject.toml
. Thus the settings fromsetup.cfg
are migrated entirely, upgrading tosetuptools_scm >= 8
inthe process.
This might need a requirement bump to Python >= 3.8 as well, since that's what the new setuptools version requires.