Skip to content

Commit 13f95c7

Browse files
committed
cleanup after rebase
1 parent 0d36664 commit 13f95c7

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

astroquery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _get_bibtex():
5454
class Conf(_config.ConfigNamespace):
5555

5656
default_cache_timeout = _config.ConfigItem(
57-
86400, # 24 hours
57+
604800 , # 1 week
5858
'Astroquery-wide default cache timeout (seconds).'
5959
)
6060
cache_location = _config.ConfigItem(

astroquery/query.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@
88
import keyring
99
import io
1010
import os
11-
import warnings
1211
import requests
1312
import textwrap
1413

1514
from datetime import datetime, timedelta
1615
from pathlib import Path
1716

1817
from astropy.config import paths
19-
from astroquery import log
2018
import astropy.units as u
2119
from astropy.utils.console import ProgressBarOrSpinner
2220
import astropy.utils.data
2321

24-
from . import version
25-
from .utils import system_tools
26-
from astroquery import conf
22+
from astroquery import version, log, conf
23+
from astroquery.utils import system_tools
24+
2725

2826
__all__ = ['BaseQuery', 'QueryWithLogin']
2927

@@ -199,7 +197,6 @@ def __init__(self):
199197

200198
self.name = self.__class__.__name__.split("Class")[0]
201199
self._cache_active = conf.use_cache
202-
self.use_cache = conf.use_cache
203200
self.cache_timeout = conf.default_cache_timeout
204201

205202

@@ -255,7 +252,7 @@ def reset_cache_preferences(self):
255252
conf.cache_location,
256253
self.__class__.__name__.split("Class")[0])
257254

258-
self.use_cache = conf.use_cache
255+
self._cache_active = conf.use_cache
259256
self.cache_timeout = conf.default_cache_timeout
260257

261258
def _request(self, method, url,
@@ -328,7 +325,7 @@ def _request(self, method, url,
328325
json=json
329326
)
330327

331-
if (cache is not False) and self.use_cache:
328+
if (cache is not False) and self._cache_active:
332329
cache = True
333330
else:
334331
cache = False

astroquery/setup_package.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33

44
def get_package_data():
55
return {'astroquery': ['CITATION']}
6-

0 commit comments

Comments
 (0)