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

Fixes for python3.8, and tweak travis-ci testing #138

Merged
merged 4 commits into from
Mar 3, 2020

Conversation

billsacks
Copy link
Member

  • Critical fix needed for python3.8
  • pylint fix needed for all versions of python 3
  • Add python3.7 and python3.8 testing through travis-ci
  • Remove travis-ci testing on Mac OS (which was using python2, and was
    failing)

User interface changes?: No

Fixes ESMCI/cime#135 ("dictionary keys changed during iteration" when
running checkout_externals)

Testing: 'make lint', 'make test'
test removed: travis-ci testing on Mac OS
unit tests: pass
system tests: pass
manual testing:

With these diffs in a CESM checkout:

diff --git a/Externals.cfg b/Externals.cfg
index b943c25..6b0f03e 100644
--- a/Externals.cfg
+++ b/Externals.cfg
@@ -39,7 +39,7 @@ required = True
 tag = release-cesm2.0.03
 protocol = git
 repo_url = https://github.com/ESCOMP/mosart
-local_path = components/mosart
+local_path = ./components/mosart
 required = True

 [pop]

ensured that manage_externals -S gives the exact same output now as
before.

Travis-ci tests with python3 were failing with:

************* Module manic.repository_svn
R1724:221,12: Unnecessary "else" after "continue" (no-else-continue)

This should fix the problem.

(I'm not sure why this started failing now: this is old code. Maybe
pylint recently was updated to add this check?)
This is failing. It's using python2, which is no longer supported
(though I don't know if that's why it's failing). I don't see the point
in trying to update it to use python3, since I feel we have sufficient
coverage with our linux testing, so for now I'm just removing it.
Trying to update the dictionary in-place in the loop leads to an error
in python 3.8 ("dictionary keys changed during iteration"). Instead,
create a copy of the dictionary, modified as needed.

Resolves ESMCI#135
@billsacks
Copy link
Member Author

@fischer-ncar once this is merged, we'll want to get it into a CESM tag ASAP, including on the release branch: Currently, manage_externals doesn't work with the latest version of python3.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 88.685% when pulling 37e4c4a on billsacks:add_python38_tests into 34fbf55 on ESMCI:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 88.685% when pulling 37e4c4a on billsacks:add_python38_tests into 34fbf55 on ESMCI:master.

@billsacks
Copy link
Member Author

@jedwards4b - Can I merge this to master?

@jedwards4b
Copy link
Collaborator

jedwards4b commented Mar 3, 2020 via email

@billsacks billsacks merged commit fde04e4 into ESMCI:master Mar 3, 2020
@billsacks billsacks deleted the add_python38_tests branch March 3, 2020 16:39
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

Successfully merging this pull request may close these issues.

3 participants