Skip to content

Add py.typed to mark package as typed (PEP 561)#926

Merged
termim merged 4 commits intopymssql:masterfrom
NMertsch:master
Apr 1, 2025
Merged

Add py.typed to mark package as typed (PEP 561)#926
termim merged 4 commits intopymssql:masterfrom
NMertsch:master

Conversation

@NMertsch
Copy link
Copy Markdown
Contributor

@NMertsch NMertsch commented Mar 20, 2025

Fixes #925

PEP 561:

Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing.

I wasn't able to compile the package locally, so I don't know if this actually works.
The expected result is: File py.typed is part of the package distribution, in the same directory as __init__.py.

I saw setuptools in pyproject.toml, so I followed their docs on how to include non-Python files.

EDIT: The setuptools approach didn't work. Second attempt: MANIFEST.in.

@NMertsch
Copy link
Copy Markdown
Contributor Author

Thanks @termim for triggering the builds.
The failures don't seem to be related to the PR, but I might be wrong.

@termim
Copy link
Copy Markdown
Contributor

termim commented Mar 30, 2025

@NMertsch it seems the build is fixed, you can try to return the pyproject.toml change.

@termim termim merged commit f08812b into pymssql:master Apr 1, 2025
35 checks passed
@termim
Copy link
Copy Markdown
Contributor

termim commented Apr 1, 2025

Thanks!

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 file is missing (PEP 561)

2 participants