tidy3d icon indicating copy to clipboard operation
tidy3d copied to clipboard

Future `python==3.12` compatibility.

Open daquinteroflex opened this issue 1 year ago • 2 comments

Just thought to write a list of depreciated commands we need to update throughout the frontend

  • [ ] All the typing.List, typing.Tuple, etc. need to be updated to standard list, tuple type declarations

daquinteroflex avatar Dec 15 '23 10:12 daquinteroflex

hm, so I guess python 3.12 is already out since October? are we behind in not supporting it yet?

If we change typing.Tuple -> tuple will that affect our package when running older versions of python?

tylerflex avatar Jan 05 '24 14:01 tylerflex

I'm pretty sure it's OK already in 3.9 but I don't remember if 3.8 accepts those, maybe not.

We could drop 3.8 soon although probably a few users would prefer not yet. :)

momchil-flex avatar Jan 05 '24 18:01 momchil-flex

I'd be happy if this was done sooner rather than later. My environment is at 3.12 and pip installs 2.5.2 by default, instead of 2.6.

qt-thomas avatar Apr 16 '24 19:04 qt-thomas

It would be a good time to put this in our 2.7 pre-release. However it seems like our pinning of the jaxlib version is a problem (I guess that version doesn't work with python 3.12) https://github.com/flexcompute/tidy3d/actions/runs/8713087293/job/23900800212?pr=1620

Thoughts @tylerflex ?

momchil-flex avatar Apr 16 '24 22:04 momchil-flex

@momchil-flex I think the bigger issue is that all of the type annotations (eg. typing.tuple and tuple) would need to be compatible with all versions. Last I checked, it wasn't very simple. I think once we fix the jax issue we'll run into this. It's possible we can get it done for 2.7 official release, but definitely not rc1.

tylerflex avatar Apr 17 '24 03:04 tylerflex

Yeah it won't be rc1. I see now we need to do these changes but I don't see what the problem is if we don't support 3.8 anymore. But I guess won't know until we try, but yeah let's definitely try for 2.7.

momchil-flex avatar Apr 17 '24 04:04 momchil-flex

Hi @qt-thomas, apologies for the delay on this! I'm working on it now and will try to get it done for you asap. I will comment here again whenever we've released it in pypi just so you know too.

daquinteroflex avatar Apr 17 '24 07:04 daquinteroflex

I have installed it anyway with the ignore-python-requires. I will report if I run into any issues.

On Wed, Apr 17, 2024 at 3:27 AM Dario Quintero (Flexcompute) < @.***> wrote:

Hi @qt-thomas https://github.com/qt-thomas, apologies for the delay on this! I'm working on it now and will try to get it done for you asap. I will comment here again whenever we've released it in pypi just so you know too.

— Reply to this email directly, view it on GitHub https://github.com/flexcompute/tidy3d/issues/1317#issuecomment-2060564428, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE3I4WPVETSHLEPOXPVKCETY5YP35AVCNFSM6AAAAABAWIGFB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGU3DINBSHA . You are receiving this because you were mentioned.Message ID: @.***>

qt-thomas avatar Apr 17 '24 10:04 qt-thomas

Fixed in #1622 , to appear in 2.7.0rc1 release this Monday.

momchil-flex avatar Apr 19 '24 19:04 momchil-flex