HIPS / autograd

Efficiently computes derivatives of NumPy code.
MIT License
7.03k stars 915 forks source link

Python 2 and dependency on future #606

Closed frenzymadness closed 3 months ago

frenzymadness commented 1 year ago

Hi. I see future in the list of dependencies and I've found only this one usage of it: https://github.com/HIPS/autograd/blob/e18f656118d23982bacf33380da3efc09b62cfe3/examples/data_mnist.py#L4-L6 Do you still need to support Python 2? I'm asking because future is broken with the latest Python 3.12 and will be even more with 3.13 so it might be a good idea to get rid of it.

musicinmybrain commented 7 months ago

This appears to be fixed in unreleased commit 55e3373b, which conditionalizes the dependency on the Python interpreter version and replaces most uses of future with six. When I run tox -e py313 on current master, 9a90bd6172d1882235c326c56c17a9540357d86b, I get only one test failure in test_wrapped_name_and_docs (which is due to the new behavior of stripping indentation from docstrings).

musicinmybrain commented 7 months ago

test_wrapped_name_and_docs

https://github.com/HIPS/autograd/pull/619