Skip to content

Commit 40c58fb

Browse files
authored
Merge pull request #2511 from neutrinoceros/dep/drop_setuptools
2 parents 9a37c90 + c609884 commit 40c58fb

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

glue/main.py

+3-17
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ def load_plugins(splash=None, require_qt_plugins=False, plugins_to_load=None):
4141
# where ``setup`` is a function that does whatever is needed to set up the
4242
# plugin, such as add items to various registries.
4343

44-
import setuptools
45-
logger.info("Loading external plugins using "
46-
"setuptools=={0}".format(setuptools.__version__))
44+
logger.info("Loading external plugins")
4745

4846
from glue._plugin_helpers import iter_plugin_entry_points, PluginConfig
4947
config = PluginConfig.load()
@@ -72,21 +70,9 @@ def load_plugins(splash=None, require_qt_plugins=False, plugins_to_load=None):
7270
if not config.plugins[item.name]:
7371
continue
7472

75-
# We don't use item.load() because that then checks requirements of all
76-
# the imported packages, which can lead to errors like this one that
77-
# don't really matter:
78-
#
79-
# Exception: (pytest 2.6.0 (/Users/tom/miniconda3/envs/py27/lib/python2.7/site-packages),
80-
# Requirement.parse('pytest>=2.8'), set(['astropy']))
81-
#
82-
# Just to be clear, this kind of error does indicate that there is an
83-
# old version of a package in the environment, but this can confuse
84-
# users as importing astropy directly would work (as setuptools then
85-
# doesn't do a stringent test of dependency versions). Often this kind
86-
# of error can occur if there is a conda version of a package and an
87-
# older pip version.
88-
8973
try:
74+
# item.load() (importlib.metadata.EntryPoint.load) doesn't *always*
75+
# return a module, so, using import_module is safer here.
9076
module = import_module(item.module)
9177
function = getattr(module, item.attr)
9278
function()

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ install_requires =
3030
echo>=0.6
3131
astropy>=4.0
3232
fast_histogram>=0.12
33-
setuptools>=30.3.0
3433
ipython>=4.0
3534
dill>=0.2
3635
h5py>=2.10; python_version<'3.11'

tox.ini

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ deps =
3535
legacy: pandas==1.2.*
3636
legacy: echo==0.5.*
3737
legacy: astropy==4.0.*
38-
legacy: setuptools==30.3.*
3938
legacy: ipython==7.16.*
4039
legacy: ipykernel==5.3.*
4140
legacy: dill==0.2.*
4241
legacy: xlrd==1.2.*
4342
legacy: h5py==2.10.*
44-
legacy: mpl-scatter-density==0.7.*
43+
legacy: mpl-scatter-density==0.8.*
4544
legacy: openpyxl==3.0.*
4645
extras =
4746
test

0 commit comments

Comments
 (0)