-
Notifications
You must be signed in to change notification settings - Fork 21
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
Py3 dbs3 client - setup changes #649
base: master
Are you sure you want to change the base?
Conversation
Nice catch Todor. @yuyiguo Yuyi, do you think we could skip building the DBS documentation for a while? Maybe we could create another GH issue to track it in the near future? Please let us know what your thoughts are. |
@todor-ivanov @amaltaro |
FYI |
Thanks @yuyiguo! |
@todor-ivanov , few things:
|
Thnks @vkuznet !
The initial intention was to fix everything related to py3 migration in
Not just hard to read. It actually prevents the code from running at all in When it comes to supporting not needed libraries I agree with you - I am going to simplify the wrapper, but I am about to leave |
For instance, there is a mix of spaces and tabs in a code which makes it very hard to read and deal with in vim. In the good old days, everyone used vi and defined their own indentations, some used spaces and some used tabs. Various people touched DBS code so these two are mixed in the code. What I did was that I use modern tools , such as MS VSC to format the entire file when I work on it. |
I agreed with Valentin's suggestion on using standard json library with loads/dumps instead of cjson's encode/decode. |
@todor-ivanov I just noticed that you put code into DBS/Client area while cjson is used both in DBS Server and Client. If you'll keep it in Client then DBS Server code will depend on client unless you'll duplicate the code. Instead, you should make an independent package and put it on pypi. Doing this way it will allow code (DBS Client and Server as well as WMCore) depend on it. The wrapper can be and should be (in my opinion) packaged independently from DBS codebase. But I'll leave a decision about it to WMCore group and @yuyiguo |
Hi @vkuznet @yuyiguo Thanks for the feedback. With my 5th commit to the current PR [1] I tried to simplify the
I agree it would be more close to the standard if we do so, but actually in the code there are several places [2] where it actually relies on the [1] [2] DBS/Client/src/python/dbs/apis/dbsClient.py Line 210 in 14df8bb
|
Hi @vkuznet
I agree that the higher in the tree we put the |
Regarding exceptions. There are two pieces required. One the jsonwrapper should wrap them such that exception will come The second part is to modify DBS code itself to catch just common exception which will come either from json module or from jsonwrapper. This will solve issue with different json implementations. |
Restraining your current work on DBS client is what I think you may do now. I am thinking we should separate DBS client into a different package/repo from DBS server, but that is later. So we will reviste DBS client later, for now get it to work with py3 first. Then, WM can move forward quickly. Regarding the decode/encode, it is idea to follow py3 json as discussed, but we can live with the cjson style for now. |
Todor and I had a chat yesterday and we seem to be aligned with what Yuyi said above. We should focus on the minimum amount of changes in dbs3-client and dbs3-pycurl-client to have it compatible with python3, especially because the rest of the DBS code future is also uncertain at this stage. A few options for those minimum changes that come to my mind are:
Just my 2cents. |
I fully agree. To reinforce what you said, for this purpose, there's no need to try to keep compatibility with Py2 (as we did for WMCore). We just need something (on a separate branch, if necessary) that works ASAP so that we can move forward with validation of WMCore under Py3. |
I did both "future" and "2to3" on entire DBS code. The changes were not much in terms of types of changes. I think it is safe to move DBS client to py3 and put it in a separate branch. |
f859582
to
d77d5eb
Compare
As discussed in a meeting we had between me, @amaltaro and @mapellidario this PR was split in two separate PRs:
p.s. This PR is created against |
READY!
Those are changes needed to fix only the rpm build process for the
py3-dbs3-client.spec
andpy3-dbs3-pycurl-client.spec
from thecmsdist
repository