GNOME Bugzilla – Bug 779468
language-specs: Add a content type for python3.lang
Last modified: 2017-03-09 14:02:22 UTC
Trivial patch attached. Depends on https://bugs.freedesktop.org/show_bug.cgi?id=100034.
Created attachment 347054 [details] [review] language-specs: Add a content type for python3.lang Bug #100034 in shared-mime-info adds a new text/x-python3 content type to distinguish Python 3 files from Python 2. Use that if available to select python3.lang over python.lang. See https://bugs.freedesktop.org/show_bug.cgi?id=100034. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 347054 [details] [review]: . ::: data/language-specs/python3.lang @@ +23,3 @@ <language id="python3" _name="Python 3" version="2.0" _section="Script"> <metadata> + <property name="mimetypes">text/x-python3;application/x-python3</property> The patch for shared-mime-info adds only text/x-python3, not application/x-python3. Why is application/x-python3 also added?
Also, the Signed-off-by is useless for GtkSourceView, see: https://lwn.net/Articles/708069/
Review of attachment 347054 [details] [review]: ::: data/language-specs/python3.lang @@ +23,3 @@ <language id="python3" _name="Python 3" version="2.0" _section="Script"> <metadata> + <property name="mimetypes">text/x-python3;application/x-python3</property> For consistency with python.lang, though it’s probably wrong. shared-mime-info doesn’t have an application/x-python content type since 2004 (https://bugs.freedesktop.org/show_bug.cgi?id=208); so it’s debatable about whether we should list that in python.lang. We definitely shouldn’t list it in python3.lang.
Created attachment 347064 [details] [review] language-specs: Add a content type for python3.lang Bug #100034 in shared-mime-info adds a new text/x-python3 content type to distinguish Python 3 files from Python 2. Use that if available to select python3.lang over python.lang. See https://bugs.freedesktop.org/show_bug.cgi?id=100034.
Review of attachment 347064 [details] [review]: accepted, but commit after shared-mime-info patch is merged.
(In reply to Sébastien Wilmet from comment #6) > Review of attachment 347064 [details] [review] [review]: > > accepted, but commit after shared-mime-info patch is merged. shared-mime-info patch has been merged: https://bugs.freedesktop.org/show_bug.cgi?id=100034#c2
Attachment 347064 [details] pushed as e157a66 - language-specs: Add a content type for python3.lang