After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795260 - debug-viewer: port to Python3
debug-viewer: port to Python3
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other All
: Normal enhancement
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 795282
 
 
Reported: 2018-04-14 13:28 UTC by Philippe Normand
Modified: 2018-04-15 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch-1 (4.62 KB, patch)
2018-04-14 13:30 UTC, Philippe Normand
committed Details | Review
patch-2 (53.36 KB, patch)
2018-04-14 13:30 UTC, Philippe Normand
committed Details | Review
patch-3 (55.20 KB, patch)
2018-04-14 15:06 UTC, Philippe Normand
committed Details | Review
debug-viewer: Dispatcher source ID clean-up (1.20 KB, patch)
2018-04-15 10:31 UTC, Philippe Normand
committed Details | Review

Description Philippe Normand 2018-04-14 13:28:50 UTC
SSIA
Comment 1 Philippe Normand 2018-04-14 13:30:24 UTC
Created attachment 370929 [details] [review]
patch-1
Comment 2 Philippe Normand 2018-04-14 13:30:45 UTC
Created attachment 370930 [details] [review]
patch-2
Comment 3 Philippe Normand 2018-04-14 15:06:35 UTC
Created attachment 370936 [details] [review]
patch-3
Comment 4 Thibault Saunier 2018-04-14 17:57:24 UTC
Review of attachment 370936 [details] [review]:

OK
Comment 5 Thibault Saunier 2018-04-14 17:58:18 UTC
Review of attachment 370929 [details] [review]:

Would be nice to have colorizeRows I guess, anyway :-)
Comment 6 Thibault Saunier 2018-04-14 18:08:32 UTC
Review of attachment 370930 [details] [review]:

Apart from those "insignificant" points this looks good. Looks like you removed some unit tests but better have less tests but have them working than have broken tests fmpov!

Just fix that small remark and push I would say!

(Also I tested and it seems to work properly here :-))

::: debug-viewer/GstDebugViewer/Data.py
@@ -148,3 +149,3 @@
     LEVEL = "([A-Z]+)\s+"
     # "0x8165430 "
-    THREAD = r"(0x[0-9a-f]+)\s+"  # r"\((0x[0-9a-f]+) - "
+    THREAD = "(0x[0-9a-f]+)\s+"  # r"\((0x[0-9a-f]+) - "

Why did you remove the leading `r` heard, those are all regex and it is better to mark that.

::: debug-viewer/GstDebugViewer/Main.py
@@ +37,1 @@
     from GstDebugViewer import version

We should use same versionning as GStreamer here fmpov :-)
Comment 7 Philippe Normand 2018-04-14 18:37:08 UTC
(In reply to Thibault Saunier from comment #6)
> Review of attachment 370930 [details] [review] [review]:
> 
> Apart from those "insignificant" points this looks good. Looks like you
> removed some unit tests but better have less tests but have them working
> than have broken tests fmpov!
> 
> Just fix that small remark and push I would say!
> 
> (Also I tested and it seems to work properly here :-))
> 
> ::: debug-viewer/GstDebugViewer/Data.py
> @@ -148,3 +149,3 @@
>      LEVEL = "([A-Z]+)\s+"
>      # "0x8165430 "
> -    THREAD = r"(0x[0-9a-f]+)\s+"  # r"\((0x[0-9a-f]+) - "
> +    THREAD = "(0x[0-9a-f]+)\s+"  # r"\((0x[0-9a-f]+) - "
> 
> Why did you remove the leading `r` heard, those are all regex and it is
> better to mark that.
> 

Unintended mistake indeed. Good catch!

> ::: debug-viewer/GstDebugViewer/Main.py
> @@ +37,1 @@
>      from GstDebugViewer import version
> 
> We should use same versionning as GStreamer here fmpov :-)

Yeah that makes sense. I'll bump the version to current git.
Thanks for the reviews!
Comment 8 Philippe Normand 2018-04-14 18:39:40 UTC
About the tests, yeah I actually removed the ones related to the removed RangeFilterModel. It seems like it could be reimplemented but I didn't see the use-case for it, to be honest.
Comment 9 Philippe Normand 2018-04-15 10:13:26 UTC
(In reply to Thibault Saunier from comment #6)
> 
> ::: debug-viewer/GstDebugViewer/Main.py
> @@ +37,1 @@
>      from GstDebugViewer import version
> 
> We should use same versionning as GStreamer here fmpov :-)

I wonder if it would be worth generating a python file from Meson for this? For now I'll push the patch as-is and open a follow-up bug to track this issue if that's ok with you.
Comment 10 Philippe Normand 2018-04-15 10:31:10 UTC
Created attachment 370951 [details] [review]
debug-viewer: Dispatcher source ID clean-up
Comment 11 Thibault Saunier 2018-04-15 18:20:25 UTC
(In reply to Philippe Normand from comment #9)
> (In reply to Thibault Saunier from comment #6)
> > 
> > ::: debug-viewer/GstDebugViewer/Main.py
> > @@ +37,1 @@
> >      from GstDebugViewer import version
> > 
> > We should use same versionning as GStreamer here fmpov :-)
> 
> I wonder if it would be worth generating a python file from Meson for this?
> For now I'll push the patch as-is and open a follow-up bug to track this
> issue if that's ok with you.

I we should port it all to meson, this would start running the tests automatically on CI too (I will have a quick look, it should be *very* simple :-))
Comment 12 Philippe Normand 2018-04-15 20:17:48 UTC
Comment on attachment 370951 [details] [review]
debug-viewer: Dispatcher source ID clean-up

Reviewed by Thibault :)