-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Python3] fix MakeBuildSet to work with both py2/3 #28123
Conversation
The code-checks are being triggered in jenkins. |
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28123/12164
|
The tests are being triggered in jenkins. |
A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master. It involves the following packages: Utilities/ReleaseScripts @cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+core |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
@@ -330,9 +331,8 @@ pitems = [] | |||
if outputFormat != "all": | |||
outputFormats = [outputFormat] | |||
for item in outputFormats: | |||
pkg = myPackages[item].keys() | |||
pkg.sort() | |||
pkg = sorted(myPackages[item].keys()) |
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.
@smuzaffar for my understanding, is this change really needed or is it just for smarter coding? The list.sort()
should still be available in python3 as far as I can see https://docs.python.org/3/howto/sorting.html
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.
I could have used pkg=list(myPackages[item].keys()); pkg.sort()
but I think current change should be faster if not slower.
+1 |
yes, but .keys() is no longer a list in python3. It is an iterator instead
… On Oct 8, 2019, at 10:40 AM, Fabio Cossutti ***@***.***> wrote:
@fabiocos commented on this pull request.
In Utilities/ReleaseScripts/scripts/MakeBuildSet:
> @@ -330,9 +331,8 @@ pitems = []
if outputFormat != "all":
outputFormats = [outputFormat]
for item in outputFormats:
- pkg = myPackages[item].keys()
- pkg.sort()
+ pkg = sorted(myPackages[item].keys())
@smuzaffar for my understanding, is this change really needed or is it just for smarter coding? The list.sort() should still be available in python3 as far as I can see https://docs.python.org/3/howto/sorting.html
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@davidlange6 ok, you are right, so it cannot be used in that context, thanks |
PR description:
This fixes the MakeBuildSet script for python3. This is used for checking fwlite build set dependencies
PR validation:
Locally run it with both python2 and python3.