[python-bugzilla] Python 3 support
Arun Neelicattu
abn at redhat.com
Mon Sep 23 23:14:17 UTC 2013
----- Original Message -----
> From: "Cole Robinson" <crobinso at redhat.com>
> To: "python-bugzilla user/developer list" <python-bugzilla at lists.fedorahosted.org>
> Cc: "Arun Neelicattu" <abn at redhat.com>
> Sent: Tuesday, September 24, 2013 8:29:07 AM
> Subject: Re: [python-bugzilla] Python 3 support
>
> Cool, thanks for this. I've looked over the changes briefly. Admittedly I'm
> pretty ignorant about python2 vs. python3 so forgive me if I say dumb things
> :)
>
> We already run pep8 on the code, see 'python setup.py pylint', but it turns
> off some of the checks. Stuff like indentation fixes I'm neutral on, though
> 'Too many break lines' check is not to my liking: I like to use two line
> breaks to separate logical blocks of methods, especially in large classes
> like
> Bugzilla.
Personally, I reckon following the the standard as-is where possible is the best
approach for community projects. Just because this helps with consistency. But
that is my personal point of view :)
I am happy to isolate those changes into a separate commit without the line break
changes.
>
> Regardless, if you want to submit those changes, please break them out
> separately and submit them first, bonus if you can supply an autopep8 command
> that reproduces the changes.
I will see what can be done here.
>
> Any other change which doesn't have a dep on python2.7+ I'm happy to evaluate
> first. Ideally I'd like to boil the py3 patch down to the smallest amount
> necessary.
ack.
>
> The main things we want to check:
>
> - Is python-requests in epel6? I'm fine with dropping RHEL5 support, but I'd
> like to keep new releases working on RHEL6
>
Yes.
fedora:18/python-requests-1.1.0-3.fc18
fedora:19/python-requests-1.1.0-4.fc19
fedora:epel:5/python26-requests-0.13.1-1.el5
fedora:epel:6/python-requests-1.1.0-4.el6
> - Can python-requests be made to reject bad ssl certs by default?
>
IIUC this is the default behavior, and is controlled by sslverify. We retain
the same signature as of _CURLTransport.
http://www.python-requests.org/en/latest/user/advanced/#ssl-cert-verification
> - Is --nosslverify correctly wired up?
>
Yes this is controlled by the sslverify argument. Will ensure this is tested
before final patch.
> - Does python-requests seamlessly use cookies generated by pycurl
> python-bugzilla? Don't want users to lose their creds on update!
>
Hadn't considered this a requirement, Will need to check this one, it uses the
same cookie jar, but not sure if there are any differences in the cookies
themselves, I would assume not.
> - Is there some relatively easy way to at least run the unit test suite
> against python2 and python3? Instructions work, better if we can make python
> setup.py test just do-the-right-thing provided all the system components are
> vailable. Basically if it isn't easy to test both versions, I _will_
> inevitably break one of them, so this is a blocker for me.
>
I am sure this is possible, but it might require some automagic scripts. Will
provide them as I get the time.
At the moment, I am just using a virtual environment with -p=/usr/bin/python3
> If those answers line up, and we get the minor pieces separated out and
> committed separately, hopefully we can get this done in short order. Though
> unfortunately I don't have much time to devote here besides reviewing +
> applying patches.
>
Will do the required changes soon, hopefully sometime next week and submit
the patches.
-arun
More information about the python-bugzilla
mailing list