-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Avoid using past module for python2/3 compatibility #46754
Avoid using past module for python2/3 compatibility #46754
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46754/42733
|
A new Pull Request was created by @smuzaffar for master. It involves the following packages:
@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
I think this is ok, although eventually it would be nice to "modernize" the code itself to use |
@cmsbuild, please test |
-1 Failed Tests: UnitTests Unit TestsI found 1 errors in the following unit tests: ---> test TestDQMGUIUpload had ERRORS Comparison SummarySummary:
|
Comparison differences are related to #46416 |
Unit test failure is #46682 |
+core |
ignore tests-rejected with ib-failure |
This pull request is fully signed and it will be integrated in one of the next master IBs (test failures were overridden). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @mandrenguyen, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
We were using
past
python2/3 compatibility to support bothpy2 and py3
. As CMSSW stack ispython3
only so this PR proposes to drop the use ofpast
.from past.builtins import long
: uselong=int
as https://github.com/PythonCharmers/python-future/blob/master/src/past/types/__init__.py#L26 was doingfrom past.utils import old_div
: We can either usefloor division operator //
everywhere or just add our ownold_div
which does the same.