conda-forge / ipyslides-feedstock

A conda-smithy repository for ipyslides.
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

ipyslides >=3 not compatible with Python 3.6 or 3.7 #109

Closed DManowitz closed 1 month ago

DManowitz commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

ipyslides versions >= 3 currently have a dependency on python >=3.6. However, they are only compatible with Python 3.8+. If you try to import these versions of ipyslides in Python 3.6 or 3.7, you will get a syntax error.

Installed packages

N/A

Environment info

N/A
asaboor-gh commented 1 year ago

Yes you are right. IPySlides>= 3 requires at least python 3.8 and ipywidgets 8 and also newest version of IPython. This was done to comply with near the end of support for python 3.7 plus we have a shortfall of correct number for end of line in context mangers below 3.8, I needed to overcome that too. Further argument for upgrade was to smooth the experience on touch screens because slider below ipywidgets 8 is not draggable by touch. You can still use version 2.x with python 3.6 (sparingly) and 3.7(full support).

P.S. if there is depency left over for Python 3.6 mistakenly, I will clear it there.

asaboor-gh commented 1 year ago

I see version requirement to be python>= 3.8, (which is fine). Can you please calirify where is depency left for 3.6?

DManowitz commented 1 year ago
>conda search -i "ipyslides>3.0.0"
Loading channels: done
ipyslides 3.0.5 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.0.5-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.0.5
build       : pyhd8ed1ab_0
build number: 0
size        : 87 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.0.5-pyhd8ed1ab_0.conda
md5         : ddc17abf67862372dd016179d8cc51d3
timestamp   : 2023-01-03 19:17:29 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6

ipyslides 3.0.9 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.0.9-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.0.9
build       : pyhd8ed1ab_0
build number: 0
size        : 88 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.0.9-pyhd8ed1ab_0.conda
md5         : 32c70370f4037480b3f4d7ec376be0ab
timestamp   : 2023-01-09 16:40:20 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6

ipyslides 3.1.0 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.1.0-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.1.0
build       : pyhd8ed1ab_0
build number: 0
size        : 89 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.1.0-pyhd8ed1ab_0.conda
md5         : b3adeefdc2c6767c8d27c2f004fb2eac
timestamp   : 2023-01-16 16:36:05 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6

ipyslides 3.1.3 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.1.3-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.1.3
build       : pyhd8ed1ab_0
build number: 0
size        : 89 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.1.3-pyhd8ed1ab_0.conda
md5         : 6318df5f9193ed11cd63332ab6b7cc85
timestamp   : 2023-01-17 15:11:35 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6

ipyslides 3.1.5 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.1.5-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.1.5
build       : pyhd8ed1ab_0
build number: 0
size        : 89 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.1.5-pyhd8ed1ab_0.conda
md5         : 3c8b1dd380339233fbdb727e0181b27a
timestamp   : 2023-01-18 14:23:51 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6

ipyslides 3.1.6 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.1.6-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.1.6
build       : pyhd8ed1ab_0
build number: 0
size        : 89 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.1.6-pyhd8ed1ab_0.conda
md5         : 2bdfc20e547e283920f5ccae009c432f
timestamp   : 2023-01-20 16:27:34 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6

ipyslides 3.1.7 pyhd8ed1ab_0
----------------------------
file name   : ipyslides-3.1.7-pyhd8ed1ab_0.conda
name        : ipyslides
version     : 3.1.7
build       : pyhd8ed1ab_0
build number: 0
size        : 90 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/ipyslides-3.1.7-pyhd8ed1ab_0.conda
md5         : d1bad8780c14df499fb34716865c32fb
timestamp   : 2023-01-21 16:56:21 UTC
dependencies:
  - ipywidgets
  - markdown
  - markdown-customblocks
  - pillow
  - python >=3.6
asaboor-gh commented 1 year ago

It seems like conda is adding this on its own. If you see the original setup.py file on GitHub, https://github.com/massgh/ipyslides/blob/17f32fe08d1712b29f4e7359d2997f3b980da99b/setup.py#L13 You will see 3.8 there. No idea why conda is doing that or may be you have main environment in conda used by python 3.6. One solution is to install via pip inside a conda virtual environment running over python 3.8+. (You can have multiple python versions in Anaconda).

Please let me know if this gets solved.

asaboor-gh commented 1 year ago

In general, Python >= 3.6 cannot restrict python 3.8. The issue will only arise if you use it below 3.8, because there are now extra features in python 3.8 such as walrus operator, code end line attribute in a contextmanger frame etc. which are not backward compatible. So I think conda setting python >=3.6 is not an issue. Just use it with 3.8 version and you will be good to go.

DManowitz commented 1 year ago

I realize that ipyslides v3.x has code that is not compatible with Python 3.6 or 3.7, so I'm not trying to install it in such environments.

The reason I posted this issue in this repo (and not directly in the ipyslides package repo) is that this should be changed for the conda-forge packages so as to prevent someone from installing this package in a Python 3.6 or 3.7 environment, like originally happened to me.

Also, based on the contents of requirements.txt, several additional dependencies should be changed or added in the conda package to prevent installation with incompatible dependencies.

asaboor-gh commented 1 year ago

I have no idea why they put this requirement themselves in https://github.com/conda-forge/ipyslides-feedstock/blob/b35d7b553dc231fadce760e702f66dd274b38a10/recipe/meta.yaml#L25

I have to figure out if I can force it from setup.py, if I got successful, then conda will fix it automatically. Thanks for pointing it out

thewchan commented 1 year ago

I can also add python >=3.8 downstream in our recipe.