Merge lp://qastaging/~mardy/unity-scope-gdrive/python3 into lp://qastaging/unity-scope-gdrive

Proposed by Alberto Mardegan
Status: Merged
Merged at revision: 11
Proposed branch: lp://qastaging/~mardy/unity-scope-gdrive/python3
Merge into: lp://qastaging/unity-scope-gdrive
Diff against target: 374 lines (+115/-145)
1 file modified
unity-scope-gdocs (+115/-145)
To merge this branch: bzr merge lp://qastaging/~mardy/unity-scope-gdrive/python3
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Online Accounts Pending
Review via email: mp+120389@code.qastaging.launchpad.net

Description of the change

Migrate to GNOME gdata, support python3

To post a comment you must log in.
11. By Alberto Mardegan

Fixup

Revision history for this message
Ken VanDine (ken-vandine) wrote :

First issue:
-#! /usr/bin/python
+#! /usr/bin/python3

I am also getting tracebacks:

** (process:31026): CRITICAL **: Unsupported type PyObject

(process:31026): GLib-GIO-CRITICAL **: g_dbus_gvalue_to_gvariant: assertion `type != NULL' failed
/usr/lib/python3/dist-packages/gi/types.py:47: Warning: g_variant_new_variant: assertion `value != NULL' failed
  return info.invoke(*args, **kwargs)
/usr/lib/python3/dist-packages/gi/types.py:47: Warning: g_variant_get_type: assertion `value != NULL' failed
  return info.invoke(*args, **kwargs)
/usr/lib/python3/dist-packages/gi/types.py:47: Warning: g_variant_type_is_subtype_of: assertion `g_variant_type_check (type)' failed
  return info.invoke(*args, **kwargs)
/usr/lib/python3/dist-packages/gi/types.py:47: Warning: g_variant_builder_add_value: assertion `!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
  return info.invoke(*args, **kwargs)
/usr/lib/python3/dist-packages/gi/types.py:47: Warning: g_variant_builder_end: assertion `GVSB(builder)->offset >= GVSB(builder)->min_items' failed
  return info.invoke(*args, **kwargs)
login finished
Traceback (most recent call last):
  File "/usr/lib/unity-lens-files/unity-scope-gdocs", line 103, in login_cb
    if reply.has_key("AuthToken"):
AttributeError: 'dict' object has no attribute 'has_key'
Got the same token
p11-kit: duplicate configured module: gnome-keyring.module: /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so

** (process:31026): CRITICAL **: Unsupported type PyObject

(process:31026): GLib-GIO-CRITICAL **: g_dbus_gvalue_to_gvariant: assertion `type != NULL' failed
login finished
Traceback (most recent call last):
  File "/usr/lib/unity-lens-files/unity-scope-gdocs", line 103, in login_cb
    if reply.has_key("AuthToken"):
AttributeError: 'dict' object has no attribute 'has_key'
Got the same token

review: Needs Fixing
Revision history for this message
Alberto Mardegan (mardy) wrote :

> First issue:
> -#! /usr/bin/python
> +#! /usr/bin/python3

I was hoping that, with python2 removed, "/usr/bin/python" would just point to python3.
I'm a bit unsure whether it's a good idea to force python3 here, since the lens can also work with python2.

> I am also getting tracebacks:
>
> ** (process:31026): CRITICAL **: Unsupported type PyObject
[...]

Yes, I also got them :-)
The problem is with the libsignon-glib pygobject "overrides", which gets installed only in the directory given by

  `$PYTHON -c "import gi;print gi._overridesdir"`

and since $PYTHON runs python-2.7, this is not available for python3. Ideally, we'd like these pygobject overrides to be available to all versions of python installed on the system; any idea how to achieve that?

Revision history for this message
Ken VanDine (ken-vandine) wrote :

> > First issue:
> > -#! /usr/bin/python
> > +#! /usr/bin/python3
>
> I was hoping that, with python2 removed, "/usr/bin/python" would just point to
> python3.
> I'm a bit unsure whether it's a good idea to force python3 here, since the
> lens can also work with python2.

I am pretty sure the plan is to keep python and python3 separate, python3 is too different to really make that kind of transition go smoothly.

>
> > I am also getting tracebacks:
> >
> > ** (process:31026): CRITICAL **: Unsupported type PyObject
> [...]
>
> Yes, I also got them :-)
> The problem is with the libsignon-glib pygobject "overrides", which gets
> installed only in the directory given by
>
> `$PYTHON -c "import gi;print gi._overridesdir"`
>
> and since $PYTHON runs python-2.7, this is not available for python3. Ideally,
> we'd like these pygobject overrides to be available to all versions of python
> installed on the system; any idea how to achieve that?

I can fix that.

12. By Alberto Mardegan

Require python3

13. By Alberto Mardegan

More python3 fixes

Revision history for this message
Ken VanDine (ken-vandine) wrote :

For each account found, it creates a new UserScope which creates a new scope on the same path. This tracebacks when there are more than one account found.

review: Needs Fixing
14. By Alberto Mardegan

Support multiple gdocs accounts

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Works great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches