[Debian-astro-commits] [python-astropy] 01/01: Finally fix test failure
Ole Streicher
olebole at moszumanska.debian.org
Fri Jan 15 08:58:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch debian
in repository python-astropy.
commit 05b1301965633f15853c1453ef8bcfd820407455
Author: Ole Streicher <olebole at debian.org>
Date: Thu Jan 14 23:08:57 2016 +0100
Finally fix test failure
---
debian/changelog | 8 +++--
debian/patches/downgrade_astropy_wcs_py.patch | 47 ---------------------------
debian/patches/fix_astropy_wcs_py.patch | 15 +++++++++
debian/patches/series | 2 +-
4 files changed, 21 insertions(+), 51 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3da660d..fb0f1ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-python-astropy (1.1.1-1~exp2) UNRELEASED; urgency=low
+python-astropy (1.1.1-2) unstable; urgency=low
- * Fix dependency of python-astropy-utils on python-astropy.
+ * Fix dependency of python-astropy-utils on python-astropy
+ * Finally fix test failure
+ * Switch back to unstable since bugfix is approved upstream
- -- Ole Streicher <olebole at debian.org> Thu, 14 Jan 2016 11:24:10 +0100
+ -- Ole Streicher <olebole at debian.org> Thu, 14 Jan 2016 23:06:52 +0100
python-astropy (1.1.1-1~exp1) experimental; urgency=low
diff --git a/debian/patches/downgrade_astropy_wcs_py.patch b/debian/patches/downgrade_astropy_wcs_py.patch
deleted file mode 100644
index 622ec53..0000000
--- a/debian/patches/downgrade_astropy_wcs_py.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Ole Streicher <olebole at debian.org>
-Subject: Reverse "Optimize instantiation of WCS object"
- This patch reverses patch 6d4552e450129 from Kacper Kowalik (Xarthisius)
- <xarthisius.kk at gmail.com>:
- .
- In WCS._remove_sip_kw() instead of testing existence of
- 40k keywords, use regular expression to identify SIP ones.
-Bug: https://github.com/astropy/astropy/issues/ 4460
---- a/astropy/wcs/wcs.py
-+++ b/astropy/wcs/wcs.py
-@@ -34,7 +34,6 @@
- import copy
- import io
- import os
--import re
- import textwrap
- import warnings
- import platform
-@@ -132,11 +131,6 @@
- # Additional relax bit flags
- WCSHDO_SIP = 0x10000
-
--# Regular expression defining SIP keyword
--# It matches keyword that starts with A, B, AP or B, followed by an underscore then
--# a number in range of 0-19, followed by an underscore and another number
--# in range of 0-19. Keyword optionally ends with a capital letter.
--SIP_KW = re.compile('''^(A|B|AP|BP)_(?:[0-9]|1[0-9])_(?:[0-9]|1[0-9])(|[A-Z])$''')
-
- def _parse_keysel(keysel):
- keysel_flags = 0
-@@ -988,9 +982,13 @@
- """
- # Never pass SIP coefficients to wcslib
- # CTYPE must be passed with -SIP to wcslib
-- for key in (m.group() for m in map(SIP_KW.match, header.keys())
-- if m is not None):
-- del header[key]
-+ for sel in [''] + [chr(i + ord('A')) for i in range(26)]:
-+ for prefix in ('A', 'B', 'AP', 'BP'):
-+ for i in range(20):
-+ for j in range(20):
-+ key = '{0}_{1}_{2}{3}'.format(prefix, i, j, sel)
-+ if key in header:
-+ del header[key]
-
- def _read_sip_kw(self, header):
- """
diff --git a/debian/patches/fix_astropy_wcs_py.patch b/debian/patches/fix_astropy_wcs_py.patch
new file mode 100644
index 0000000..efb1273
--- /dev/null
+++ b/debian/patches/fix_astropy_wcs_py.patch
@@ -0,0 +1,15 @@
+Author: Kacper Kowalik <xarthisius.kk at gmail.com>
+Description: Copy keys to a list, since orignal map is modified
+Url: https://github.com/astropy/astropy/issues/4477
+Bug: https://github.com/astropy/astropy/issues/4460
+--- a/astropy/wcs/wcs.py
++++ b/astropy/wcs/wcs.py
+@@ -988,7 +988,7 @@
+ """
+ # Never pass SIP coefficients to wcslib
+ # CTYPE must be passed with -SIP to wcslib
+- for key in (m.group() for m in map(SIP_KW.match, header.keys())
++ for key in (m.group() for m in map(SIP_KW.match, list(header))
+ if m is not None):
+ del header[key]
+
diff --git a/debian/patches/series b/debian/patches/series
index c4b567f..cb43c51 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
mark_known_failures.patch
disable_helper.patch
-downgrade_astropy_wcs_py.patch
+fix_astropy_wcs_py.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-astropy.git
More information about the Debian-astro-commits
mailing list