diff -Nru python-asdf-1.3.1/asdf/conftest.py python-asdf-1.3.3/asdf/conftest.py --- python-asdf-1.3.1/asdf/conftest.py 2017-11-03 13:06:45.000000000 +0000 +++ python-asdf-1.3.3/asdf/conftest.py 2018-03-01 13:58:57.000000000 +0000 @@ -3,34 +3,34 @@ from __future__ import absolute_import, division, unicode_literals, print_function +import os + # this contains imports plugins that configure py.test for asdf tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. +from astropy import __version__ as astropy_version from astropy.tests.pytest_plugins import * -import multiprocessing -import os -import shutil -import tempfile - import pytest import six -from .extern.RangeHTTPServer import RangeHTTPRequestHandler - # This is to figure out the affiliated package version, rather than # using Astropy's from . import version +from .tests.httpserver import HTTPServer, RangeHTTPServer packagename = os.path.basename(os.path.dirname(__file__)) TESTED_VERSIONS[packagename] = version.version -# Uncomment the following line to treat all DeprecationWarnings as -# exceptions -enable_deprecations_as_exceptions() +# Uncomment the following line to treat all DeprecationWarnings as exceptions +kwargs = {} +if astropy_version >= '3.0': + kwargs['modules_to_ignore_on_import'] = ['astropy.tests.disable_internet'] + +enable_deprecations_as_exceptions(**kwargs) try: PYTEST_HEADER_MODULES['Astropy'] = 'astropy' @@ -44,55 +44,6 @@ pass - - -def run_server(queue, tmpdir, handler_class): # pragma: no cover - """ - Runs an HTTP server serving files from given tmpdir in a separate - process. When it's ready, it sends a URL to the server over a - queue so the main process (the HTTP client) can start making - requests of it. - """ - class HTTPRequestHandler(handler_class): - def translate_path(self, path): - path = handler_class.translate_path(self, path) - path = os.path.join( - tmpdir, - os.path.relpath(path, os.getcwd())) - return path - - server = six.moves.socketserver.TCPServer( - ("127.0.0.1", 0), HTTPRequestHandler) - domain, port = server.server_address - url = "http://{0}:{1}/".format(domain, port) - - queue.put(url) - - server.serve_forever() - - -class HTTPServer(object): - handler_class = six.moves.SimpleHTTPServer.SimpleHTTPRequestHandler - - def __init__(self): - self.tmpdir = tempfile.mkdtemp() - - q = multiprocessing.Queue() - self.process = multiprocessing.Process( - target=run_server, - args=(q, self.tmpdir, self.handler_class)) - self.process.start() - self.url = q.get() - - def finalize(self): - self.process.terminate() - shutil.rmtree(self.tmpdir) - - -class RangeHTTPServer(HTTPServer): - handler_class = RangeHTTPRequestHandler - - @pytest.fixture() def httpserver(request): """ diff -Nru python-asdf-1.3.1/asdf/tests/helpers.py python-asdf-1.3.3/asdf/tests/helpers.py --- python-asdf-1.3.1/asdf/tests/helpers.py 2017-11-03 13:06:45.000000000 +0000 +++ python-asdf-1.3.3/asdf/tests/helpers.py 2018-03-01 17:08:36.000000000 +0000 @@ -1,5 +1,4 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -# -*- coding: utf-8 -*- +# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals, print_function @@ -14,10 +13,16 @@ except ImportError: ICRS = None -try: +# Attempt to maintain backwards compatibility withearlier versions of astropy +from astropy import __version__ as astropy_version +if astropy_version < '3.0': + import astropy from astropy.tests.disable_internet import INTERNET_OFF -except ImportError: - INTERNET_OFF = False + remote_data = astropy.tests.helper.remote_data +else: + import pytest + from pytest_remotedata.disable_internet import INTERNET_OFF + remote_data = pytest.mark.remote_data try: from astropy.coordinates.representation import CartesianRepresentation @@ -30,7 +35,7 @@ CartesianDifferential = None from ..asdf import AsdfFile, get_asdf_library_info -from ..conftest import RangeHTTPServer +from .httpserver import RangeHTTPServer from ..extension import _builtin_extension_list from .. import util from .. import versioning diff -Nru python-asdf-1.3.1/asdf/tests/httpserver.py python-asdf-1.3.3/asdf/tests/httpserver.py --- python-asdf-1.3.1/asdf/tests/httpserver.py 1970-01-01 00:00:00.000000000 +0000 +++ python-asdf-1.3.3/asdf/tests/httpserver.py 2018-03-01 13:58:57.000000000 +0000 @@ -0,0 +1,63 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst +# -*- coding: utf-8 -*- + +from __future__ import absolute_import, division, unicode_literals, print_function + +import os +import shutil +import multiprocessing + +import six +import tempfile + +from ..extern.RangeHTTPServer import RangeHTTPRequestHandler + + +__all__ = ['HTTPServer', 'RangeHTTPServer'] + + +def run_server(queue, tmpdir, handler_class): # pragma: no cover + """ + Runs an HTTP server serving files from given tmpdir in a separate + process. When it's ready, it sends a URL to the server over a + queue so the main process (the HTTP client) can start making + requests of it. + """ + class HTTPRequestHandler(handler_class): + def translate_path(self, path): + path = handler_class.translate_path(self, path) + path = os.path.join( + tmpdir, + os.path.relpath(path, os.getcwd())) + return path + + server = six.moves.socketserver.TCPServer( + ("127.0.0.1", 0), HTTPRequestHandler) + domain, port = server.server_address + url = "http://{0}:{1}/".format(domain, port) + + queue.put(url) + + server.serve_forever() + + +class HTTPServer(object): + handler_class = six.moves.SimpleHTTPServer.SimpleHTTPRequestHandler + + def __init__(self): + self.tmpdir = tempfile.mkdtemp() + + q = multiprocessing.Queue() + self.process = multiprocessing.Process( + target=run_server, + args=(q, self.tmpdir, self.handler_class)) + self.process.start() + self.url = q.get() + + def finalize(self): + self.process.terminate() + shutil.rmtree(self.tmpdir) + + +class RangeHTTPServer(HTTPServer): + handler_class = RangeHTTPRequestHandler diff -Nru python-asdf-1.3.1/asdf/tests/test_generic_io.py python-asdf-1.3.3/asdf/tests/test_generic_io.py --- python-asdf-1.3.1/asdf/tests/test_generic_io.py 2017-09-12 19:20:08.000000000 +0000 +++ python-asdf-1.3.3/asdf/tests/test_generic_io.py 2018-03-01 17:08:36.000000000 +0000 @@ -20,14 +20,6 @@ from . import helpers -try: - from astropy.io import fits - from astropy.tests.disable_internet import INTERNET_OFF - HAS_ASTROPY = True -except ImportError: - HAS_ASTROPY = False - INTERNET_OFF = False - def _get_small_tree(): x = np.arange(0, 10, dtype=np.float) @@ -253,7 +245,7 @@ assert len(x) == 60 -@pytest.mark.skipif(INTERNET_OFF, reason="Astropy has disabled internet access") +@helpers.remote_data @pytest.mark.skipif(sys.platform.startswith('win'), reason="Windows firewall prevents test") def test_urlopen(tree, httpserver): @@ -273,7 +265,7 @@ assert isinstance(next(ff.blocks.internal_blocks)._data, np.ndarray) -@pytest.mark.skipif(INTERNET_OFF, reason="Astropy has disabled internet access") +@helpers.remote_data @pytest.mark.skipif(sys.platform.startswith('win'), reason="Windows firewall prevents test") def test_http_connection(tree, httpserver): @@ -298,7 +290,7 @@ ff.tree['science_data'][0] == 42 -@pytest.mark.skipif(INTERNET_OFF, reason="Astropy has disabled internet access") +@helpers.remote_data @pytest.mark.skipif(sys.platform.startswith('win'), reason="Windows firewall prevents test") def test_http_connection_range(tree, rhttpserver): @@ -315,11 +307,6 @@ return fd with _roundtrip(tree, get_write_fd, get_read_fd) as ff: - if len(tree) == 4: - assert connection[0]._nreads == 0 - else: - assert connection[0]._nreads == 6 - assert len(list(ff.blocks.internal_blocks)) == 2 assert isinstance(next(ff.blocks.internal_blocks)._data, np.core.memmap) assert isinstance(next(ff.blocks.internal_blocks)._data, np.ndarray) @@ -363,6 +350,7 @@ helpers.assert_tree_match(tree, ff.tree) +@helpers.remote_data @pytest.mark.skipif(sys.platform.startswith('win'), reason="Windows firewall prevents test") def test_exploded_http(tree, httpserver): @@ -795,12 +783,14 @@ assert tr.read() == b'' -@pytest.mark.skipif('not HAS_ASTROPY') def test_is_asdf(tmpdir): # test fits + astropy = pytest.importorskip('astropy') + from astropy.io import fits + hdul = fits.HDUList() - phdu=fits.PrimaryHDU() - imhdu=fits.ImageHDU(data=np.arange(24).reshape((4,6))) + phdu= fits.PrimaryHDU() + imhdu= fits.ImageHDU(data=np.arange(24).reshape((4,6))) hdul.append(phdu) hdul.append(imhdu) path = os.path.join(str(tmpdir), 'test.fits') diff -Nru python-asdf-1.3.1/asdf/tests/test_remote_data.py python-asdf-1.3.3/asdf/tests/test_remote_data.py --- python-asdf-1.3.1/asdf/tests/test_remote_data.py 2017-09-12 19:19:04.000000000 +0000 +++ python-asdf-1.3.3/asdf/tests/test_remote_data.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -# -*- coding: utf-8 -*- - -from __future__ import absolute_import, division, unicode_literals, print_function - -import pytest - -astropy = pytest.importorskip('astropy') -from astropy.tests.helper import remote_data -from astropy.tests.disable_internet import INTERNET_OFF - -_REMOTE_DATA = False - -@remote_data('any') -def test_internet_on(): - global _REMOTE_DATA - _REMOTE_DATA = True - assert INTERNET_OFF == False - -def test_internet_off(): - if not _REMOTE_DATA: - assert INTERNET_OFF == True diff -Nru python-asdf-1.3.1/asdf/version.py python-asdf-1.3.3/asdf/version.py --- python-asdf-1.3.1/asdf/version.py 2017-11-03 15:55:17.000000000 +0000 +++ python-asdf-1.3.3/asdf/version.py 2018-03-01 17:09:08.000000000 +0000 @@ -1,4 +1,4 @@ -# Autogenerated by Astropy-affiliated package asdf's setup.py on 2017-11-03 15:55:17 +# Autogenerated by Astropy-affiliated package asdf's setup.py on 2018-03-01 17:09:08 from __future__ import unicode_literals import datetime @@ -153,7 +153,7 @@ # This function is tested but it is only ever executed within a subprocess when # creating a fake package, so it doesn't get picked up by coverage metrics. -def _get_repo_path(pathname, levels=None): # pragma: no cover +def _get_repo_path(pathname, levels=None): # pragma: no cover """ Given a file or directory name, determine the root of the git repository this path is under. If given, this won't look any higher than ``levels`` @@ -185,9 +185,10 @@ return None + _packagename = "asdf" -_last_generated_version = "1.3.1" -_last_githash = "93d796bb44d3df8b6131d8560aeaca32471b8719" +_last_generated_version = "1.3.3" +_last_githash = "a112e78aaa901c5f9dbbced2b60425c992edf896" # Determine where the source code for this module # lives. If __file__ is not a filesystem path then @@ -205,10 +206,10 @@ major = 1 minor = 3 -bugfix = 1 +bugfix = 3 release = True -timestamp = datetime.datetime(2017, 11, 3, 15, 55, 17) +timestamp = datetime.datetime(2018, 3, 1, 17, 9, 8) debug = False try: diff -Nru python-asdf-1.3.1/astropy_helpers/ah_bootstrap.py python-asdf-1.3.3/astropy_helpers/ah_bootstrap.py --- python-asdf-1.3.1/astropy_helpers/ah_bootstrap.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/ah_bootstrap.py 2018-03-01 14:00:16.000000000 +0000 @@ -19,9 +19,14 @@ contains an option called ``auto_use`` with a value of ``True``, it will automatically call the main function of this module called `use_astropy_helpers` (see that function's docstring for full details). -Otherwise no further action is taken (however, -``ah_bootstrap.use_astropy_helpers`` may be called manually from within the -setup.py script). +Otherwise no further action is taken and by default the system-installed version +of astropy-helpers will be used (however, ``ah_bootstrap.use_astropy_helpers`` +may be called manually from within the setup.py script). + +This behavior can also be controlled using the ``--auto-use`` and +``--no-auto-use`` command-line flags. For clarity, an alias for +``--no-auto-use`` is ``--use-system-astropy-helpers``, and we recommend using +the latter if needed. Additional options in the ``[ah_boostrap]`` section of setup.cfg have the same names as the arguments to `use_astropy_helpers`, and can be used to configure @@ -137,7 +142,6 @@ from setuptools import Distribution from setuptools.package_index import PackageIndex -from setuptools.sandbox import run_setup from distutils import log from distutils.debug import DEBUG @@ -147,6 +151,11 @@ DIST_NAME = 'astropy-helpers' PACKAGE_NAME = 'astropy_helpers' +if PY3: + UPPER_VERSION_EXCLUSIVE = None +else: + UPPER_VERSION_EXCLUSIVE = '3' + # Defaults for other options DOWNLOAD_IF_NEEDED = True INDEX_URL = 'https://pypi.python.org/simple' @@ -287,6 +296,18 @@ config['offline'] = True argv.remove('--offline') + if '--auto-use' in argv: + config['auto_use'] = True + argv.remove('--auto-use') + + if '--no-auto-use' in argv: + config['auto_use'] = False + argv.remove('--no-auto-use') + + if '--use-system-astropy-helpers' in argv: + config['auto_use'] = False + argv.remove('--use-system-astropy-helpers') + return config def run(self): @@ -464,9 +485,10 @@ # setup.py exists we can generate it setup_py = os.path.join(path, 'setup.py') if os.path.isfile(setup_py): - with _silence(): - run_setup(os.path.join(path, 'setup.py'), - ['egg_info']) + # We use subprocess instead of run_setup from setuptools to + # avoid segmentation faults - see the following for more details: + # https://github.com/cython/cython/issues/2104 + sp.check_output([sys.executable, 'setup.py', 'egg_info'], cwd=path) for dist in pkg_resources.find_distributions(path, True): # There should be only one... @@ -501,16 +523,32 @@ if version: req = '{0}=={1}'.format(DIST_NAME, version) else: - req = DIST_NAME + if UPPER_VERSION_EXCLUSIVE is None: + req = DIST_NAME + else: + req = '{0}<{1}'.format(DIST_NAME, UPPER_VERSION_EXCLUSIVE) attrs = {'setup_requires': [req]} + # NOTE: we need to parse the config file (e.g. setup.cfg) to make sure + # it honours the options set in the [easy_install] section, and we need + # to explicitly fetch the requirement eggs as setup_requires does not + # get honored in recent versions of setuptools: + # https://github.com/pypa/setuptools/issues/1273 + try: - if DEBUG: - _Distribution(attrs=attrs) - else: - with _silence(): - _Distribution(attrs=attrs) + + context = _verbose if DEBUG else _silence + with context(): + dist = _Distribution(attrs=attrs) + try: + dist.parse_config_files(ignore_option_errors=True) + dist.fetch_build_eggs(req) + except TypeError: + # On older versions of setuptools, ignore_option_errors + # doesn't exist, and the above two lines are not needed + # so we can just continue + pass # If the setup_requires succeeded it will have added the new dist to # the main working_set @@ -847,6 +885,10 @@ @contextlib.contextmanager +def _verbose(): + yield + +@contextlib.contextmanager def _silence(): """A context manager that silences sys.stdout and sys.stderr.""" diff -Nru python-asdf-1.3.1/astropy_helpers/appveyor.yml python-asdf-1.3.3/astropy_helpers/appveyor.yml --- python-asdf-1.3.1/astropy_helpers/appveyor.yml 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/appveyor.yml 2018-03-01 14:00:16.000000000 +0000 @@ -13,7 +13,7 @@ # babel 2.0 is known to break on Windows: # https://github.com/python-babel/babel/issues/174 - CONDA_DEPENDENCIES: "numpy Cython sphinx pytest babel!=2.0" + CONDA_DEPENDENCIES: "numpy Cython sphinx pytest babel!=2.0 setuptools" matrix: - PYTHON_VERSION: "2.7" diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/commands/build_sphinx.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/commands/build_sphinx.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/commands/build_sphinx.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/commands/build_sphinx.py 2018-03-01 14:00:16.000000000 +0000 @@ -127,7 +127,10 @@ build_cmd_path = os.path.abspath(build_cmd.build_lib) ah_importer = pkgutil.get_importer('astropy_helpers') - ah_path = os.path.abspath(ah_importer.path) + if ah_importer is None: + ah_path = '.' + else: + ah_path = os.path.abspath(ah_importer.path) # Now generate the source for and spawn a new process that runs the # command. This is needed to get the correct imports for the built diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/conftest.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/conftest.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/conftest.py 1970-01-01 00:00:00.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/conftest.py 2018-03-01 14:00:16.000000000 +0000 @@ -0,0 +1,51 @@ +# This file contains settings for pytest that are specific to astropy-helpers. +# Since we run many of the tests in sub-processes, we need to collect coverage +# data inside each subprocess and then combine it into a single .coverage file. +# To do this we set up a list which run_setup appends coverage objects to. +# This is not intended to be used by packages other than astropy-helpers. + +import os +from collections import defaultdict + +try: + from coverage import CoverageData +except ImportError: + HAS_COVERAGE = False +else: + HAS_COVERAGE = True + +if HAS_COVERAGE: + SUBPROCESS_COVERAGE = [] + + +def pytest_configure(config): + if HAS_COVERAGE: + SUBPROCESS_COVERAGE[:] = [] + + +def pytest_unconfigure(config): + + if HAS_COVERAGE: + + # We create an empty coverage data object + combined_cdata = CoverageData() + + lines = defaultdict(list) + + for cdata in SUBPROCESS_COVERAGE: + # For each CoverageData object, we go through all the files and + # change the filename from one which might be a temporary path + # to the local filename. We then only keep files that actually + # exist. + for filename in cdata.measured_files(): + try: + pos = filename.rindex('astropy_helpers') + except ValueError: + continue + short_filename = filename[pos:] + if os.path.exists(short_filename): + lines[os.path.abspath(short_filename)].extend(cdata.lines(filename)) + + combined_cdata.add_lines(lines) + + combined_cdata.write_file('.coverage.subprocess') diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/extern/automodapi/automodsumm.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/extern/automodapi/automodsumm.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/extern/automodapi/automodsumm.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/extern/automodapi/automodsumm.py 2018-02-22 15:58:01.000000000 +0000 @@ -87,13 +87,17 @@ import os import re import io +from distutils.version import LooseVersion +from sphinx import __version__ from sphinx.ext.autosummary import Autosummary from sphinx.ext.inheritance_diagram import InheritanceDiagram from docutils.parsers.rst.directives import flag from .utils import find_mod_objs, cleanup_whitespace +SPHINX_LT_17 = LooseVersion(__version__) < LooseVersion('1.7') + def _str_list_converter(argument): """ @@ -262,7 +266,7 @@ suffix = os.path.splitext(sfn)[1] if len(lines) > 0: generate_automodsumm_docs( - lines, sfn, builder=app.builder, warn=app.warn, info=app.info, + lines, sfn, app=app, builder=app.builder, warn=app.warn, info=app.info, suffix=suffix, base_path=app.srcdir, inherited_members=app.config.automodsumm_inherited_members) @@ -295,8 +299,8 @@ app : sphinx.application.Application The sphinx Application object - Return - ------ + Returns + ------- lines : list of str Lines for all `automodsumm` entries with the entries replaced by `autosummary` and the module's members added. @@ -397,7 +401,7 @@ return newlines -def generate_automodsumm_docs(lines, srcfn, suffix='.rst', warn=None, +def generate_automodsumm_docs(lines, srcfn, app=None, suffix='.rst', warn=None, info=None, base_path=None, builder=None, template_dir=None, inherited_members=False): @@ -493,7 +497,11 @@ f = open(fn, 'w') try: - doc = get_documenter(obj, parent) + + if SPHINX_LT_17: + doc = get_documenter(obj, parent) + else: + doc = get_documenter(app, obj, parent) if template_name is not None: template = template_env.get_template(template_name) @@ -511,8 +519,10 @@ items = [] for name in dir(obj): try: - documenter = get_documenter(safe_getattr(obj, name), - obj) + if SPHINX_LT_17: + documenter = get_documenter(safe_getattr(obj, name), obj) + else: + documenter = get_documenter(app, safe_getattr(obj, name), obj) except AttributeError: continue if typ is None or documenter.objtype == typ: @@ -541,8 +551,10 @@ for name in names: try: - documenter = get_documenter(safe_getattr(obj, name), - obj) + if SPHINX_LT_17: + documenter = get_documenter(safe_getattr(obj, name), obj) + else: + documenter = get_documenter(app, safe_getattr(obj, name), obj) except AttributeError: continue if typ is None or documenter.objtype == typ: diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/extern/automodapi/__init__.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/extern/automodapi/__init__.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/extern/automodapi/__init__.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/extern/automodapi/__init__.py 2018-02-22 15:58:01.000000000 +0000 @@ -1 +1 @@ -__version__ = '0.6' +__version__ = '0.7' diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/git_helpers.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/git_helpers.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/git_helpers.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/git_helpers.py 2018-02-22 15:58:01.000000000 +0000 @@ -160,7 +160,7 @@ # This function is tested but it is only ever executed within a subprocess when # creating a fake package, so it doesn't get picked up by coverage metrics. -def _get_repo_path(pathname, levels=None): # pragma: no cover +def _get_repo_path(pathname, levels=None): # pragma: no cover """ Given a file or directory name, determine the root of the git repository this path is under. If given, this won't look any higher than ``levels`` diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/openmp_helpers.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/openmp_helpers.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/openmp_helpers.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/openmp_helpers.py 2018-02-22 15:58:01.000000000 +0000 @@ -73,7 +73,7 @@ # Compile, link, and run test program ccompiler.compile(['test_openmp.c'], output_dir='objects', extra_postargs=[compile_flag]) - ccompiler.link_executable(glob.glob(os.path.join('objects', '*')), 'test_openmp', extra_postargs=[link_flag]) + ccompiler.link_executable(glob.glob(os.path.join('objects', '*' + ccompiler.obj_extension)), 'test_openmp', extra_postargs=[link_flag]) output = subprocess.check_output('./test_openmp').decode(sys.stdout.encoding or 'utf-8').splitlines() if 'nthreads=' in output[0]: diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/setup_helpers.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/setup_helpers.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/setup_helpers.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/setup_helpers.py 2018-03-01 14:00:16.000000000 +0000 @@ -141,7 +141,7 @@ "add_package_excludes must be called before all other setup helper " "functions in order to properly handle excluded packages") - _module_state['exclude_packages'].add(set(excludes)) + _module_state['exclude_packages'].update(set(excludes)) def register_commands(package, version, release, srcdir='.'): diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/coveragerc python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/coveragerc --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/coveragerc 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/coveragerc 2018-03-01 14:00:16.000000000 +0000 @@ -7,6 +7,7 @@ astropy_helpers/extern/* astropy_helpers/extern/*/* astropy_helpers/tests/* + astropy_helpers/conftest.py */test_pkg/* [report] diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/__init__.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/__init__.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/__init__.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/__init__.py 2018-03-01 14:00:16.000000000 +0000 @@ -2,11 +2,15 @@ import subprocess as sp import sys -from setuptools import sandbox - import pytest -from ..utils import extends_doc +try: + from coverage import CoverageData +except ImportError: + HAS_COVERAGE = False +else: + HAS_COVERAGE = True + from ..conftest import SUBPROCESS_COVERAGE PACKAGE_DIR = os.path.dirname(__file__) @@ -39,19 +43,41 @@ return streams + (return_code,) -@extends_doc(sandbox.run_setup) -def run_setup(*args, **kwargs): - """ - In Python 3, on MacOS X, the import cache has to be invalidated otherwise - new extensions built with ``run_setup`` do not always get picked up. - """ +def run_setup(setup_script, args): + + # This used to call setuptools.sandbox's run_setup, but due to issues with + # this and Cython (which caused segmentation faults), we now use subprocess. + + setup_script = os.path.abspath(setup_script) + + path = os.path.dirname(setup_script) + setup_script = os.path.basename(setup_script) + + if HAS_COVERAGE: + + # In this case, we run the command using the coverage command and we + # then collect the coverage data into a SUBPROCESS_COVERAGE list which + # is set up at the start of the testing process and is then combined + # into a single .coverage file at the end of the testing process. + + p = sp.Popen(['coverage', 'run', setup_script] + list(args), cwd=path, + stdout=sp.PIPE, stderr=sp.PIPE) + stdout, stderr = p.communicate() + + cdata = CoverageData() + cdata.read_file(os.path.join(path, '.coverage')) + SUBPROCESS_COVERAGE.append(cdata) - try: - return sandbox.run_setup(*args, **kwargs) - finally: - if sys.version_info[:2] >= (3, 3): - import importlib - importlib.invalidate_caches() + else: + + # Otherwise we just run the tests with Python + + p = sp.Popen([sys.executable, setup_script] + list(args), cwd=path, + stdout=sp.PIPE, stderr=sp.PIPE) + stdout, stderr = p.communicate() + + sys.stdout.write(stdout.decode('utf-8')) + sys.stderr.write(stderr.decode('utf-8')) @pytest.fixture(scope='function', autouse=True) @@ -85,23 +111,6 @@ log.set_threshold(log.WARN) -@pytest.fixture(scope='module', autouse=True) -def fix_hide_setuptools(): - """ - Workaround for https://github.com/astropy/astropy-helpers/issues/124 - - In setuptools 10.0 run_setup was changed in such a way that it sweeps - away the existing setuptools import before running the setup script. In - principle this is nice, but in the practice of testing astropy_helpers - this is problematic since we're trying to test code that has already been - imported during the testing process, and which relies on the setuptools - module that was already in use. - """ - - if hasattr(sandbox, 'hide_setuptools'): - sandbox.hide_setuptools = lambda: None - - TEST_PACKAGE_SETUP_PY = """\ #!/usr/bin/env python diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/test_ah_bootstrap.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/test_ah_bootstrap.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/test_ah_bootstrap.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/test_ah_bootstrap.py 2018-03-01 14:00:16.000000000 +0000 @@ -2,16 +2,16 @@ import glob import os +import json import textwrap from distutils.version import LooseVersion import setuptools -from setuptools.package_index import PackageIndex import pytest -from . import reset_setup_helpers, reset_distutils_log, fix_hide_setuptools # noqa +from . import reset_setup_helpers, reset_distutils_log # noqa from . import run_cmd, run_setup, testpackage from ..utils import silence @@ -23,7 +23,15 @@ import os import sys +# This import is not the real run of ah_bootstrap for the purposes of the test, +# so we need to preserve the command-line arguments otherwise these get eaten +# up by this import +args = sys.argv[:] import ah_bootstrap +sys.argv = args + +{extra} + # reset the name of the package installed by ah_boostrap to # _astropy_helpers_test_--this will prevent any confusion by pkg_resources with # any already installed packages named astropy_helpers @@ -50,9 +58,19 @@ import _astropy_helpers_test_ filename = os.path.abspath(_astropy_helpers_test_.__file__) filename = filename.replace('.pyc', '.py') # More consistent this way -print(filename) + +# We print out variables that are needed in tests below in JSON +import json +data = {{}} +data['filename'] = filename +data['ah_bootstrap.BOOTSTRAPPER.use_git'] = ah_bootstrap.BOOTSTRAPPER.use_git +print(json.dumps(data)) """ +AH_BOOTSTRAP_FILE = os.path.join(os.path.dirname(__file__), '..', '..', 'ah_bootstrap.py') + +with open(AH_BOOTSTRAP_FILE) as f: + AH_BOOTSTRAP = f.read() # The behavior checked in some of the tests depends on the version of # setuptools @@ -77,16 +95,17 @@ orig_repo = tmpdir.mkdir('orig') - # Ensure ah_bootstrap is imported from the local directory - import ah_bootstrap # noqa - with orig_repo.as_cwd(): + run_cmd('git', ['init']) + orig_repo.join('ah_bootstrap.py').write(AH_BOOTSTRAP) + run_cmd('git', ['add', 'ah_bootstrap.py']) + # Write a test setup.py that uses ah_bootstrap; it also ensures that # any previous reference to astropy_helpers is first wiped from # sys.modules - orig_repo.join('setup.py').write(TEST_SETUP_PY.format(args='')) + orig_repo.join('setup.py').write(TEST_SETUP_PY.format(args='', extra='')) run_cmd('git', ['add', 'setup.py']) # Add our own clone of the astropy_helpers repo as a submodule named @@ -106,7 +125,7 @@ run_setup('setup.py', []) stdout, stderr = capsys.readouterr() - path = stdout.strip() + path = json.loads(stdout.strip())['filename'] # Ensure that the astropy_helpers used by the setup.py is the one that # was imported from git submodule @@ -148,7 +167,18 @@ test_bootstrap_from_submodule(tmpdir, testpackage, capsys) -def test_check_submodule_no_git(tmpdir, testpackage): +UPDATE_ERROR_PATCH = """ +class UpgradeError(Exception): + pass + +def _do_upgrade(*args, **kwargs): + raise UpgradeError() + +ah_bootstrap._Bootstrapper._do_upgrade = _do_upgrade +""" + + +def test_check_submodule_no_git(capsys, tmpdir, testpackage): """ Tests that when importing astropy_helpers from a submodule, it is still recognized as a submodule even when using the --no-git option. @@ -158,17 +188,17 @@ orig_repo = tmpdir.mkdir('orig') - # Ensure ah_bootstrap is imported from the local directory - import ah_bootstrap # noqa - with orig_repo.as_cwd(): + + orig_repo.join('ah_bootstrap.py').write(AH_BOOTSTRAP) + run_cmd('git', ['init']) # Write a test setup.py that uses ah_bootstrap; it also ensures that # any previous reference to astropy_helpers is first wiped from # sys.modules args = 'auto_upgrade=True' - orig_repo.join('setup.py').write(TEST_SETUP_PY.format(args=args)) + orig_repo.join('setup.py').write(TEST_SETUP_PY.format(args=args, extra=UPDATE_ERROR_PATCH)) run_cmd('git', ['add', 'setup.py']) # Add our own clone of the astropy_helpers repo as a submodule named @@ -178,25 +208,18 @@ run_cmd('git', ['commit', '-m', 'test repository']) - # Temporarily patch _do_upgrade to fail if called - class UpgradeError(Exception): - pass - - def _do_upgrade(*args, **kwargs): - raise UpgradeError() - - orig_do_upgrade = ah_bootstrap._Bootstrapper._do_upgrade - ah_bootstrap._Bootstrapper._do_upgrade = _do_upgrade - try: - run_setup('setup.py', ['--no-git']) - except UpgradeError: + run_setup('setup.py', ['--no-git']) + + stdout, stderr = capsys.readouterr() + + use_git = bool(json.loads(stdout.strip())['ah_bootstrap.BOOTSTRAPPER.use_git']) + + if 'UpgradeError' in stderr: pytest.fail('Attempted to run auto-upgrade despite importing ' '_astropy_helpers_test_ from a git submodule') - finally: - ah_bootstrap._Bootstrapper._do_upgrade = orig_do_upgrade # Ensure that the no-git option was in fact set - assert not ah_bootstrap.BOOTSTRAPPER.use_git + assert not use_git def test_bootstrap_from_directory(tmpdir, testpackage, capsys): @@ -205,21 +228,17 @@ entirety bundled directly in the source package and not in an archive. """ - import ah_bootstrap # noqa - source = tmpdir.mkdir('source') testpackage.copy(source.join('_astropy_helpers_test_')) with source.as_cwd(): - source.join('setup.py').write(TEST_SETUP_PY.format(args='')) + + source.join('ah_bootstrap.py').write(AH_BOOTSTRAP) + + source.join('setup.py').write(TEST_SETUP_PY.format(args='', extra='')) run_setup('setup.py', []) stdout, stderr = capsys.readouterr() - - stdout = stdout.splitlines() - if stdout: - path = stdout[-1].strip() - else: - path = '' + path = json.loads(stdout.strip())['filename'] # Ensure that the astropy_helpers used by the setup.py is the one that # was imported from git submodule @@ -238,9 +257,6 @@ orig_repo = tmpdir.mkdir('orig') - # Ensure ah_bootstrap is imported from the local directory - import ah_bootstrap # noqa - # Make a source distribution of the test package with silence(): run_setup(str(testpackage.join('setup.py')), @@ -251,16 +267,19 @@ dist_file.copy(orig_repo) with orig_repo.as_cwd(): + + orig_repo.join('ah_bootstrap.py').write(AH_BOOTSTRAP) + # Write a test setup.py that uses ah_bootstrap; it also ensures that # any previous reference to astropy_helpers is first wiped from # sys.modules args = 'path={0!r}'.format(os.path.basename(str(dist_file))) - orig_repo.join('setup.py').write(TEST_SETUP_PY.format(args=args)) + orig_repo.join('setup.py').write(TEST_SETUP_PY.format(args=args, extra='')) run_setup('setup.py', []) stdout, stderr = capsys.readouterr() - path = stdout.splitlines()[-1].strip() + path = json.loads(stdout.strip())['filename'] # Installation from the .tar.gz should have resulted in a .egg # directory that the _astropy_helpers_test_ package was imported from @@ -302,8 +321,11 @@ dist_dir = testpackage.join('dist') with source.as_cwd(): + + source.join('ah_bootstrap.py').write(AH_BOOTSTRAP) + source.join('setup.py').write(TEST_SETUP_PY.format( - args='download_if_needed=True')) + args='download_if_needed=True', extra='')) source.join('setup.cfg').write(textwrap.dedent("""\ [easy_install] find_links = {find_links} @@ -312,11 +334,7 @@ run_setup('setup.py', []) stdout, stderr = capsys.readouterr() - - # Just take the last line--on Python 2.6 distutils logs warning - # messages to stdout instead of stderr, causing them to be mixed up - # with our expected output - path = stdout.splitlines()[-1].strip() + path = json.loads(stdout.strip())['filename'] # easy_install should have worked by 'installing' astropy_helpers as a # .egg in the current directory @@ -331,6 +349,22 @@ assert a == b +EXTRA_PACKAGE_INDEX = """ +from setuptools.package_index import PackageIndex + +class FakePackageIndex(PackageIndex): + def __init__(self, *args, **kwargs): + PackageIndex.__init__(self, *args, **kwargs) + self.to_scan = {dists} + + def find_packages(self, requirement): + # no-op + pass + +ah_bootstrap.PackageIndex = FakePackageIndex +""" + + def test_upgrade(tmpdir, capsys): # Run the testpackage fixture manually, since we use it multiple times in # this test to make different versions of _astropy_helpers_test_ @@ -342,7 +376,10 @@ orig_dir.copy(source.join('_astropy_helpers_test_')) with source.as_cwd(): - setup_py = TEST_SETUP_PY.format(args='auto_upgrade=True') + + source.join('ah_bootstrap.py').write(AH_BOOTSTRAP) + + setup_py = TEST_SETUP_PY.format(args='auto_upgrade=True', extra='') source.join('setup.py').write(setup_py) # This will be used to later to fake downloading the upgrade package @@ -369,43 +406,29 @@ for dist_file in upgrade_dir.visit('*.tar.gz'): dist_file.copy(source.join('dists')) - # Monkey with the PackageIndex in ah_bootstrap so that it is initialized - # with the test upgrade packages, and so that it does not actually go out - # to the internet to look for anything - import ah_bootstrap # noqa + with source.as_cwd(): + + setup_py = TEST_SETUP_PY.format(args='auto_upgrade=True', + extra=EXTRA_PACKAGE_INDEX.format(dists=dists)) + source.join('setup.py').write(setup_py) + + # Now run the source setup.py; this test is similar to + # test_download_if_needed, but we explicitly check that the correct + # *version* of _astropy_helpers_test_ was used + run_setup('setup.py', []) - class FakePackageIndex(PackageIndex): - def __init__(self, *args, **kwargs): - PackageIndex.__init__(self, *args, **kwargs) - self.to_scan = dists - - def find_packages(self, requirement): - # no-op - pass - - ah_bootstrap.PackageIndex = FakePackageIndex - - try: - with source.as_cwd(): - # Now run the source setup.py; this test is similar to - # test_download_if_needed, but we explicitly check that the correct - # *version* of _astropy_helpers_test_ was used - run_setup('setup.py', []) - - stdout, stderr = capsys.readouterr() - path = stdout.splitlines()[-1].strip() - eggs = _get_local_eggs() - assert eggs - - egg = source.join(eggs[0]) - assert os.path.isdir(str(egg)) - a = os.path.normcase(path) - b = os.path.normcase(str(egg.join('_astropy_helpers_test_', - '__init__.py'))) - assert a == b - assert 'astropy_helpers_test-0.1.1-' in str(egg) - finally: - ah_bootstrap.PackageIndex = PackageIndex + stdout, stderr = capsys.readouterr() + path = json.loads(stdout.strip())['filename'] + eggs = _get_local_eggs() + assert eggs + + egg = source.join(eggs[0]) + assert os.path.isdir(str(egg)) + a = os.path.normcase(path) + b = os.path.normcase(str(egg.join('_astropy_helpers_test_', + '__init__.py'))) + assert a == b + assert 'astropy_helpers_test-0.1.1-' in str(egg) def _get_local_eggs(path='.'): diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/test_git_helpers.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/test_git_helpers.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/test_git_helpers.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/test_git_helpers.py 2018-03-01 14:00:16.000000000 +0000 @@ -9,7 +9,7 @@ import pytest from warnings import catch_warnings -from . import reset_setup_helpers, reset_distutils_log, fix_hide_setuptools # noqa +from . import reset_setup_helpers, reset_distutils_log # noqa from . import run_cmd, run_setup, cleanup_import from astropy_helpers.git_helpers import get_git_devstr @@ -24,16 +24,20 @@ _DEV_VERSION_RE = re.compile(r'\d+\.\d+(?:\.\d+)?\.dev(\d+)') +ASTROPY_HELPERS_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) TEST_VERSION_SETUP_PY = """\ #!/usr/bin/env python +import sys from setuptools import setup NAME = 'apyhtest_eva' VERSION = {version!r} RELEASE = 'dev' not in VERSION +sys.path.insert(0, r'{astropy_helpers_path}') + from astropy_helpers.git_helpers import get_git_devstr from astropy_helpers.version_helpers import generate_version_py @@ -60,7 +64,8 @@ def make_test_package(version='42.42.dev'): test_package = tmpdir.mkdir('test_package') test_package.join('setup.py').write( - TEST_VERSION_SETUP_PY.format(version=version)) + TEST_VERSION_SETUP_PY.format(version=version, + astropy_helpers_path=ASTROPY_HELPERS_PATH)) test_package.mkdir('apyhtest_eva').join('__init__.py').write(TEST_VERSION_INIT) with test_package.as_cwd(): run_cmd('git', ['init']) diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/test_setup_helpers.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/test_setup_helpers.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/tests/test_setup_helpers.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/tests/test_setup_helpers.py 2018-03-01 14:00:16.000000000 +0000 @@ -2,7 +2,6 @@ import sys import stat import shutil -import warnings import contextlib import pytest @@ -13,11 +12,12 @@ from ..setup_helpers import get_package_info, register_commands from ..commands import build_ext -from ..utils import AstropyDeprecationWarning -from . import reset_setup_helpers, reset_distutils_log, fix_hide_setuptools # noqa +from . import reset_setup_helpers, reset_distutils_log # noqa from . import run_setup, cleanup_import +ASTROPY_HELPERS_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) + # Determine whether we're in a PY2 environment without using six USING_PY2 = sys.version_info < (3,0,0) @@ -90,12 +90,19 @@ """.format(', '.join(extensions_list)))) test_pkg.join('setup.py').write(dedent("""\ + import sys from os.path import join from setuptools import setup + sys.path.insert(0, r'{astropy_helpers_path}') from astropy_helpers.setup_helpers import register_commands from astropy_helpers.setup_helpers import get_package_info from astropy_helpers.version_helpers import generate_version_py + if '--no-cython' in sys.argv: + from astropy_helpers.commands import build_ext + build_ext.should_build_with_cython = lambda *args: False + sys.argv.remove('--no-cython') + NAME = 'apyhtest_eva' VERSION = '0.1' RELEASE = True @@ -110,7 +117,7 @@ cmdclass=cmdclassd, **package_info ) - """)) + """.format(astropy_helpers_path=ASTROPY_HELPERS_PATH))) if '' in sys.path: sys.path.remove('') @@ -164,7 +171,7 @@ assert package_info['ext_modules'][0].name == 'yoda.luke.dagobah' -def test_compiler_module(c_extension_test_package): +def test_compiler_module(capsys, c_extension_test_package): """ Test ensuring that the compiler module is built and installed for packages that have extension modules. @@ -176,18 +183,14 @@ with test_pkg.as_cwd(): # This is one of the simplest ways to install just a package into a # test directory - with warnings.catch_warnings(record=True) as w: - run_setup('setup.py', - ['install', - '--single-version-externally-managed', - '--install-lib={0}'.format(install_temp), - '--record={0}'.format(install_temp.join('record.txt'))]) - # Skip this portion of the test on windows systems with Py 2.7 since - # it is known to produce additional warnings. - if not (USING_PY2 or sys.platform.startswith('win')): - # Warning expected from get_git_devstr, called by generate_version_py - assert len(w) == 1 - assert str(w[0].message).startswith("No git repository present at") + run_setup('setup.py', + ['install', + '--single-version-externally-managed', + '--install-lib={0}'.format(install_temp), + '--record={0}'.format(install_temp.join('record.txt'))]) + + stdout, stderr = capsys.readouterr() + assert "No git repository present at" in stderr with install_temp.as_cwd(): import apyhtest_eva @@ -201,7 +204,7 @@ assert apyhtest_eva.version.compiler != 'unknown' -def test_no_cython_buildext(c_extension_test_package, monkeypatch): +def test_no_cython_buildext(capsys, c_extension_test_package, monkeypatch): """ Regression test for https://github.com/astropy/astropy-helpers/pull/35 @@ -212,18 +215,12 @@ test_pkg = c_extension_test_package - # In order for this test to test the correct code path we need to fool - # build_ext into thinking we don't have Cython installed - monkeypatch.setattr(build_ext, 'should_build_with_cython', - lambda *args: False) - with test_pkg.as_cwd(): - with warnings.catch_warnings(record=True) as w: - run_setup('setup.py', ['build_ext', '--inplace']) - # Warning expected from get_git_devstr, called by generate_version_py - if not USING_PY2: - assert len(w) == 1 - assert str(w[0].message).startswith("No git repository present at") + + run_setup('setup.py', ['build_ext', '--inplace', '--no-cython']) + + stdout, stderr = capsys.readouterr() + assert "No git repository present at" in stderr sys.path.insert(0, str(test_pkg)) @@ -235,7 +232,7 @@ sys.path.remove(str(test_pkg)) -def test_missing_cython_c_files(pyx_extension_test_package, monkeypatch): +def test_missing_cython_c_files(capsys, pyx_extension_test_package, monkeypatch): """ Regression test for https://github.com/astropy/astropy-helpers/pull/181 @@ -245,36 +242,25 @@ test_pkg = pyx_extension_test_package - # In order for this test to test the correct code path we need to fool - # build_ext into thinking we don't have Cython installed - monkeypatch.setattr(build_ext, 'should_build_with_cython', - lambda *args: False) - with test_pkg.as_cwd(): - with pytest.raises(SystemExit) as exc_info: - with warnings.catch_warnings(record=True) as w: - run_setup('setup.py', ['build_ext', '--inplace']) - # Warning expected from get_git_devstr, called by generate_version_py - if not USING_PY2: - assert len(w) == 1 - assert str(w[0].message).startswith( - "No git repository present at") - msg = ('Could not find C/C++ file ' - '{0}.(c/cpp)'.format('apyhtest_eva/unit02'.replace('/', os.sep))) + run_setup('setup.py', ['build_ext', '--inplace', '--no-cython']) + + stdout, stderr = capsys.readouterr() + assert "No git repository present at" in stderr + + msg = ('Could not find C/C++ file ' + '{0}.(c/cpp)'.format('apyhtest_eva/unit02'.replace('/', os.sep))) - assert msg in str(exc_info.value) + assert msg in stderr -@pytest.mark.parametrize('mode', ['cli', 'cli-w', 'direct', 'deprecated', 'cli-l', 'cli-error']) -def test_build_docs(tmpdir, mode): +@pytest.mark.parametrize('mode', ['cli', 'cli-w', 'deprecated', 'cli-l', 'cli-error']) +def test_build_docs(capsys, tmpdir, mode): """ Test for build_docs """ - import astropy_helpers - ah_path = os.path.dirname(astropy_helpers.__file__) - test_pkg = tmpdir.mkdir('test_pkg') test_pkg.mkdir('mypackage') @@ -290,8 +276,9 @@ pass """)) - docs = test_pkg.mkdir('docs') + test_pkg.mkdir('docs') + docs = test_pkg.join('docs') autosummary = docs.mkdir('_templates').mkdir('autosummary') autosummary.join('base.rst').write('{% extends "autosummary_core/base.rst" %}') @@ -320,6 +307,8 @@ """)) test_pkg.join('setup.py').write(dedent("""\ + import sys + sys.path.insert(0, r'{astropy_helpers_path}') from os.path import join from setuptools import setup, Extension from astropy_helpers.setup_helpers import register_commands, get_package_info @@ -336,10 +325,9 @@ cmdclass=cmdclassd, **get_package_info() ) - """)) + """.format(astropy_helpers_path=ASTROPY_HELPERS_PATH))) with test_pkg.as_cwd(): - shutil.copytree(ah_path, 'astropy_helpers') if mode == 'cli': run_setup('setup.py', ['build_docs']) @@ -348,15 +336,9 @@ elif mode == 'cli-l': run_setup('setup.py', ['build_docs', '-l']) elif mode == 'deprecated': - with pytest.warns(AstropyDeprecationWarning): - run_setup('setup.py', ['build_sphinx']) - elif mode == 'direct': # to check coverage - with docs_dir.as_cwd(): - from sphinx import main - try: - main(['-b html', '-d _build/doctrees', '.', '_build/html']) - except SystemExit as exc: - assert exc.code == 0 + run_setup('setup.py', ['build_sphinx']) + stdout, stderr = capsys.readouterr() + assert 'AstropyDeprecationWarning' in stderr def test_command_hooks(tmpdir, capsys): @@ -379,8 +361,10 @@ # A simple setup.py for the test package--running register_commands should # discover and enable the command hooks test_pkg.join('setup.py').write(dedent("""\ + import sys from os.path import join from setuptools import setup, Extension + sys.path.insert(0, r'{astropy_helpers_path}') from astropy_helpers.setup_helpers import register_commands, get_package_info NAME = '_welltall_' @@ -394,7 +378,7 @@ version=VERSION, cmdclass=cmdclassd ) - """)) + """.format(astropy_helpers_path=ASTROPY_HELPERS_PATH))) with test_pkg.as_cwd(): try: @@ -411,7 +395,7 @@ Goodbye build! """).strip() - assert want in stdout + assert want in stdout.replace('\r\n', '\n').replace('\r', '\n') def test_adjust_compiler(monkeypatch, tmpdir): @@ -549,8 +533,10 @@ module_name = 'foobar' setup_header = dedent("""\ + import sys from os.path import join from setuptools import setup, Extension + sys.path.insert(0, r'{astropy_helpers_path}') from astropy_helpers.setup_helpers import register_commands, \\ get_package_info, add_exclude_packages @@ -558,7 +544,7 @@ VERSION = 0.1 RELEASE = True - """.format(module_name=module_name)) + """.format(module_name=module_name, astropy_helpers_path=ASTROPY_HELPERS_PATH)) setup_footer = dedent("""\ setup( @@ -582,14 +568,13 @@ setup_header + error_commands + setup_footer) with error_pkg.as_cwd(): - try: - with pytest.raises(RuntimeError): - run_setup('setup.py', ['build']) - finally: - cleanup_import(module_name) + run_setup('setup.py', ['build']) + + stdout, stderr = capsys.readouterr() + assert "RuntimeError" in stderr # Test warning when using deprecated exclude parameter - warn_commands = dedent("""\ + warn_commands = dedent("""\ cmdclassd = register_commands(NAME, VERSION, RELEASE) package_info = get_package_info(exclude=['test*']) @@ -600,8 +585,6 @@ setup_header + warn_commands + setup_footer) with warn_pkg.as_cwd(): - try: - with pytest.warns(AstropyDeprecationWarning): - run_setup('setup.py', ['build']) - finally: - cleanup_import(module_name) + run_setup('setup.py', ['build']) + stdout, stderr = capsys.readouterr() + assert 'AstropyDeprecationWarning' in stderr diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/utils.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/utils.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/utils.py 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/utils.py 2018-03-01 14:00:16.000000000 +0000 @@ -308,8 +308,8 @@ function, and appends to it (along with a newline) the docstring of the wrapper function. - Example - ------- + Examples + -------- >>> def foo(): ... '''Hello.''' @@ -345,7 +345,7 @@ To mark an attribute as deprecated, use `deprecated_attribute`. Parameters - ------------ + ---------- since : str The release at which this API became deprecated. This is required. diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/version_helpers.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/version_helpers.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/version_helpers.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/version_helpers.py 2018-03-01 14:00:16.000000000 +0000 @@ -116,6 +116,7 @@ _FROZEN_VERSION_PY_WITH_GIT_HEADER = """ {git_helpers} + _packagename = "{packagename}" _last_generated_version = "{verstr}" _last_githash = "{githash}" @@ -253,7 +254,8 @@ # Likewise, keep whatever the current value is, if it exists debug = bool(current_debug) - version_py = os.path.join(srcdir, packagename, 'version.py') + package_srcdir = os.path.join(srcdir, *packagename.split('.')) + version_py = os.path.join(package_srcdir, 'version.py') if (last_generated_version != version or current_release != release or current_debug != debug): diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers/version.py python-asdf-1.3.3/astropy_helpers/astropy_helpers/version.py --- python-asdf-1.3.1/astropy_helpers/astropy_helpers/version.py 2017-08-31 14:04:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers/version.py 2018-02-22 15:58:01.000000000 +0000 @@ -1,17 +1,17 @@ -# Autogenerated by Astropy-affiliated package astropy_helpers's setup.py on 2017-08-31 10:04:54.962827 +# Autogenerated by Astropy-affiliated package astropy_helpers's setup.py on 2018-02-22 15:58:01 from __future__ import unicode_literals import datetime -version = "2.0.1" -githash = "14ca346b0da3e92e65bdc398cc8f726cbd7be57d" +version = "2.0.4" +githash = "41a607235bdc335c9c125f828bdd35502a09aff9" major = 2 minor = 0 -bugfix = 1 +bugfix = 4 release = True -timestamp = datetime.datetime(2017, 8, 31, 10, 4, 54, 962827) +timestamp = datetime.datetime(2018, 2, 22, 15, 58, 1) debug = False try: diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers.egg-info/PKG-INFO python-asdf-1.3.3/astropy_helpers/astropy_helpers.egg-info/PKG-INFO --- python-asdf-1.3.1/astropy_helpers/astropy_helpers.egg-info/PKG-INFO 2017-08-31 14:04:55.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers.egg-info/PKG-INFO 2018-02-22 15:58:01.000000000 +0000 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: astropy-helpers -Version: 2.0.1 +Version: 2.0.4 Summary: Utilities for building and installing Astropy, Astropy affiliated packages, and their respective documentation. Home-page: https://github.com/astropy/astropy-helpers Author: The Astropy Developers Author-email: astropy.team@gmail.com License: BSD +Description-Content-Type: UNKNOWN Description: astropy-helpers =============== @@ -28,8 +29,8 @@ in Numpy format * `sphinx-automodapi `_, a Sphinx - developed as part of the Astropy project. This used to be developed directly - in ``astropy-helpers`` but is now a standalone package. + extension developed as part of the Astropy project. This used to be developed + directly in ``astropy-helpers`` but is now a standalone package. Issues with these sub-modules should be reported in their respective repositories, and we will regularly update the bundled versions to reflect the latest released diff -Nru python-asdf-1.3.1/astropy_helpers/astropy_helpers.egg-info/SOURCES.txt python-asdf-1.3.3/astropy_helpers/astropy_helpers.egg-info/SOURCES.txt --- python-asdf-1.3.1/astropy_helpers/astropy_helpers.egg-info/SOURCES.txt 2017-08-31 14:04:55.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/astropy_helpers.egg-info/SOURCES.txt 2018-02-22 15:58:01.000000000 +0000 @@ -9,6 +9,7 @@ astropy_helpers/__init__.py astropy_helpers/distutils_helpers.py astropy_helpers/git_helpers.py +astropy_helpers/openmp_helpers.py astropy_helpers/setup_helpers.py astropy_helpers/test_helpers.py astropy_helpers/utils.py @@ -46,8 +47,8 @@ astropy_helpers/extern/numpydoc/__init__.py astropy_helpers/extern/numpydoc/docscrape.py astropy_helpers/extern/numpydoc/docscrape_sphinx.py -astropy_helpers/extern/numpydoc/linkcode.py astropy_helpers/extern/numpydoc/numpydoc.py +astropy_helpers/extern/numpydoc/templates/numpydoc_docstring.rst astropy_helpers/sphinx/__init__.py astropy_helpers/sphinx/conf.py astropy_helpers/sphinx/setup_package.py @@ -72,5 +73,6 @@ astropy_helpers/sphinx/themes/bootstrap-astropy/static/bootstrap-astropy.css astropy_helpers/sphinx/themes/bootstrap-astropy/static/copybutton.js astropy_helpers/sphinx/themes/bootstrap-astropy/static/sidebar.js +licenses/LICENSE_ASTROSCRAPPY.rst licenses/LICENSE_COPYBUTTON.rst licenses/LICENSE_NUMPYDOC.rst \ No newline at end of file diff -Nru python-asdf-1.3.1/astropy_helpers/CHANGES.rst python-asdf-1.3.3/astropy_helpers/CHANGES.rst --- python-asdf-1.3.1/astropy_helpers/CHANGES.rst 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/CHANGES.rst 2018-03-01 14:00:16.000000000 +0000 @@ -1,6 +1,43 @@ astropy-helpers Changelog ************************* +2.0.6 (2018-02-24) +------------------ + +- Avoid deprecation warning due to ``exclude=`` keyword in ``setup.py``. [#379] + + +2.0.5 (2018-02-22) +------------------ + +- Fix segmentation faults that occurred when the astropy-helpers submodule + was first initialized in packages that also contained Cython code. [#375] + + +2.0.4 (2018-02-09) +------------------ + +- Support dotted package names as namespace packages in generate_version_py. + [#370] + +- Fix compatibility with setuptools 36.x and above. [#372] + +- Fix false negative in add_openmp_flags_if_available when measuring code + coverage with gcc. [#374] + + +2.0.3 (2018-01-20) +------------------ + +- Make sure that astropy-helpers 3.x.x is not downloaded on Python 2. [#363] + +- The bundled version of sphinx-automodapi has been updated to v0.7. [#365] + +- Add --auto-use and --no-auto-use command-line flags to match the + ``auto_use`` configuration option, and add an alias + ``--use-system-astropy-helpers`` for ``--no-auto-use``. [#366] + + 2.0.2 (2017-10-13) ------------------ @@ -28,6 +65,7 @@ - Allow custom Sphinx doctest extension to recognize and process standard doctest directives ``testsetup`` and ``doctest``. [#335] + 2.0.1 (2017-07-28) ------------------ diff -Nru python-asdf-1.3.1/astropy_helpers/README.rst python-asdf-1.3.3/astropy_helpers/README.rst --- python-asdf-1.3.1/astropy_helpers/README.rst 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/README.rst 2018-03-01 14:00:16.000000000 +0000 @@ -20,8 +20,8 @@ in Numpy format * `sphinx-automodapi `_, a Sphinx - developed as part of the Astropy project. This used to be developed directly - in ``astropy-helpers`` but is now a standalone package. + extension developed as part of the Astropy project. This used to be developed + directly in ``astropy-helpers`` but is now a standalone package. Issues with these sub-modules should be reported in their respective repositories, and we will regularly update the bundled versions to reflect the latest released diff -Nru python-asdf-1.3.1/astropy_helpers/setup.py python-asdf-1.3.3/astropy_helpers/setup.py --- python-asdf-1.3.1/astropy_helpers/setup.py 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/setup.py 2018-03-01 14:00:16.000000000 +0000 @@ -4,11 +4,12 @@ import ah_bootstrap import pkg_resources from setuptools import setup -from astropy_helpers.setup_helpers import register_commands, get_package_info +from astropy_helpers.setup_helpers import (register_commands, get_package_info, + add_exclude_packages) from astropy_helpers.version_helpers import generate_version_py NAME = 'astropy_helpers' -VERSION = '2.0.2' +VERSION = '2.0.6' RELEASE = 'dev' not in VERSION generate_version_py(NAME, VERSION, RELEASE, False, uses_git=not RELEASE) @@ -16,6 +17,7 @@ # Use the updated version including the git rev count from astropy_helpers.version import version as VERSION +add_exclude_packages(['astropy_helpers.tests']) cmdclass = register_commands(NAME, VERSION, RELEASE) # This package actually doesn't use the Astropy test command del cmdclass['test'] @@ -46,5 +48,5 @@ ], cmdclass=cmdclass, zip_safe=False, - **get_package_info(exclude=['astropy_helpers.tests']) + **get_package_info() ) diff -Nru python-asdf-1.3.1/astropy_helpers/tox.ini python-asdf-1.3.3/astropy_helpers/tox.ini --- python-asdf-1.3.1/astropy_helpers/tox.ini 2017-08-30 20:43:09.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/tox.ini 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -[tox] -envlist = py26,py27,py32,py33,py34 - -[testenv] -deps = - pytest - numpy - Cython - Sphinx==1.2.3 -# Note: Sphinx is required to run the sphinx.ext tests -commands = - py.test {posargs} -sitepackages = False - -[testenv:py32] -deps = - pygments<=1.9 - Jinja2<2.7 - {[testenv]deps} diff -Nru python-asdf-1.3.1/astropy_helpers/.travis.yml python-asdf-1.3.3/astropy_helpers/.travis.yml --- python-asdf-1.3.1/astropy_helpers/.travis.yml 2017-10-19 18:22:54.000000000 +0000 +++ python-asdf-1.3.3/astropy_helpers/.travis.yml 2018-03-01 14:00:16.000000000 +0000 @@ -16,7 +16,7 @@ - PYTHON_VERSION=3.4 SETUPTOOLS_VERSION=20 - PYTHON_VERSION=3.5 - PYTHON_VERSION=3.6 SETUPTOOLS_VERSION=dev DEBUG=True - CONDA_DEPENDENCIES='sphinx cython numpy packaging six appdirs' + CONDA_DEPENDENCIES='sphinx cython numpy six pytest-cov' EVENT_TYPE='push pull_request cron' global: @@ -36,9 +36,18 @@ - os: linux env: PYTHON_VERSION=3.5 SPHINX_VERSION='<1.4' - os: linux - env: PYTHON_VERSION=3.5 SPHINX_VERSION='<1.5' + env: PYTHON_VERSION=3.5 SPHINX_VERSION='<1.5' SETUPTOOLS_VERSION=27 - os: linux - env: PYTHON_VERSION=3.6 SPHINX_VERSION='<1.6' + env: PYTHON_VERSION=3.6 SPHINX_VERSION='<1.6' SETUPTOOLS_VERSION=27 + +# Uncomment the following if there are issues in setuptools that we +# can't work around quickly - otherwise leave uncommented so that +# we notice when things go wrong. +# +# allow_failures: +# - env: PYTHON_VERSION=3.6 SETUPTOOLS_VERSION=dev DEBUG=True +# CONDA_DEPENDENCIES='sphinx cython numpy six pytest-cov' +# EVENT_TYPE='push pull_request cron' install: @@ -60,5 +69,11 @@ # Use full path for coveragerc; see issue #193 - py.test --cov astropy_helpers --cov-config $(pwd)/astropy_helpers/tests/coveragerc astropy_helpers + # In conftest.py we produce a .coverage.subprocess that contains coverage + # statistics for sub-processes, so we combine it with the main one here. + - mv .coverage .coverage.main + - coverage combine .coverage.main .coverage.subprocess + - coverage report + after_success: - coveralls --rcfile=astropy_helpers/tests/coveragerc diff -Nru python-asdf-1.3.1/CHANGES.rst python-asdf-1.3.3/CHANGES.rst --- python-asdf-1.3.1/CHANGES.rst 2017-11-03 15:55:07.000000000 +0000 +++ python-asdf-1.3.3/CHANGES.rst 2018-03-01 17:08:36.000000000 +0000 @@ -1,3 +1,19 @@ +1.3.3 (2018-03-01) +------------------ + +- Update test infrastructure to rely on new Astropy v3.0 plugins. [#461] + +- Disable use of 2to3. This was causing test failures on Debian builds. [#463] + +1.3.2 (2018-02-22) +------------------ + +- Updates to allow this version of ASDF to be compatible with Astropy v3.0. + [#450] + +- Remove tests that are no longer relevant due to latest updates to Astropy's + testing infrastructure. [#458] + 1.3.1 (2017-11-02) ------------------ diff -Nru python-asdf-1.3.1/debian/changelog python-asdf-1.3.3/debian/changelog --- python-asdf-1.3.1/debian/changelog 2018-02-12 07:46:14.000000000 +0000 +++ python-asdf-1.3.3/debian/changelog 2018-03-03 20:23:24.000000000 +0000 @@ -1,3 +1,11 @@ +python-asdf (1.3.3-1) unstable; urgency=low + + * New upstream version 1.3.3 + * Verify orig signature + * Rediff patches + + -- Ole Streicher Sat, 03 Mar 2018 21:23:24 +0100 + python-asdf (1.3.1-2) unstable; urgency=medium * Update VCS fields to use salsa.d.o diff -Nru python-asdf-1.3.1/debian/patches/series python-asdf-1.3.3/debian/patches/series --- python-asdf-1.3.1/debian/patches/series 2018-02-12 07:46:14.000000000 +0000 +++ python-asdf-1.3.3/debian/patches/series 2018-03-03 20:23:06.000000000 +0000 @@ -1,3 +1,2 @@ Use-astropy_helpers-provided-by-the-system.patch Use-the-packaged-MathJax.patch -Skip-failing-tests-that-require-remote-server.patch diff -Nru python-asdf-1.3.1/debian/patches/Skip-failing-tests-that-require-remote-server.patch python-asdf-1.3.3/debian/patches/Skip-failing-tests-that-require-remote-server.patch --- python-asdf-1.3.1/debian/patches/Skip-failing-tests-that-require-remote-server.patch 2018-02-12 07:46:14.000000000 +0000 +++ python-asdf-1.3.3/debian/patches/Skip-failing-tests-that-require-remote-server.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -From: Ole Streicher -Date: Mon, 12 Feb 2018 08:43:04 +0100 -Subject: Skip failing tests that require remote server - -Closes: #887531 ---- - asdf/stream.py | 14 -------------- - asdf/tests/test_generic_io.py | 1 + - asdf/tests/test_remote_data.py | 1 + - asdf/util.py | 14 -------------- - 4 files changed, 2 insertions(+), 28 deletions(-) - -diff --git a/asdf/stream.py b/asdf/stream.py -index 94b22b2..83a37f5 100644 ---- a/asdf/stream.py -+++ b/asdf/stream.py -@@ -10,20 +10,6 @@ class Stream(ndarray.NDArrayType): - """ - Used to put a streamed array into the tree. - -- Examples -- -------- -- Save a double-precision array with 1024 columns, one row at a -- time:: -- -- >>> from asdf import AsdfFile, Stream -- >>> import numpy as np -- >>> ff = AsdfFile() -- >>> ff.tree['streamed'] = Stream([1024], np.float64) -- >>> with open('test.asdf', 'wb') as fd: -- ... ff.write_to(fd) -- ... for i in range(200): -- ... nbytes = fd.write( -- ... np.array([i] * 1024, np.float64).tostring()) - """ - name = None - types = [] -diff --git a/asdf/tests/test_generic_io.py b/asdf/tests/test_generic_io.py -index edbbc43..315d96a 100644 ---- a/asdf/tests/test_generic_io.py -+++ b/asdf/tests/test_generic_io.py -@@ -256,6 +256,7 @@ def test_streams2(): - @pytest.mark.skipif(INTERNET_OFF, reason="Astropy has disabled internet access") - @pytest.mark.skipif(sys.platform.startswith('win'), - reason="Windows firewall prevents test") -+@pytest.mark.skipif(True, reason="https://bugs.debian.org/887531") - def test_urlopen(tree, httpserver): - path = os.path.join(httpserver.tmpdir, 'test.asdf') - -diff --git a/asdf/tests/test_remote_data.py b/asdf/tests/test_remote_data.py -index 7d8d848..1716954 100644 ---- a/asdf/tests/test_remote_data.py -+++ b/asdf/tests/test_remote_data.py -@@ -17,6 +17,7 @@ def test_internet_on(): - _REMOTE_DATA = True - assert INTERNET_OFF == False - -+@pytest.mark.skipif(True, reason="https://bugs.debian.org/887531") - def test_internet_off(): - if not _REMOTE_DATA: - assert INTERNET_OFF == True -diff --git a/asdf/util.py b/asdf/util.py -index 4548529..9f3b7d1 100644 ---- a/asdf/util.py -+++ b/asdf/util.py -@@ -344,20 +344,6 @@ class InheritDocstrings(type): - selecting the wrong docstring, the docstring will need to be - explicitly included on the method. - -- For example:: -- -- >>> from asdf.util import InheritDocstrings -- >>> import six -- >>> @six.add_metaclass(InheritDocstrings) -- ... class A(object): -- ... def wiggle(self): -- ... "Wiggle the thingamajig" -- ... pass -- >>> class B(A): -- ... def wiggle(self): -- ... pass -- >>> B.wiggle.__doc__ -- u'Wiggle the thingamajig' - """ - - def __init__(cls, name, bases, dct): diff -Nru python-asdf-1.3.1/debian/upstream/signing-key.asc python-asdf-1.3.3/debian/upstream/signing-key.asc --- python-asdf-1.3.1/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 +++ python-asdf-1.3.3/debian/upstream/signing-key.asc 2018-02-24 09:24:18.000000000 +0000 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBFqOzK8BCADInNhJFJIDGock4dSlQevYIDhzjFVCh8emw/AdzY3u4xdNiXuX +rRgkoDaClXQ1N/2I0LdRtsnEg1tAsmMO6w5ozw+hMROqLOvXHjxR1XX4TB7K7nft +1CcQG3HrHzbRVMBNK1SQ11OrjVAC+qu6ERP5bG33MJwssXtAGmB3Ef0CUYCW6UK9 +94g3QO/Vk7+GPZwG2EaIX5dmJFuInIftEMP/T5QX+orl+mfBRLMavb6k2aq21YpT +6d0GLnyYVRpYiJLIWRPtZwqjKDSz9bYNstJlaz0MSDt1dcvqc8FoHOYWCs/ft8Eg +MPbfFlvaJBxRj0FVbjLXe9W7QFY5gR2qAVSNABEBAAG0JERhbmllbCBEJ0F2ZWxs +YSA8ZGRhdmVsbGFAc3RzY2kuZWR1PokBVAQTAQgAPhYhBCwfgkhbx8U4oK2SXex1 +guDgeQAnBQJajsyvAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJ +EOx1guDgeQAnEIEH/iEgMfyr0I5a5E3zEiGSXs2xqMdFK1vo4DDhbOUx7EdWPMD5 +bJVprj71jcZj/0EWP0eUJVpJgv2vxm7QNBR+q9T22til9jIWd04FZWyCiAS+ygbU +sQkA/ePStnorNJGaqAQT2kUwcAnQRUxHZ3z/Z4ThIzA0v8bXdG3Ct7MLVZ64IRQB +jETKLPAdsLSGjv/ouJEy03MjdDdYt8TCmYQbx3VColLATngkqHkpbYBXHpC6UF9w +FIvQSfJSbMILJVLCNeJLK0kvdpP809GHc7uLvjCXjtZaKFbfHGuKOxQ5zGHdv1g/ +jVBNIVX7EaumUAKPHVVu7P9yLknAZkIdm9DumkO5AQ0EWo7MrwEIAMuwNXq1GQzi +UmixI9zL1AlqMedm+8hmC1eZTw5i0YWcL5umU3G/5bLTkbMe/ik2UXr/64g1Jb3n +FkXQw+MLiD6r9OjK/tAipRuFT29gX4G5FHLP7cn0a4mx0y6LLCXU7rzhDY+UmXKA +zLQpmnJdjiDdI3Cq5gFwq3B13TJ2HEbNNLm2NQu7r5D43rZwhC6MoKOEq4rhQDmU +q95yvgQ6UZXkhFMBvL3QmLXkOc7wS7Sjsvn+CkA+OjDAoSplCTOAYVFfUYy3wqiK +Oh0BQT8hChef/4TWXaScVvuKyvg+izOarNx0fepxuEx2FrlGMAJAsEwJAjx6sZl0 +tL+HIrI89csAEQEAAYkBPAQYAQgAJhYhBCwfgkhbx8U4oK2SXex1guDgeQAnBQJa +jsyvAhsMBQkDwmcAAAoJEOx1guDgeQAnsbkIALApF3OSV7bvmLSy2K+92wMR8BHw +UK7R5anNu8ZqLEtnDctp9oj7v8IixnkV1bVCNjs9BIs8KzDHpUhRqkZ7RMaexLOI +u8OZFEWrCqTSWhof/E8Q7oSKZSJkH+9CitwJFtylIjSHJC9zdZcLAEW0N5eR22Vk +NJibYdsgVnuiRIAxEszBjMBWS37SLu1LxwYXH6/ON3iLbIOVHsqnOsIqwxIChLaM +Cex0J8UDN078s2o5RM6xP7r6GNsY4Np3+DtA0SqF+6hEDV2wjS4NTKk/Vc2XG2j1 +8ihQFoxEe+oSIMQxl1AI+Hs8dMs3+Rmz+7P1q77sBuvih8acv7AElNAl05I= +=97/J +-----END PGP PUBLIC KEY BLOCK----- diff -Nru python-asdf-1.3.1/debian/watch python-asdf-1.3.3/debian/watch --- python-asdf-1.3.1/debian/watch 2017-12-22 20:48:34.000000000 +0000 +++ python-asdf-1.3.3/debian/watch 2018-02-24 09:24:18.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ +opts=uversionmangle=s/(rc|a|b|c)/~$1/,opts=pgpmode=auto \ https://pypi.debian.net/asdf/asdf-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru python-asdf-1.3.1/PKG-INFO python-asdf-1.3.3/PKG-INFO --- python-asdf-1.3.1/PKG-INFO 2017-11-03 15:55:18.000000000 +0000 +++ python-asdf-1.3.3/PKG-INFO 2018-03-01 17:09:09.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: asdf -Version: 1.3.1 +Version: 1.3.3 Summary: Python tools to handle ASDF files Home-page: http://github.com/spacetelescope/asdf Author: Erik Bray, Michael Droettboom diff -Nru python-asdf-1.3.1/setup.py python-asdf-1.3.3/setup.py --- python-asdf-1.3.1/setup.py 2017-11-03 15:55:07.000000000 +0000 +++ python-asdf-1.3.3/setup.py 2018-03-01 17:08:36.000000000 +0000 @@ -20,11 +20,6 @@ from astropy_helpers.git_helpers import get_git_devstr from astropy_helpers.version_helpers import generate_version_py -from astropy_helpers import test_helpers -def _null_validate(self): - pass -test_helpers.AstropyTest._validate_required_deps = _null_validate - # Get some values from the setup.cfg try: from ConfigParser import ConfigParser @@ -51,7 +46,7 @@ builtins._PACKAGE_NAME_ = 'asdf' # VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386) -VERSION = '1.3.1' +VERSION = '1.3.3' # Indicates if this version is a release version RELEASE = 'dev' not in VERSION @@ -135,7 +130,6 @@ long_description=LONG_DESCRIPTION, cmdclass=cmdclassd, zip_safe=False, - use_2to3=True, entry_points=entry_points, **package_info )