dash icon indicating copy to clipboard operation
dash copied to clipboard

[Feature Request] Python 3.10 support

Open tuchandra opened this issue 4 years ago • 7 comments

Is your feature request related to a problem? Please describe. Hi, I'm wondering if Dash supports Python 3.10 or if this is on the roadmap. Thanks for all your great work!

Describe the solution you'd like As a user of Dash, I would like to be able to install Dash and/or Plotly in a Python 3.10 environment.

Describe alternatives you've considered I tried searching the forums, but didn't find any results. I haven't tried building it myself yet, but plan to.

Additional context n/a

tuchandra avatar Dec 10 '21 03:12 tuchandra

We haven't tested 3.10 explicitly (which is why 3.10 isn't listed in the classifiers), but AFAIK we have never had issues with Python minor version forward compatibility. Is there anything preventing you from installing Dash in a Python 3.10 environment with a simple pip install dash?

alexcjohnson avatar Dec 10 '21 03:12 alexcjohnson

Got it, was just wondering. I was able to install via poetry (poetry add dash) just fine, so it seems like it's probably okay!

tuchandra avatar Dec 10 '21 04:12 tuchandra

Great! We'll leave this issue open until we get around to explicitly testing (probably just by bumping the 3.9 tests on CI to 3.10) and in case anyone else encounters issues running Dash in 3.10, but I'm glad to know on the surface it works.

alexcjohnson avatar Dec 10 '21 04:12 alexcjohnson

I have not had any issues with 3.10.0, for the past few weeks now. Looking forward to speed improvements in 3.10.1 soon.

dash 2.0.0 dash-bootstrap-components 1.0.2

jchang10 avatar Dec 20 '21 02:12 jchang10

I am currently using python 3.10.1 together with dash 2.0.0 and faced one issue. When trying to add a horizontal line via html.Hr, I get the following error:

File "/Users/me/Library/Caches/pypoetry/virtualenvs/krb-digital-oscilloscope-Kbg24TcP-py3.10/lib/python3.10/site-packages/dash/_validate.py", line 265, in _validate_value
    if not isinstance(child, (tuple, collections.MutableSequence)):
AttributeError: module 'collections' has no attribute 'MutableSequence'

If I see correctly, this has already been fixed 4 months ago by changing the import from collections.MutableSequence to collections.abc.MutableSequence (see here), but has not been released yet.

Do you have an idea when you want to release a new version containing this fix?

timon-schmelzer-gcx avatar Jan 17 '22 14:01 timon-schmelzer-gcx

Great! We'll leave this issue open until we get around to explicitly testing (probably just by bumping the 3.9 tests on CI to 3.10) and in case anyone else encounters issues running Dash in 3.10, but I'm glad to know on the surface it works.

Hi - has Dash testing under python 3.10 made it into your CI or is it in the roadmap? Just curious about when we could expect official support for this version of python.

bfransen-fincad avatar Aug 19 '22 23:08 bfransen-fincad

I think at this point we can safely bump the 3.9 tests in the CircleCI config to 3.10 (leaving the 3.6 tests in place) and add 3.10 to the classifiers. Should be straightforward based on the cimg/python images if anyone would like to contribute this change, otherwise we'll try to include it next time we do a round of maintenance upgrades.

alexcjohnson avatar Aug 22 '22 16:08 alexcjohnson

Do you have an idea when you want to release a new version containing this fix?

it looks like https://github.com/plotly/dash/pull/1779 was released in v2.1.0

graingert-coef avatar Jan 30 '24 16:01 graingert-coef

@alexcjohnson since this issue was opened Python 3.11 and Python 3.12 have been released - and dash projects should drop Python 3.6 and 3.7 - which versions do you want tested in CI?

Should I open a PR for testing on 3.8 and 3.12 instead of 3.6 and 3.9?

graingert-coef avatar Jan 31 '24 11:01 graingert-coef

Thanks @graingert-coef! Yeah I mostly feel it’s sufficient to test on the min and max versions we support, so advancing to 3.8 and 3.12 would be perfect. Most of the code of Dash is in the browser so testing everything in all Python minors seems overkill. If we wanted to be more thorough I suppose we could split out some of the backend-focused tests into a separate job and run just that on all minors, but again that doesn’t feel all that useful to me.

alexcjohnson avatar Jan 31 '24 12:01 alexcjohnson