jupyter / nbgrader

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.3k stars 317 forks source link

setuptools missing in dependencies #1838

Closed tholzheim closed 12 months ago

tholzheim commented 1 year ago

setuptools is used/imported in utils.py but missing as dependency in pyproject.toml leading to a ModuleNotFoundError.

https://github.com/jupyter/nbgrader/blob/2ef4451572306b7a84605c18c4a459c24fe4eb31/nbgrader/utils.py#L14-L16

How to reproduce the error

With a new python virtual environment with python 3.10 with setuptools not installed.

$ pip install nbgrader
$ nbgrader -h
Traceback (most recent call last):
  File "/home/****/bin/nbgrader", line 5, in <module>
    from nbgrader.apps.nbgraderapp import main
  File "/home/****/lib/python3.10/site-packages/nbgrader/__init__.py", line 11, in <module>
    from .server_extensions.assignment_list import load_jupyter_server_extension as load_assignments
  File "/home/****/lib/python3.10/site-packages/nbgrader/server_extensions/assignment_list/__init__.py", line 1, in <module>
    from .handlers import load_jupyter_server_extension
  File "/home/****/lib/python3.10/site-packages/nbgrader/server_extensions/assignment_list/handlers.py", line 17, in <module>
    from ...exchange import ExchangeFactory, ExchangeError
  File "/home/****/lib/python3.10/site-packages/nbgrader/exchange/__init__.py", line 2, in <module>
    from nbgrader.exchange.abc import (Exchange, ExchangeError, ExchangeCollect, ExchangeFetch, ExchangeFetchAssignment,
  File "/home/****/lib/python3.10/site-packages/nbgrader/exchange/abc/__init__.py", line 1, in <module>
    from .exchange import ExchangeError, Exchange
  File "/home/****/lib/python3.10/site-packages/nbgrader/exchange/abc/exchange.py", line 10, in <module>
    from nbgrader.coursedir import CourseDirectory
  File "/home/****/lib/python3.10/site-packages/nbgrader/coursedir.py", line 9, in <module>
    from .utils import full_split, parse_utc
  File "/home/****/lib/python3.10/site-packages/nbgrader/utils.py", line 14, in <module>
    from setuptools.archive_util import unpack_archive
ModuleNotFoundError: No module named 'setuptools'