Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpinned dependency to IPython breaks the import statement - looks like IPython 13 is not compatible. #322

Open
ja-michel opened this issue Apr 28, 2023 · 4 comments
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@ja-michel
Copy link

tests/unit/spark_etls/transformers/test_asof.py:7: in <module>
    from spark_etls.transformers.asof import MergeAsofTempo
spark_etls/transformers/asof.py:7: in <module>
    from tempo import TSDF
/opt/pyenv/versions/3.8.16/lib/python3.8/site-packages/tempo/__init__.py:1: in <module>
    from tempo.tsdf import TSDF  # noqa: F401
/opt/pyenv/versions/3.8.16/lib/python3.8/site-packages/tempo/tsdf.py:10: in <module>
    from IPython.core.display import HTML
/opt/pyenv/versions/3.8.16/lib/python3.8/site-packages/IPython/__init__.py:30: in <module>
    raise ImportError(
E   ImportError: 
E   IPython 8.13+ supports Python 3.9 and above, following NEP 29.
E   IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29.
E   When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
E   Python 3.3 and 3.4 were supported up to IPython 6.x.
E   Python 3.5 was supported with IPython 7.0 to 7.9.
E   Python 3.6 was supported with IPython up to 7.16.
E   Python 3.7 was still supported with the 7.x branch.
E   
E   See IPython `README.rst` file for more information:
E   
E       https://github.com/ipython/ipython/blob/main/README.rst

This dependency could be patched pinned to <13.0.0
https://github.com/databrickslabs/tempo/blob/master/python/setup.py#L24

@tnixon tnixon added bug Something isn't working dependencies Pull requests that update a dependency file labels Apr 28, 2023
@tnixon
Copy link
Contributor

tnixon commented Apr 28, 2023

Thanks for catching this, @ja-michel. @R7L208 can we add IPython to the tox test configuration?

@R7L208
Copy link
Contributor

R7L208 commented Apr 28, 2023

@ja-michel - can you share the command that was run so we can reproduce the error? what Python version are you using?

@ja-michel
Copy link
Author

No worries.
I'm using Python 3.8.12.
Can reproduce by importing the TSDF module:

pip install dbl-tempo
Successfully installed dbl-tempo-0.1.23

from tempo import TSDF

There's been another version of IPython released since Fri with a fix to require Python 3.9+ for IPython 8.13+. See here ipython/ipython#14053
Looks like the latest IPython will only be compatible with Python 3.9.

See below for complete stack trace.

❯ python
Python 3.8.12 | packaged by conda-forge | (default, Jan 30 2022, 23:42:07)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tempo import TSDF
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/michelaa/.conda/envs/py38/lib/python3.8/site-packages/tempo/__init__.py", line 1, in <module>
    from tempo.tsdf import TSDF  # noqa: F401
  File "/home/michelaa/.conda/envs/py38/lib/python3.8/site-packages/tempo/tsdf.py", line 9, in <module>
    from IPython.core.display import HTML
  File "/home/michelaa/.conda/envs/py38/lib/python3.8/site-packages/IPython/__init__.py", line 30, in <module>
    raise ImportError(
ImportError:
IPython 8.13+ supports Python 3.9 and above, following NEP 29.
IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Python 3.3 and 3.4 were supported up to IPython 6.x.
Python 3.5 was supported with IPython 7.0 to 7.9.
Python 3.6 was supported with IPython up to 7.16.
Python 3.7 was still supported with the 7.x branch.

See IPython `README.rst` file for more information:

    https://github.com/ipython/ipython/blob/main/README.rst


>>>

@ja-michel
Copy link
Author

ja-michel commented May 1, 2023

Just looking at the IPython code, I don't think this can be easily sorted. Since IPython started following NEP 29, it dropped support for Python < 3.9 in version 8.13.

https://github.com/ipython/ipython/blob/main/IPython/__init__.py#L29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants