executablebooks / sphinx-external-toc

A sphinx extension that allows the site-map to be defined in a single YAML file
https://sphinx-external-toc.readthedocs.io
MIT License
32 stars 18 forks source link

Bug: conda package v0.3.1 depends on attrs, despite its earlier removal #95

Closed trevorcampbell closed 8 months ago

trevorcampbell commented 1 year ago

Describe the bug

Hi there,

I recently tried to install a bunch of jupyter-book-related packages using micromamba, and ran into an unresolvable dependency graph related to sphinx-external-toc.

The relevant bit is here (full output below):

#0 29.05 │     └─ sphinx-external-toc [>=0.2.3,<0.3 |>=0.2.3,<0.3.0 |>=0.3.1,<0.4.0 ], which requires
#0 29.05 │        └─ attrs >=20.3,<22 , which can be installed;
#0 29.05 └─ referencing is not installable because it requires

It's my understanding that sphinx-external-toc shouldn't depend on attrs at all any more as of 0.3.0 due to PR #76 . The latest version 0.3.1 appears to have been uploaded to Conda Forge (https://anaconda.org/conda-forge/sphinx-external-toc ) on Nov 25, 2022, which aligns with the date of that release.

My guess is that attrs is still appearing in the scripts used to create the package for Conda Forge, but I don't know much about how conda package creation works, so I could be off there.


For reference, here's the full mamba install call and output:

------
 > [5/5] RUN mamba install --quiet --yes         'numpy'         'jinja2'         'altair_data_server'         'altair_saver'         'click'         'ibis-framework'         'ghp-import'         'jupytext'         'jupyter-book'         'nodejs'     && mamba clean --all -f -y     && fix-permissions "/opt/conda"     && fix-permissions "/home/jovyan":
#0 28.99 warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
#0 29.05 Could not solve for environment specs
#0 29.05 The following packages are incompatible
#0 29.05 ├─ jupyter-book is installable with the potential options
#0 29.05 │  ├─ jupyter-book [0.10.1|0.11.2|0.11.3|0.8.2] would require
#0 29.05 │  │  ├─ myst-nb ~=0.12.0 , which requires
#0 29.05 │  │  │  └─ nbconvert >=5.5,<6  with the potential options
#0 29.05 │  │  │     ├─ nbconvert [4.1.0|4.2.0|...|5.6.1] would require
#0 29.05 │  │  │     │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
#0 29.05 │  │  │     ├─ nbconvert [5.6.0|5.6.1] would require
#0 29.05 │  │  │     │  └─ python >=3.6,<3.7.0a0 , which can be installed;
#0 29.05 │  │  │     ├─ nbconvert [5.6.0|5.6.1] would require
#0 29.05 │  │  │     │  └─ python >=3.7,<3.8.0a0 , which can be installed;
#0 29.05 │  │  │     ├─ nbconvert 5.6.1 would require
#0 29.05 │  │  │     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
#0 29.05 │  │  │     └─ nbconvert [5.4.1|5.5.0|5.6.0|5.6.1] would require
#0 29.05 │  │  │        └─ jinja2 [<3a0 |>=2.4,<3a0 ] with the potential options
#0 29.05 │  │  │           ├─ jinja2 [2.10|2.8|2.9.5|2.9.6] would require
#0 29.05 │  │  │           │  └─ python 2.7* , which can be installed;
#0 29.05 │  │  │           ├─ jinja2 [2.10|2.8|2.9.5|2.9.6] would require
#0 29.05 │  │  │           │  └─ python 3.5* , which can be installed;
#0 29.05 │  │  │           ├─ jinja2 [2.10|2.8|2.9.5|2.9.6] would require
#0 29.05 │  │  │           │  └─ python 3.6* , which can be installed;
#0 29.05 │  │  │           ├─ jinja2 [2.8|2.9.5] would require
#0 29.05 │  │  │           │  └─ python 3.4* , which can be installed;
#0 29.05 │  │  │           └─ jinja2 [2.10|2.10.1|...|2.11.3] would require
#0 29.05 │  │  │              └─ markupsafe [>=0.23,<2 |>=0.23,<2.1 ] with the potential options
#0 29.05 │  │  │                 ├─ markupsafe [0.23|1.0|1.1.0|1.1.1] would require
#0 29.05 │  │  │                 │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [0.23|1.0] would require
#0 29.05 │  │  │                 │  └─ python 3.4* , which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [0.23|1.0] would require
#0 29.05 │  │  │                 │  └─ python [3.5* |>=3.5,<3.6.0a0 ], which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [0.23|1.0] would require
#0 29.05 │  │  │                 │  └─ python 3.6* , which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [1.0|1.1.0|1.1.1|2.0.0|2.0.1] would require
#0 29.05 │  │  │                 │  └─ python >=3.6,<3.7.0a0 , which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [1.0|1.1.0|1.1.1|2.0.0|2.0.1] would require
#0 29.05 │  │  │                 │  └─ python >=3.7,<3.8.0a0 , which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [1.1.1|2.0.1] would require
#0 29.05 │  │  │                 │  └─ python >=3.10,<3.11.0a0 , which can be installed;
#0 29.05 │  │  │                 ├─ markupsafe [1.1.1|2.0.0|2.0.1] would require
#0 29.05 │  │  │                 │  └─ python >=3.8,<3.9.0a0 , which can be installed;
#0 29.05 │  │  │                 └─ markupsafe [1.1.1|2.0.0|2.0.1] would require
#0 29.05 │  │  │                    └─ python >=3.9,<3.10.0a0 , which can be installed;
#0 29.05 │  │  └─ nbconvert <6  with the potential options
#0 29.05 │  │     ├─ nbconvert [4.1.0|4.2.0|...|5.6.1], which can be installed (as previously explained);
#0 29.05 │  │     ├─ nbconvert [4.1.0|4.2.0] would require
#0 29.05 │  │     │  └─ python 3.4* , which can be installed;
#0 29.05 │  │     ├─ nbconvert [4.1.0|4.2.0|5.1.1|5.2.1|5.3.0] would require
#0 29.05 │  │     │  └─ python 3.5* , which can be installed;
#0 29.05 │  │     ├─ nbconvert [5.1.1|5.2.1|5.3.0] would require
#0 29.05 │  │     │  └─ python 3.6* , which can be installed;
#0 29.05 │  │     ├─ nbconvert [5.6.0|5.6.1], which can be installed (as previously explained);
#0 29.05 │  │     ├─ nbconvert [5.6.0|5.6.1], which can be installed (as previously explained);
#0 29.05 │  │     ├─ nbconvert 5.6.1, which can be installed (as previously explained);
#0 29.05 │  │     └─ nbconvert [5.4.1|5.5.0|5.6.0|5.6.1], which can be installed (as previously explained);
#0 29.05 │  ├─ jupyter-book [0.10.2|0.11.1] would require
#0 29.05 │  │  ├─ jupyterbook-latex ~=0.3.1 , which requires
#0 29.05 │  │  │  └─ sqlalchemy >=1.3.12,<1.4  with the potential options
#0 29.05 │  │  │     ├─ sqlalchemy [1.3.12|1.3.13|1.3.14|1.3.15] would require
#0 29.05 │  │  │     │  └─ python >=2.7,<2.8.0a0 , which can be installed;
#0 29.05 │  │  │     ├─ sqlalchemy [1.3.12|1.3.13|...|1.3.23] would require
#0 29.05 │  │  │     │  └─ python >=3.6,<3.7.0a0 , which can be installed;
#0 29.05 │  │  │     ├─ sqlalchemy [1.3.12|1.3.13|...|1.3.24] would require
#0 29.05 │  │  │     │  └─ python >=3.7,<3.8.0a0 , which can be installed;
#0 29.05 │  │  │     ├─ sqlalchemy [1.3.12|1.3.13|...|1.3.24] would require
#0 29.05 │  │  │     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
#0 29.05 │  │  │     ├─ sqlalchemy [1.3.19|1.3.20|...|1.3.24] would require
#0 29.05 │  │  │     │  └─ python >=3.9,<3.10.0a0 , which can be installed;
#0 29.05 │  │  │     └─ sqlalchemy 1.3.24 would require
#0 29.05 │  │  │        └─ python >=3.10,<3.11.0a0 , which can be installed;
#0 29.05 │  │  └─ sqlalchemy >=1.3.12,<1.4 , which can be installed (as previously explained);
#0 29.05 │  └─ jupyter-book [0.12.0|0.12.1|...|0.15.1] would require
#0 29.05 │     └─ sphinx-external-toc [>=0.2.3,<0.3 |>=0.2.3,<0.3.0 |>=0.3.1,<0.4.0 ], which requires
#0 29.05 │        └─ attrs >=20.3,<22 , which can be installed;
#0 29.05 └─ referencing is not installable because it requires
#0 29.05    └─ attrs >=22.2.0 , which conflicts with any installable versions previously reported.
------
Dockerfile:17
--------------------
  16 |     # Install R packages
  17 | >>> RUN mamba install --quiet --yes \
  18 | >>>         'numpy' \
  19 | >>>         'jinja2' \
  20 | >>>         'altair_data_server' \
  21 | >>>         'altair_saver' \
  22 | >>>         'click' \
  23 | >>>         'ibis-framework' \
  24 | >>>         'ghp-import' \
  25 | >>>         'jupytext' \
  26 | >>>         'jupyter-book' \
  27 | >>>         'nodejs' \
  28 | >>>     && mamba clean --all -f -y \
  29 | >>>     && fix-permissions "${CONDA_DIR}" \
  30 | >>>     && fix-permissions "/home/${NB_USER}" 
  31 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c mamba install --quiet --yes         'numpy'         'jinja2'         'altair_data_server'         'altair_saver'         'click'         'ibis-framework'         'ghp-import'         'jupytext'         'jupyter-book'         'nodejs'     && mamba clean --all -f -y     && fix-permissions \"${CONDA_DIR}\"     && fix-permissions \"/home/${NB_USER}\"" did not complete successfully: exit code: 1

Reproduce the bug

Build the below dockerfile to reproduce.

List your environment

This build was based off the below Dockerfile on July 10, 2023:


FROM jupyter/scipy-notebook:1b04ebe67d28

USER root

# install vim and a few latex pkgs
RUN apt-get update && apt-get install -y vim texlive-latex-extra texlive-fonts-extra texlive-xetex latexmk

USER ${NB_UID}

WORKDIR "${HOME}"

# remove the "work/" directory added in an earlier layer...
RUN rm -rf work

# Install dpackages
RUN mamba install --quiet --yes \
        'numpy' \
        'jinja2' \
        'altair_data_server' \
        'altair_saver' \
        'click' \
        'ibis-framework' \
        'ghp-import' \
        'jupytext' \
        'jupyter-book' \
        'nodejs' \
    && mamba clean --all -f -y \
    && fix-permissions "${CONDA_DIR}" \
    && fix-permissions "/home/${NB_USER}"
welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

trevorcampbell commented 1 year ago

Update -- checking conda search sphinx-external-toc --info shows that indeed attrs was properly removed in 0.3.0, but somehow attrs was accidentally added back into the conda package requirements in 0.3.1:

sphinx-external-toc 0.2.4 pyhd8ed1ab_0
--------------------------------------
file name   : sphinx-external-toc-0.2.4-pyhd8ed1ab_0.tar.bz2
name        : sphinx-external-toc
version     : 0.2.4
build       : pyhd8ed1ab_0
build number: 0
size        : 24 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/sphinx-external-toc-0.2.4-pyhd8ed1ab_0.tar.bz2
md5         : 91ae8770569b73f25e1127526c1329ed
timestamp   : 2022-05-05 17:11:08 UTC
dependencies: 
  - attrs >=20.3,<22
  - click >=7.1,<9
  - python >=3.6
  - pyyaml
  - sphinx >=3,<5

sphinx-external-toc 0.3.0 pyhd8ed1ab_0
--------------------------------------
file name   : sphinx-external-toc-0.3.0-pyhd8ed1ab_0.tar.bz2
name        : sphinx-external-toc
version     : 0.3.0
build       : pyhd8ed1ab_0
build number: 0
size        : 25 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/sphinx-external-toc-0.3.0-pyhd8ed1ab_0.tar.bz2
md5         : dd04164f7eb1ff407c8085c5f39a0eb1
timestamp   : 2022-05-05 08:06:22 UTC
dependencies: 
  - click >=7.1,<9
  - python >=3.7
  - pyyaml
  - sphinx >=3,<5

sphinx-external-toc 0.3.1 pyhd8ed1ab_0
--------------------------------------
file name   : sphinx-external-toc-0.3.1-pyhd8ed1ab_0.conda
name        : sphinx-external-toc
version     : 0.3.1
build       : pyhd8ed1ab_0
build number: 0
size        : 27 KB
license     : MIT
subdir      : noarch
url         : https://conda.anaconda.org/conda-forge/noarch/sphinx-external-toc-0.3.1-pyhd8ed1ab_0.conda
md5         : 561bdf7b598d38e2962c46557bd1da12
timestamp   : 2022-11-25 12:47:42 UTC
dependencies: 
  - attrs >=20.3,<22
  - click >=7.1,<9
  - python >=3.6
  - pyyaml
  - sphinx >=3,<5
agoose77 commented 8 months ago

I think this has been resolved.