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

Take python exceptions from builtins #28299

Merged
merged 1 commit into from
Oct 31, 2019
Merged

Take python exceptions from builtins #28299

merged 1 commit into from
Oct 31, 2019

Conversation

guitargeek
Copy link
Contributor

PR description:

Today I wanted to use the edmDumpEventContent script with python3, which can be easily done by automatically updating the code with python-modernize except for one hiccup: the import exceptions line in PhysicsTools/PythonAnalysis/python/cmstools.py. Following the information in this post [1], the exceptions can be just taken from the builtins instead of the exceptions module in python 2 as well, which makes the code python 3 compatible. There was also another spot in CMSSW where the former exceptions module was imported, so I changed this one too.

[1] https://stackoverflow.com/questions/27030933/python-2s-exceptions-module-is-missing-in-python3-where-did-its-contents-go

PR validation:

I can use edmDumpEventContent with python 3 when I take this PR and run python-modernize -n -w . on top of it.

if this PR is a backport please specify the original PR:

No backport intended.

@cmsbuild cmsbuild added this to the CMSSW_11_0_X milestone Oct 29, 2019
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28299/12495

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @guitargeek (Jonas Rembser) for master.

It involves the following packages:

PhysicsTools/PythonAnalysis
RecoLocalCalo/EcalRecProducers

@perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@apsallid, @argiro this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 29, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/3212/console Started: 2019/10/29 08:48

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-0d55eb/3212/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2961036
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2960693
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@slava77
Copy link
Contributor

slava77 commented Oct 30, 2019

+1

for #28299 6c10fd7

  • technical; as described. The only reco file affected is a test file RecoLocalCalo/EcalRecProducers/test/compare_csv.py

@santocch
Copy link

+1

@cmsbuild
Copy link
Contributor

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)

@fabiocos
Copy link
Contributor

@guitargeek thanks for this update, I need to check several other scripts not covered by regular tests in IB

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit da612cf into cms-sw:master Oct 31, 2019
@guitargeek guitargeek deleted the import_exceptions branch October 31, 2019 21:35
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

6 participants