[python-bugzilla] Problem with RHBugzilla and _add_field_alias

Cole Robinson crobinso at redhat.com
Sat Nov 29 23:55:54 UTC 2014


On 11/29/2014 03:32 PM, Jason L Tibbitts III wrote:
> OK, so it turns out that there is a hotfix in Fedora infra which is
> overwriting base.py with a slightly modified 1.0 version.  Below is the
> patch that's applied.  I note that the second hunk seems to be in 1.1,
> but not the first.  I'm not really familiar with this patch or the
> reasons it was applied, but maybe someone here has some idea of whether
> or not it's still necessary.
>
> commit d3c6ed32625f68fa7aeb4d1d62a012aa15ad1bcd
> Author: Toshio くらとみ <toshio at lockbox01.phx2.fedoraproject.org>
> Date:   Wed May 21 16:50:56 2014 +0000
>
>      If we specify None for cookiefile, then we don't want cookies saved to disk.  They still have to be used within the process, though.
>
> diff --git a/modules/hotfix/files/python-bugzilla/base.py b/modules/hotfix/files/python-bugzilla/base.py
> index db4cd86..6a862ff 100644
> --- a/modules/hotfix/files/python-bugzilla/base.py
> +++ b/modules/hotfix/files/python-bugzilla/base.py
> @@ -116,6 +116,8 @@ class RequestsTransport(Transport):
>               Transport.__init__(self, use_datetime=False)
>
>           self.verbose = debug
> +        if cookiejar is None:
> +            cookiejar = _build_cookiejar(None)
>           self._cookiejar = cookiejar
>
>           # transport constructor needs full url too, as xmlrpc does not pass
> @@ -128,7 +130,7 @@ class RequestsTransport(Transport):
>
>           self.request_defaults = {
>               'cert': sslcafile if self.use_https else None,
> -            'cookies': cookiejar if cookiejar else None,
> +            'cookies': cookiejar,
>               'verify': sslverify,
>               'headers': {
>                   'Content-Type': 'text/xml',
>
>

I think python-bugzilla 1.1.0 should be fixed in this respect, toshio reported 
the root issue and some patches went in:

commit fbd0b048198cde065687b69e5daa08ac6656964e
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Sun Jun 1 12:57:29 2014 -0400

     transport: Still store cookies in memory if cookiefile=None

So maybe ask infrastructure to drop their patch and give it a test?

- Cole


More information about the python-bugzilla mailing list