forked from pool/python-astropy
Accepting request 942986 from devel:languages:python:numeric
- Skip flaky test_color_print3 - Update to version 5.0 * https://docs.astropy.org/en/stable/whatsnew/5.0.html * Astropy 5.0 is a major release that adds significant new functionality since the 4.3.x series of releases. In addition, it is a long-term support release (LTS) which will be supported with bug fixes for two years. In particular, this release includes: * Support for reading, writing, and converting Cosmology * Cosmology units module * New Models * Added support for dask arrays in tables * Added support for registering array-like objects as mixin columns * Support for reading and writing tables to Parquet format * Support for reading and writing tables to MRT format * Support for masked quantity columns, including masked FITS columns with units * Converting SkyCoord to QTable * New Unified I/O architecture * In addition to these major changes, Astropy v5.0 includes a large number of smaller improvements and bug fixes, which are described in the Full Changelog. https://docs.astropy.org/en/stable/changelog.html#changelog - Drop patches fixed upstream * astropy-pr12006-cfitsio4.patch * astropy-pr12159-py310.patch OBS-URL: https://build.opensuse.org/request/show/942986 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-astropy?expand=0&rev=29
This commit is contained in:
commit
e6a6a667de
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2d3951223b4eb7f368fcad8c8340d27374c5d8e3b635a636275acdb38f35cd51
|
||||
size 7632486
|
3
astropy-5.0.tar.gz
Normal file
3
astropy-5.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:70203e151e13292586a817b4069ce1aad4643567aff38b1d191c173bc54f3927
|
||||
size 7823746
|
File diff suppressed because it is too large
Load Diff
@ -1,137 +0,0 @@
|
||||
From dea513d07ab6bc5bb3585cc33ead4bb6df2f8a8d Mon Sep 17 00:00:00 2001
|
||||
From: "P. L. Lim" <2090236+pllim@users.noreply.github.com>
|
||||
Date: Thu, 9 Sep 2021 15:51:50 -0400
|
||||
Subject: [PATCH] Backport PR #11962: Fix warnings with Python 3.10
|
||||
|
||||
---
|
||||
.github/workflows/ci_cron_weekly.yml | 6 +++---
|
||||
.github/workflows/ci_workflows.yml | 5 +++++
|
||||
astropy/convolution/convolve.py | 6 +++++-
|
||||
astropy/io/fits/util.py | 6 +++---
|
||||
astropy/tests/tests/test_imports.py | 2 +-
|
||||
astropy/utils/console.py | 2 +-
|
||||
docs/changes/11962.other.rst | 1 +
|
||||
tox.ini | 2 +-
|
||||
8 files changed, 20 insertions(+), 10 deletions(-)
|
||||
create mode 100644 docs/changes/11962.other.rst
|
||||
|
||||
diff --git a/.github/workflows/ci_cron_weekly.yml b/.github/workflows/ci_cron_weekly.yml
|
||||
index 207fc7d372f..66ecabedd77 100644
|
||||
--- a/.github/workflows/ci_cron_weekly.yml
|
||||
+++ b/.github/workflows/ci_cron_weekly.yml
|
||||
@@ -29,10 +29,10 @@ jobs:
|
||||
# that gives too many false positives due to URL timeouts. We also
|
||||
# install all dependencies via pip here so we pick up the latest
|
||||
# releases.
|
||||
- - name: Python 3.7 with dev version of key dependencies
|
||||
+ - name: Python 3.10 with dev version of key dependencies
|
||||
os: ubuntu-latest
|
||||
- python: 3.7
|
||||
- toxenv: py37-test-devdeps
|
||||
+ python: '3.10.0-alpha - 3.10.0'
|
||||
+ toxenv: py310-test-devdeps
|
||||
|
||||
- name: Documentation link check
|
||||
os: ubuntu-latest
|
||||
diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml
|
||||
index ee3dd88fe4e..2d596e1f16c 100644
|
||||
--- a/.github/workflows/ci_workflows.yml
|
||||
+++ b/.github/workflows/ci_workflows.yml
|
||||
@@ -58,6 +58,11 @@ jobs:
|
||||
python: 3.9
|
||||
toxenv: py39-test
|
||||
|
||||
+ - name: Python 3.10 with minimal dependencies
|
||||
+ os: ubuntu-latest
|
||||
+ python: '3.10.0-alpha - 3.10.0'
|
||||
+ toxenv: py310-test-devdeps
|
||||
+
|
||||
# NOTE: In the build below we also check that tests do not open and
|
||||
# leave open any files. This has a performance impact on running the
|
||||
# tests, hence why it is not enabled by default.
|
||||
diff --git a/astropy/convolution/convolve.py b/astropy/convolution/convolve.py
|
||||
index 86ef46e0a72..416bcd4247b 100644
|
||||
--- a/astropy/convolution/convolve.py
|
||||
+++ b/astropy/convolution/convolve.py
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import os
|
||||
import ctypes
|
||||
+import warnings
|
||||
from functools import partial
|
||||
|
||||
import numpy as np
|
||||
@@ -22,7 +23,10 @@
|
||||
LIBRARY_PATH = os.path.dirname(__file__)
|
||||
|
||||
try:
|
||||
- _convolve = load_library("_convolve", LIBRARY_PATH)
|
||||
+ with warnings.catch_warnings():
|
||||
+ # distutils.sysconfig module is deprecated in Python 3.10
|
||||
+ warnings.simplefilter('ignore', DeprecationWarning)
|
||||
+ _convolve = load_library("_convolve", LIBRARY_PATH)
|
||||
except Exception:
|
||||
raise ImportError("Convolution C extension is missing. Try re-building astropy.")
|
||||
|
||||
diff --git a/astropy/io/fits/util.py b/astropy/io/fits/util.py
|
||||
index 157b8634fdd..06e9108511c 100644
|
||||
--- a/astropy/io/fits/util.py
|
||||
+++ b/astropy/io/fits/util.py
|
||||
@@ -210,9 +210,9 @@ def ignore_sigint(func):
|
||||
def wrapped(*args, **kwargs):
|
||||
# Get the name of the current thread and determine if this is a single
|
||||
# threaded application
|
||||
- curr_thread = threading.currentThread()
|
||||
- single_thread = (threading.activeCount() == 1 and
|
||||
- curr_thread.getName() == 'MainThread')
|
||||
+ curr_thread = threading.current_thread()
|
||||
+ single_thread = (threading.active_count() == 1 and
|
||||
+ curr_thread.name == 'MainThread')
|
||||
|
||||
class SigintHandler:
|
||||
def __init__(self):
|
||||
diff --git a/astropy/tests/tests/test_imports.py b/astropy/tests/tests/test_imports.py
|
||||
index 2ce1442447a..d13c956f0f9 100644
|
||||
--- a/astropy/tests/tests/test_imports.py
|
||||
+++ b/astropy/tests/tests/test_imports.py
|
||||
@@ -19,7 +19,7 @@ def onerror(name):
|
||||
|
||||
for imper, nm, ispkg in pkgutil.walk_packages(['astropy'], 'astropy.',
|
||||
onerror=onerror):
|
||||
- imper.find_module(nm)
|
||||
+ imper.find_spec(nm)
|
||||
|
||||
|
||||
def test_toplevel_namespace():
|
||||
diff --git a/astropy/utils/console.py b/astropy/utils/console.py
|
||||
index 797859d8ba6..3de95bb07d7 100644
|
||||
--- a/astropy/utils/console.py
|
||||
+++ b/astropy/utils/console.py
|
||||
@@ -121,7 +121,7 @@ def isatty(file):
|
||||
ttys.
|
||||
"""
|
||||
if (multiprocessing.current_process().name != 'MainProcess' or
|
||||
- threading.current_thread().getName() != 'MainThread'):
|
||||
+ threading.current_thread().name != 'MainThread'):
|
||||
return False
|
||||
|
||||
if hasattr(file, 'isatty'):
|
||||
diff --git a/docs/changes/11962.other.rst b/docs/changes/11962.other.rst
|
||||
new file mode 100644
|
||||
index 00000000000..d57a7d978f2
|
||||
--- /dev/null
|
||||
+++ b/docs/changes/11962.other.rst
|
||||
@@ -0,0 +1 @@
|
||||
+Fix deprecation warnings with Python 3.10
|
||||
diff --git a/tox.ini b/tox.ini
|
||||
index 3414bb3f3b5..42a6590f915 100644
|
||||
--- a/tox.ini
|
||||
+++ b/tox.ini
|
||||
@@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
envlist =
|
||||
- py{37,38,39,dev}-test{,-alldeps,-oldestdeps,-devdeps,-numpy117,-numpy118,-numpy119}{,-cov}{,-clocale}
|
||||
+ py{37,38,39,310,dev}-test{,-alldeps,-oldestdeps,-devdeps,-numpy117,-numpy118,-numpy119}{,-cov}{,-clocale}
|
||||
build_docs
|
||||
linkcheck
|
||||
codestyle
|
@ -1,4 +1,6 @@
|
||||
addFilter('devel-file-in-non-devel-package .*/wcs/.*')
|
||||
addFilter('hidden-file-or-dir .*/tests/data/.*')
|
||||
addFilter('zero-length .*/tests/data/.*')
|
||||
addFilter('zero-length .*/index\.html')
|
||||
# https://bugzilla.opensuse.org/show_bug.cgi?id=1191584
|
||||
addFilter('unstripped-binary-or-object .*python.*\.so')
|
||||
addFilter('shared-library-without-dependency-information .*python.*\.so')
|
||||
|
@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 28 20:00:07 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Skip flaky test_color_print3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 28 12:53:13 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to version 5.0
|
||||
* https://docs.astropy.org/en/stable/whatsnew/5.0.html
|
||||
* Astropy 5.0 is a major release that adds significant new
|
||||
functionality since the 4.3.x series of releases. In addition,
|
||||
it is a long-term support release (LTS) which will be supported
|
||||
with bug fixes for two years. In particular, this release
|
||||
includes:
|
||||
* Support for reading, writing, and converting Cosmology
|
||||
* Cosmology units module
|
||||
* New Models
|
||||
* Added support for dask arrays in tables
|
||||
* Added support for registering array-like objects as mixin
|
||||
columns
|
||||
* Support for reading and writing tables to Parquet format
|
||||
* Support for reading and writing tables to MRT format
|
||||
* Support for masked quantity columns, including masked FITS
|
||||
columns with units
|
||||
* Converting SkyCoord to QTable
|
||||
* New Unified I/O architecture
|
||||
* In addition to these major changes, Astropy v5.0 includes a
|
||||
large number of smaller improvements and bug fixes, which
|
||||
are described in the Full Changelog.
|
||||
https://docs.astropy.org/en/stable/changelog.html#changelog
|
||||
- Drop patches fixed upstream
|
||||
* astropy-pr12006-cfitsio4.patch
|
||||
* astropy-pr12159-py310.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 27 17:29:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
# upcoming python3 multiflavor: minimum supported python is 3.7
|
||||
%define skip_python36 1
|
||||
Name: python-astropy%{psuffix}
|
||||
Version: 4.3.1
|
||||
Version: 5.0
|
||||
Release: 0
|
||||
Summary: Community-developed python astronomy tools
|
||||
License: BSD-3-Clause
|
||||
@ -68,43 +68,46 @@ Source: https://files.pythonhosted.org/packages/source/a/astropy/astropy
|
||||
# Mark wcs headers as false positives for devel-file-in-non-devel-package
|
||||
# These are used by the python files so they must be available.
|
||||
Source100: python-astropy-rpmlintrc
|
||||
# https://docs.astropy.org/en/v4.3post1/install.html#requirements
|
||||
# PATCH-FIX-UPSTREAM astropy-pr12006-cfitsio4.patch gh#astropy/astropy#12006
|
||||
Patch1: https://github.com/astropy/astropy/pull/12006.patch#/astropy-pr12006-cfitsio4.patch
|
||||
Patch2: https://github.com/astropy/astropy/pull/12159.patch#/astropy-pr12159-py310.patch
|
||||
# https://docs.astropy.org/en/v5.0/install.html#requirements
|
||||
BuildRequires: %{python_module Cython >= 0.29.22}
|
||||
BuildRequires: %{python_module Jinja2}
|
||||
BuildRequires: %{python_module devel >= 3.7}
|
||||
BuildRequires: %{python_module PyYAML >= 3.13}
|
||||
BuildRequires: %{python_module devel >= 3.8}
|
||||
BuildRequires: %{python_module extension-helpers}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.17}
|
||||
BuildRequires: %{python_module pyerfa >= 1.7.3}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.18}
|
||||
BuildRequires: %{python_module packaging >= 19.0}
|
||||
BuildRequires: %{python_module pyerfa >= 2.0}
|
||||
BuildRequires: %{python_module setuptools_scm >= 6.2}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: hdf5-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-PyYAML >= 3.13
|
||||
Requires: python-dbm
|
||||
Requires: python-numpy >= 1.17
|
||||
Requires: python-pyerfa >= 1.7.3
|
||||
Requires: python-numpy >= 1.18
|
||||
Requires: python-packaging >= 19.0
|
||||
Requires: python-pyerfa >= 2.0
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Recommends: libxml2-tools
|
||||
Recommends: python-Bottleneck
|
||||
Recommends: python-PyYAML >= 3.13
|
||||
Recommends: python-asdf >= 2.6
|
||||
Recommends: python-beautifulsoup4
|
||||
Recommends: python-bleach
|
||||
Recommends: python-h5py
|
||||
Recommends: python-html5lib
|
||||
Recommends: python-jplephem
|
||||
Recommends: python-matplotlib >= 3
|
||||
Recommends: python-matplotlib >= 3.1
|
||||
Recommends: python-mpmath
|
||||
Recommends: python-pandas
|
||||
Recommends: python-pyarrow >= 5
|
||||
Recommends: python-scipy >= 1.1
|
||||
Recommends: python-setuptools
|
||||
Recommends: python-sortedcontainers
|
||||
Recommends: python-typing_extensions
|
||||
Conflicts: perl-Data-ShowTable
|
||||
Conflicts: python-matplotlib = 3.4.0
|
||||
%if %{with system_cfitsio}
|
||||
BuildRequires: pkgconfig(cfitsio)
|
||||
%endif
|
||||
@ -117,18 +120,18 @@ BuildRequires: pkgconfig(wcslib) >= 7
|
||||
%if %{with test}
|
||||
# SECTION Optional requirements
|
||||
BuildRequires: %{python_module Bottleneck}
|
||||
BuildRequires: %{python_module PyYAML >= 3.13}
|
||||
BuildRequires: %{python_module asdf >= 2.6}
|
||||
BuildRequires: %{python_module beautifulsoup4}
|
||||
BuildRequires: %{python_module bleach}
|
||||
BuildRequires: %{python_module h5py}
|
||||
BuildRequires: %{python_module html5lib}
|
||||
BuildRequires: %{python_module jplephem}
|
||||
BuildRequires: %{python_module matplotlib >= 3}
|
||||
BuildRequires: %{python_module matplotlib >= 3.1}
|
||||
BuildRequires: %{python_module mpmath}
|
||||
BuildRequires: %{python_module pandas}
|
||||
BuildRequires: %{python_module scipy >= 1.1}
|
||||
BuildRequires: %{python_module scipy >= 1.3}
|
||||
BuildRequires: %{python_module sortedcontainers}
|
||||
BuildRequires: %{python_module typing_extensions}
|
||||
BuildRequires: libxml2-tools
|
||||
# /SECTION
|
||||
# SECTION test requirements
|
||||
@ -136,8 +139,7 @@ BuildRequires: libxml2-tools
|
||||
BuildRequires: %{python_module astropy = %{version}}
|
||||
BuildRequires: %{python_module ipython >= 4.2}
|
||||
BuildRequires: %{python_module objgraph}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module pytest-astropy}
|
||||
BuildRequires: %{python_module pytest-astropy >= 0.9}
|
||||
BuildRequires: %{python_module pytest-mpl}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module sgp4}
|
||||
@ -155,6 +157,8 @@ managing them.
|
||||
%if !%{with test}
|
||||
%prep
|
||||
%autosetup -p1 -n astropy-%{version}
|
||||
# avoid rpmlint zero-length error for empty module
|
||||
echo '# empty module' > astropy/samp/setup_package.py
|
||||
|
||||
# Make sure bundled libs are not used
|
||||
%if %{with system_cfitsio}
|
||||
@ -205,8 +209,8 @@ done
|
||||
# gh#astropy/astropy#12017
|
||||
donttest+=" or test_stats"
|
||||
%endif
|
||||
# https://github.com/astropy/astropy/issues/12050
|
||||
donttest+=" or (test_no_numpy_warnings and contours)"
|
||||
# this one is flaky
|
||||
donttest+=" or test_color_print3"
|
||||
testselect_expr="${donttest:+-k \"not (${donttest# or })\"}"
|
||||
# http://docs.astropy.org/en/latest/development/testguide.html#running-tests
|
||||
# running pytest directly would require building the extensions inplace
|
||||
|
Loading…
Reference in New Issue
Block a user