Silence warning about collections import

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-07-12 14:20:04 +02:00
parent 5890385a58
commit c6a62fe472
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,23 @@
From 8b3d0ccc2381919c8de944caa6485eb88d13e819 Mon Sep 17 00:00:00 2001
From: Thomas Robitaille <thomas.robitaille@gmail.com>
Date: Thu, 6 Jun 2019 09:49:48 +0200
Subject: [PATCH] Fix import from collections
---
astropy/utils/timer.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/astropy/utils/timer.py b/astropy/utils/timer.py
index 30519b9f681..c9d0bacdb5f 100644
--- a/astropy/utils/timer.py
+++ b/astropy/utils/timer.py
@@ -4,7 +4,8 @@
# STDLIB
import time
import warnings
-from collections import Iterable, OrderedDict
+from collections import OrderedDict
+from collections.abc import Iterable
from functools import partial, wraps
# THIRD-PARTY

View File

@ -26,6 +26,8 @@ Patch1: python-astropy-system-six.patch
# https://github.com/astropy/astropy/pull/8500
Patch2: python-astropy-fix-pyyaml5-8500.patch
Patch3: https://github.com/astropy/astropy/commit/8b3d0ccc2381919c8de944caa6485eb88d13e819.patch
BuildRequires: gcc
BuildRequires: git
BuildRequires: cfitsio-devel
@ -142,6 +144,8 @@ cp %{SOURCE2} astropy/extern/ply.py
# Fix for PyYAML 5.x
%patch2 -p1
%patch3 -p1
# Force Cython re-run
echo "cython_version = 'unknown'" > astropy/cython_version.py