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

Fix python2.6 SyntaxError. #10648

Merged
merged 1 commit into from Aug 27, 2015

Conversation

bbockelm
Copy link
Contributor

@bbockelm bbockelm commented Aug 9, 2015

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).

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 9, 2015

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.
@Martin-Grunewald, @wddgit, @wmtan this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@Dr15Jones
Copy link
Contributor

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)] } )
Copy link
Contributor

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.

Copy link
Contributor

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)] ) )

Copy link
Contributor Author

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. ;)

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-1

Tested at: 8a79b15
I found errors in the following unit tests:

---> test TestFWCoreParameterSetDriver had ERRORS

you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-10648/7095/summary.html

@cmsbuild
Copy link
Contributor

@Dr15Jones
Copy link
Contributor

@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).
@bbockelm
Copy link
Contributor Author

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 ;)

@cmsbuild
Copy link
Contributor

Pull request #10648 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

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

davidlange6 added a commit that referenced this pull request Aug 27, 2015
@davidlange6 davidlange6 merged commit 175c2e1 into cms-sw:CMSSW_7_6_X Aug 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants