-
Notifications
You must be signed in to change notification settings - Fork 371
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
Don't forget to add py.typed
file to package metadata
#936
Conversation
@bitprophet, to clarify -- without this change, the |
Guessing this was an oversight in the typing PR. Can you clarify why this wants to go in diff --git a/MANIFEST.in b/MANIFEST.in
index ba413a3b..61fc0ece 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,6 +5,7 @@ recursive-include invoke/completion *
recursive-include sites *
recursive-exclude sites/*/_build *
include dev-requirements.txt
+recursive-include * py.typed
recursive-include tests *
recursive-exclude * *.pyc *.pyo
recursive-exclude **/__pycache__ *
|
Done! |
Thanks! I just changed the base branch to the bugfix branch too. Was going to put a changelog entry in and call it done, but realized: it'd be nice for however you noticed this, to be added to the install test step somehow - if we're gonna have typing support we should make sure it actually works! Is there a nice concise reproduce case for what happens when py.typed isn't in the dist/wheel? (eg, some arbitrary module that imports Invoke, does its own typechecks, and then runs mypy - or something like that) I'd probably need to add whatever that test is, to invocations (which happens to be what invoke uses to run most of its CI bits) so I don't think there's a useful test you can add at the unit/integration level, since those already have a source checkout locally. But giving me the repro case is fine :) |
Oh Github. naturally, changing the base + adding a changelog entry == conflict. Let's see if their TTW tooling lets me resolve that conflict correctly or if I just need to make my own integration branch after all. (I usually default to just cherry-picking folks' commits instead of trying to force the PR itself to end up 100% correct...figured I would try the 'github way' again. alas!) EDIT: it appears to have worked! nice. being able to commit into other peoples' forks is extremely, extremely weird still. |
This is ready for merge but I'd like us to figure out the test angle before I do. Thanks! |
Here's a possible way of testing this in a GitHub Actions workflow: jobs:
check-pep561-compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: invoke
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: |
pip install mypy
pip install ./invoke
mkdir newdir
cd newdir
mypy -c "import invoke" |
Thanks @AlexWaygood, confirmed that works pretty well to blow up when there's no py.typed. |
Deleted some confusion. Still seeing weird behavior trying to prove/disprove this in my CI-oriented tasks, but I'll figure it out. Maybe not late in the day on a Friday though 😓 |
Cache invalidation: one of the top two compsci problems strikes again. (A py.typed was being preserved in a |
Great, I now have the main 2.1 branch failing correctly re: this issue: https://app.circleci.com/pipelines/github/pyinvoke/invoke/312/workflows/c3ac0409-a669-4c1b-83aa-77d44279fb6b/jobs/1923?invite=true#step-106-466 |
Hm, doesn't look like faux-changing the base branch made GH do a rebase. I can 'rebase and merge' but I kinda wanted to 'rebase and prove the tests pass' first. Will try bouncing back and forth a bit (plus main branch now has my it's-gonna-break fix in it too.) EDIT: nada. whatever. gonna just go back to my local integration branches in future I think 🙃 anyway, merging! |
Invoke 2.1.2 out now! Thanks again. |
While working on python/typeshed#10100 I've noticed that your project misses
py.typed
file in the package (version2.1.0
).See:
This line of code should package
py.typed
as well.Can you please make
2.1.1
release? :)