py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
7.04k stars 926 forks source link

Change use of Protocol from typing instead of typing_extension #1058

Closed bloebp closed 11 months ago

bloebp commented 11 months ago

The graph module uses Protocols, which have been natively supported since Python 3.8 (the required minimum version for DoWhy). To support Protocols in earlier Python versions, an extension provided Protocol support. However, this extension can cause compatibility issues with newer versions of other packages. With this change, DoWhy now uses the Protocol implementation that has been available since Python 3.8.