Skip to content

Commit

Permalink
Merge pull request #300 from bsipocz/python2.6_removal
Browse files Browse the repository at this point in the history
Removing python2.6 workarounds
  • Loading branch information
crawfordsm committed Feb 11, 2016
2 parents 63b4cff + cea1fc5 commit 228f1df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Other Changes and Additions
- Changed cosmicray_lacosmic to use astroscrappy for cleaning. [#272]
- CCDData arithmetic with number/Quantity now preserves any existing WCS. [#278]
- Update astropy_helpers to 1.1.1. [#287]
- Drop support for Python 2.6. [#300]

Bug Fixes
^^^^^^^^^
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ environment:

matrix:

# Note that we don't support Python 2.6 in astroplan,
# so we test Python 2.7 (whereas Astropy tests on 2.6)

- PYTHON_VERSION: "2.7"
NUMPY_VERSION: "1.10"
ASTROPY_VERSION: "stable"
Expand Down
15 changes: 4 additions & 11 deletions ccdproc/image_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy as np
import numpy.ma as ma

from astropy.table import Table, vstack
from astropy.table import Table
import astropy.io.fits as fits
from astropy.extern import six

Expand Down Expand Up @@ -306,7 +306,7 @@ def _dict_from_fits_header(self, file_name, input_summary=None,
file_table : astropy.table.Table
"""
from astropy.utils.compat.odict import OrderedDict
from collections import OrderedDict

def _add_val_to_dict(key, value, tbl_dict, n_prev):
try:
Expand Down Expand Up @@ -364,15 +364,8 @@ def _add_val_to_dict(key, value, tbl_dict, n_prev):

def _set_column_name_case_to_match_keywords(self, header_keys,
summary_table):
# Workaround for python 2.6, which doesn't have dict comprehensions.
key_name_dict = {}
for k in header_keys:
if k != k.lower():
key_name_dict[k.lower()] = k

# Once ccdproc drops support for python 2.6, change to this:
# key_name_dict = {k.lower(): k for k in header_keys
# if k != k.lower()}
key_name_dict = {k.lower(): k for k in header_keys
if k != k.lower()}

for lcase, user_case in six.iteritems(key_name_dict):
try:
Expand Down
2 changes: 1 addition & 1 deletion ccdproc/utils/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from __future__ import (absolute_import, print_function)

from astropy.utils.compat.odict import OrderedDict
from collections import OrderedDict


class CaseInsensitiveOrderedDict(OrderedDict):
Expand Down

0 comments on commit 228f1df

Please sign in to comment.