fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.9k stars 487 forks source link

In settings.ini `min_python = 3.11` causes problem with pip install -e '.[dev]' #1372

Closed Martin15135215 closed 11 months ago

Martin15135215 commented 11 months ago

Traceback:

pip install -e '.[dev]'
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [9 lines of output]

setup.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        from pkg_resources import parse_version
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "setup.py", line 40, in <module>
          ] + ['Programming Language :: Python :: '+o for o in py_versions[py_versions.index(min_python):]] + (['License :: ' + lic[1] ] if lic[1] else []),
                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ValueError: '3.11' is not in list
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
deven367 commented 11 months ago

Yes, this is because the nbdev isn't tested with 3.11.

Martin15135215 commented 11 months ago

Thanks for the swift response!

Did you also fix the DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html? This was also shown in the traceback above.