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
Fix python2.6 SyntaxError. #10648
Fix python2.6 SyntaxError. #10648
Conversation
A new Pull Request was created by @bbockelm (Brian Bockelman) for CMSSW_7_6_X. Fix python2.6 SyntaxError. It involves the following packages: FWCore/ParameterSet @cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks. |
please test |
@@ -711,7 +711,7 @@ class __DummyModule(object): | |||
def __init__(self): | |||
self.tLPTest = tLPTest | |||
self.tLPTestType = tLPTestType | |||
p = tLPTest("MyType",** { "a"+str(x): tLPTestType(x) for x in xrange(0,300) } ) | |||
p = tLPTest("MyType",** { "a"+str(x): [tLPTestType(x) for x in xrange(0,300)] } ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not the same thing. The first creates a dictionary with 300 entries, the second creates a dictionary with one entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proper syntax would be
p = tLPTest("MyType", ** dict( [ ("a"+str(x), tLPTestType(x)) for x in xrange(0,300)] ) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - I mentally parsed the intent just as badly as python2.6. ;)
The tests are being triggered in jenkins. |
-1 Tested at: 8a79b15 ---> test TestFWCoreParameterSetDriver had ERRORS you can see the results of the tests here: |
@bbockelm is this on your stack? |
FWCore/ParameterSet/python/Mixins.py uses syntax that is not valid in python2.6; breaks ability to import this file in current CMSSW_7_6_X (and hence submit to CRAB).
8a79b15
to
059a3e8
Compare
Sorry, this fell into the cracks. Fixed the problem and made sure the unit test works. Because it's a one-liner I squashed the update. Sue me ;) |
Pull request #10648 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
Fix python2.6 SyntaxError.
FWCore/ParameterSet/python/Mixins.py uses syntax that is not valid
in python2.6; breaks ability to import this file in current CMSSW_7_6_X
(and hence submit to CRAB).