-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove deprecated packages as dependencies in requires-install.txt
#1944
Comments
Thanks for pointing out the lack of wheels @anders-kiaer - I've created wheels for the dash-core-components, dash-html-components, and dash-table stubs, so that should improve the installation time at least. The reason we included these as required dependencies is so that anyone still using the old imports will necessarily get the new ones, regardless of how they've installed these packages. In particular, the solution of multiple top-level packages has problems if a user has a requirements file that explicitly lists When Dash 2.0 was new, it was important to us that the old usage not throw an error, just a warning. At some point though we'll probably decide users have had long enough to update, and throwing an error is acceptable. Then we can stop installing these stub packages entirely and detect the old ones here when they're registered and throw an error: dash/dash/development/base_component.py Lines 35 to 36 in 58bec06
But I don't think we're quite ready for that yet. Maybe there'd be a way to swap out the old for the new during this registration, in which case we could make this still be a warning? My gut reaction is that could be even more confusing than what we do today, but if you (or anyone else) would like to try it out I'd be happy to take a look. |
That is a good point. 🙂 Thanks for the wheels. Having wheels now for |
This seems to still be a problem. |
When
dash==2.0
was introduced, the packagesdash_core_components
,dash_html_components
anddash_table
were deprecated, in favour ofdash.dcc
,dash.html
anddash.dash_table
.Still, these packages are pinned as mandatory dependencies in
dash/requires-install.txt
Lines 4 to 6 in 6ee3eee
The downsides by being forced to install them are mainly:
dash
has wheels 🎉 - which semi-closes Deploy dash* wheels to PyPI on releases #1440. However, since the deprecated packages currently also are installed along withdash
, and they use the inefficient/problematic source.tar.gz
distributions only, the problem still remains.dcc
and only give/listdash_core_components
version you don't know which version ofdash.dcc
is actually used, sincedash_core_components
has a final "release" always pointing to the latestdash.dcc
version.Suggested solution:
This already used feature in
setuptools
dash/setup.py
Line 19 in 6ee3eee
setup.py
. So if basically one file per deprecated package is created in this repository:which can be copied from the relevant file in the deprecated repositories, the user will then with
pip install dash
still get the deprecated packages installed in the namespace (such that the deprecated import syntax still works), but we avoid fetching + installing the deprecated packages from PyPI (which also only offer source distributions and not wheels).Benefits:
dash_core_components
- one explicit named package and one underdash.dcc
).pip list
will only listdash
and not the deprecated packages, which is also the correct thing to communicate today when it is a monorepo.The text was updated successfully, but these errors were encountered: