[python-bugzilla] Python 3 support

Cole Robinson crobinso at redhat.com
Mon Sep 23 22:29:07 UTC 2013


On 09/22/2013 08:48 PM, Arun Neelicattu wrote:
> Hi,
> 
> I have started work on porting the python-bugzilla for python 3. The work is 
> being done at [1], this maintains backward compatibility. Currently it is 
> stable, however I have only performed very limited testing. Hope this is 
> something the project can use.
> 
> The changes on the branch include:
>     - deprecating pycurl in favor of python-requests
>     - a fair few pep8 fixes
>     - generic python 2 to 3 change handling
> 
> It'd be great if someone more experienced with the code base can take a look to 
> see if I've missed anything in particular. 
> 
> Additionally, if any one has any feedback or performed additional tests, let 
> me know.
> 
> Regards,
> Arun
> 
> [1] https://github.com/abn/python-bugzilla/tree/py3port
> 

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.

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.

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.

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

- Can python-requests be made to reject bad ssl certs by default?

- Is --nosslverify correctly wired up?

- Does python-requests seamlessly use cookies generated by pycurl
python-bugzilla? Don't want users to lose their creds on update!

- 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.

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.

Thanks,
Cole


More information about the python-bugzilla mailing list