Skip to content

Commit 69365c7

Browse files
committed
MNT: Do not write config on import
1 parent cfe5c86 commit 69365c7

File tree

2 files changed

+0
-237
lines changed

2 files changed

+0
-237
lines changed

astroquery/_astropy_init.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,9 @@
2525

2626
if not _ASTROPY_SETUP_: # noqa
2727
import os
28-
from warnings import warn
29-
from astropy.config.configuration import (
30-
update_default_config,
31-
ConfigurationDefaultMissingError,
32-
ConfigurationDefaultMissingWarning)
3328

3429
# Create the test function for self test
3530
from astropy.tests.runner import TestRunner
3631
test = TestRunner.make_test_runner_in(os.path.dirname(__file__))
3732
test.__test__ = False
3833
__all__ += ['test']
39-
40-
# add these here so we only need to cleanup the namespace at the end
41-
config_dir = None
42-
43-
if not os.environ.get('ASTROPY_SKIP_CONFIG_UPDATE', False):
44-
config_dir = os.path.dirname(__file__)
45-
config_template = os.path.join(config_dir, __package__ + ".cfg")
46-
if os.path.isfile(config_template):
47-
try:
48-
update_default_config(
49-
__package__, config_dir, version=__version__)
50-
except TypeError as orig_error:
51-
try:
52-
update_default_config(__package__, config_dir)
53-
except ConfigurationDefaultMissingError as e:
54-
wmsg = (e.args[0] +
55-
" Cannot install default profile. If you are "
56-
"importing from source, this is expected.")
57-
warn(ConfigurationDefaultMissingWarning(wmsg))
58-
del e
59-
except Exception:
60-
raise orig_error

astroquery/astroquery.cfg

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)