Optimized wagtail packaging
Excluded tests and maps from published artifacts as mentioned in #6130.
Manage this branch in Squash
Test this branch here: https://paarthagarwalspeed-up-installs-ewgyz.squash.io
Hey @gasman , I have include wagtail/tests/utils. I hope it fixes the issue
At least by running
python setup.py clean sdist bdist_wheel, I can confirm this:
- Doesn’t remove anything from the wheel
- Doesn’t make sure
wagtail/test/utilsstays present in the source dist (not 100% sure but I believeglobal-includedoesn’t take file paths.
My bad. Got lost while reading discussions and references😅 I'll fix it
At least by running
python setup.py clean sdist bdist_wheel, I can confirm this:
- Doesn’t remove anything from the wheel
- Doesn’t make sure
wagtail/test/utilsstays present in the source dist (not 100% sure but I believeglobal-includedoesn’t take file paths.
Do we also need to add utils test for wheels?
@PaarthAgarwal yes, wagtail/tests/utils needs to be there for both wheels and source distributions.
@gasman @thibaudcolas I have successfully excluded tests from source dist and wheels while leaving the wagtails/tests/utils untouched. Please have a look.
Removing from UX Unification scope as this needs a core team decision by the looks of things.
@kaedroho if you could re-read the thread above and maybe give an indication of when we might want to remove the test redirection imports?
@kaedroho if you could re-read the thread above and maybe give an indication of when we might want to remove the test redirection imports?
Since these are not documented, we could remove them now. These were added since some third-party libraries might be importing from wagtail.tests.utils which, AFAIK is not a public API.
wagtail.tests.utils is a public API: https://docs.wagtail.org/en/stable/advanced_topics/testing.html
Ahh, thanks!
In that case, we'd need to add in some deprecation warnings for a couple of releases. We have a helper to make it easier to define deprecation warnings for moved modules here: https://github.com/wagtail/wagtail/blob/main/wagtail/utils/deprecation.py#L16
Just flagging with 6.0 around the corner, this is now ready for consideration again.
I can confirm that there is no longer anything in wagtail.tests (with an S) that needs to be included in the Wagtail package.