Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 2.6 compatibility? #21

Closed
josePhoenix opened this issue Oct 9, 2014 · 3 comments
Closed

Drop Python 2.6 compatibility? #21

josePhoenix opened this issue Oct 9, 2014 · 3 comments
Assignees
Milestone

Comments

@josePhoenix
Copy link
Collaborator

It looks like the promise of Python 2.6 compatibility is no longer true for WebbPSF. I'm fine with dropping it, and moving towards a bilingual codebase with Python 3 support (i.e. #2 ).

I notice plhstins1 and the witservs have older Python installs, so it may be necessary to maintain compatibility. If so, we should see if we can configure Travis-CI to test on Python 2.6. Or, at least, write up some instructions for setting up a Python 2.6 testing environment to make sure it's all still working.

@josePhoenix
Copy link
Collaborator Author

After installing Python 2.6.9 through conda, and master from josephoenix/poppy and josephoenix/webbpsf, this is the error I was getting:

$ python
Python 2.6.9 |Continuum Analytics, Inc.| (unknown, Jan 10 2014, 13:33:57)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbpsf
WebbPSF log messages of level INFO and above will be shown.
WebbPSF log outputs will be directed to the screen.
>>> webbpsf.Instrument('NIRCam')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jlong/src/webbpsf/webbpsf/webbpsf_core.py", line 1288, in Instrument
    if name == 'nircam': return NIRCam()
  File "/Users/jlong/src/webbpsf/webbpsf/webbpsf_core.py", line 871, in __init__
    self.detector=self.detector_list[0]
  File "/Users/jlong/src/webbpsf/webbpsf/webbpsf_core.py", line 262, in detector
    self._detector = DetectorGeometry(self.name, siaf_aperture_name, shortname=detname)
  File "/Users/jlong/src/webbpsf/webbpsf/webbpsf_core.py", line 1343, in __init__
    self.mysiaf = SIAF(instr=self.instrname, basepath=os.path.join( utils.get_webbpsf_data_path(), self.instrname) )
  File "/Users/jlong/src/webbpsf/webbpsf/jwxml.py", line 576, in __init__
    for entry in self._tree.getroot().iter('SiafEntry'):
AttributeError: iter
>>>

@mperrin
Copy link
Owner

mperrin commented Nov 5, 2014

Just a comment here I agree with all of the above, and we should just update the docs to say >= 2.7.

@josePhoenix
Copy link
Collaborator Author

Closed by #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants