Skip to content

fix: include typing marker in built distributions - #287

Open
Shubham-Padkonde wants to merge 1 commit into
aws:masterfrom
Shubham-Padkonde:fix/include-typing-marker
Open

Shubham-Padkonde wants to merge 1 commit into
aws:masterfrom
Shubham-Padkonde:fix/include-typing-marker

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Description

Use the import package name redshift_connector as the package_data key. Setuptools expects a package name here, so the distribution-style redshift-connector key does not include py.typed on older builders.

Motivation and Context

Fixes #257. Wheels built without the marker prevent downstream type checkers from using the driver's inline annotations, despite the earlier typing support in #224.

Testing

  • Built clean source copies with setuptools 68.2.2 using setup.py sdist bdist_wheel: the original wheel omits py.typed; the patched wheel includes it. Both retain the certificate file.
  • Repeated the patched build with setuptools 84.0.0: the marker and certificate are present.
  • Python 3.10 unit suite: 2,040 passed, 13 skipped.
  • Ran the repository pre-commit hooks. Black formatted the changed entry. The isort hook scans the entire repository and found pre-existing import ordering differences, which are excluded from this PR. Mypy reports two setup.py argument-type errors with its current setuptools stubs; the same errors reproduce on the unmodified setup.py.

No live Redshift integration tests were run; this change affects package contents only.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • Local run of the ./build.sh build command succeeds
  • Code changes have been run against the repository's pre-commit hooks
  • Commit messages follow Conventional Commit Specification
  • I have read the README document
  • I have added tests to cover my changes (validated actual clean wheel contents as described above)
  • I have run all unit tests using pytest test/unit and they are passing

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.

py.typed marker file not included in published wheel

1 participant