dowhy icon indicating copy to clipboard operation
dowhy copied to clipboard

Add Python 3.13 support and update dependencies

Open bloebp opened this issue 6 months ago • 1 comments

bloebp avatar Jun 23 '25 18:06 bloebp

Ok I am running into a lot of issues here. Will need some help in revising/cleaning up the workflows:

  • Seems the pyproject.toml requires a new format (having a [project] section) (see https://github.com/py-why/dowhy/actions/runs/15859223962/job/44711992576?pr=1328)
  • Our current docs workflow is based on Python 3.8, however, from setuptools version 77+, 3.8 is not supported anymore. If we want to deprecate 3.8, we need to change the docker usage.
  • With the new requirements that packages need to follow pep517, some packages cannot be installed by default (e.g., shap or econml). So, we need additional logic to override this requirement (see e.g., https://github.com/py-why/dowhy/actions/runs/15859223980/job/44711993046?pr=1328)

bloebp avatar Jun 24 '25 19:06 bloebp

I have fixed the doc build. I think the only issue left is that econml is not supporting 3.13 yet (https://github.com/py-why/dowhy/actions/runs/16033057739/job/45238127600?pr=1328).

bloebp avatar Jul 02 '25 20:07 bloebp

I have fixed the doc build. I think the only issue left is that econml is not supporting 3.13 yet (https://github.com/py-why/dowhy/actions/runs/16033057739/job/45238127600?pr=1328).

that's amazing. thanks @bloebp . I think pyproject is also fixed now. For econml, I've pinged @kbattocchi to see if they will be updating to Py3.13 soon.

amit-sharma avatar Jul 03 '25 03:07 amit-sharma

EconML now has a version that supports py3.13. Thanks @kbattocchi

Merging into main and running the CI again

amit-sharma avatar Jul 12 '25 14:07 amit-sharma

Some context for the potential numpy issue: https://github.com/cvxpy/cvxpy/issues/2840

Pinning numpy to <2 in dowhy is not good. Numpy <2 is almost end of life: https://scientific-python.org/specs/spec-0000/ It also just makes dowhy super incompatible with everything else.

Zethson avatar Jul 16 '25 16:07 Zethson

The numpy version can be depended on the Python version (use > 2.0 for newer Python versions and < for older ones that need it).

bloebp avatar Jul 16 '25 17:07 bloebp

finally, this PR is ready for review. @bloebp @Zethson please take a look.

once you approve, I can create a new minor release that supports py3.13.

amit-sharma avatar Jul 20 '25 09:07 amit-sharma

@amit-sharma can you check if you can approve the PR? Since I initially opened the PR, I cannot approve it

bloebp avatar Jul 23 '25 14:07 bloebp