astropy/sphinx-astropy

Cannot install v1.9.0: AttributeError: _DistInfoDistribution__dep_map

Closed this issue · 9 comments

Building documentation for sbpy broke today, and I've narrowed it down to sphinx-astropy v1.9. The error message can be seen at:

https://readthedocs.org/projects/sbpy/builds/20943981/

...
Collecting importlib-resources>=3.2.0 (from matplotlib>=3.0->sbpy==0.1.dev77+g6410c5b)
  Downloading importlib_resources-5.12.0-py3-none-any.whl (36 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/sbpy/envs/370/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3108, in _dep_map
    return self.__dep_map
  File "/home/docs/checkouts/readthedocs.org/user_builds/sbpy/envs/370/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
...

The package that this crashes under varies. Here it was importlib, but locally it was python_dateutil, or keyring, or tomli, and maybe others. I don't think the package is the real issue though. Searching the internet for "AttributeError: _DistInfoDistribution__dep_map" doesn't tell me anything.

Our Readthedocs build is using Python 3.9, but locally I have been using 3.10.

Any ideas on what this could be? Need more info? I will build with v1.8.0 for now. https://readthedocs.org/projects/sbpy/builds/20944799/

Thanks!

pllim commented

Sorry about that. I'll investigate!

pllim commented

I am not actually sure if it is related directly to sphinx-astropy . It makes no sense how the changes here would cause such pinning (copied from your failed log):

python -m pip install --upgrade --no-cache-dir -I pillow mock==1.0.1
alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.9.1 recommonmark==0.5.0
sphinx<2 sphinx-rtd-theme<0.5 readthedocs-sphinx-ext<2.3 jinja2<3.1.0 setuptools

I remember seeing this error in this package during release yesterday but the only way I could fix it was to upgrade to Python 3.11 in the RTD config.

pllim commented

Unless... I used too new a Python to build the wheel?

python-version: "3.11"

pllim commented

OMG... I dunno why but turns out I cannot use "v2" for older Python. 🤦

pllim commented

More info is somehow version=None got passed from markers -> specifiers -> packaging.version. Perhaps it erroneously think "v2" is a version in itself... 🤷

pllim commented

@mkelley , can you please test with sphinx-astropy 1.9.1 ? 🤞

pllim commented

If it works, please close this issue. I am pretty confident it does because another package was affected and the doc build just passed, but I would still like to hear from you. Thanks!

It works! Thanks for the quick fix.

pllim commented

Sorry for breaking it in the first place!