gst1: Remove deprecated GObject.threads_init()
Ref https://wiki.gnome.org/Projects/PyGObject/Threading "The requirement to call GObject.threads_init() has been removed from PyGObject 3.10.2 when using Python native threads with GI (via the threading module) as well as with GI repositories which manage their own threads that may call back into Python (like GStreamer callbacks). The GObject.threads_init() function will still exist for the entire 3.x series for compatibility reasons but emits a deprecation warning."
This commit is contained in:
parent
ce198ba9f8
commit
592f5dec53
@ -9,21 +9,20 @@ import textwrap
|
||||
try:
|
||||
import gi
|
||||
gi.require_version('Gst', '1.0')
|
||||
from gi.repository import GObject, Gst
|
||||
from gi.repository import Gst
|
||||
except ImportError:
|
||||
print(textwrap.dedent("""
|
||||
ERROR: The GObject and Gst Python packages were not found.
|
||||
ERROR: The GStreamer Python package was not found.
|
||||
|
||||
Mopidy requires GStreamer and GObject to work. These are C libraries
|
||||
with a number of dependencies themselves, and cannot be installed with
|
||||
the regular Python tools like pip.
|
||||
Mopidy requires GStreamer to work. GStreamer is a C library with a
|
||||
number of dependencies itself, and cannot be installed with the regular
|
||||
Python tools like pip.
|
||||
|
||||
Please see http://docs.mopidy.com/en/latest/installation/ for
|
||||
instructions on how to install the required dependencies.
|
||||
"""))
|
||||
raise
|
||||
|
||||
GObject.threads_init()
|
||||
Gst.init()
|
||||
|
||||
try:
|
||||
|
||||
@ -6,7 +6,7 @@ import time
|
||||
|
||||
import gi
|
||||
gi.require_version('Gst', '1.0')
|
||||
from gi.repository import GObject, Gst, GstPbutils
|
||||
from gi.repository import Gst, GstPbutils
|
||||
|
||||
from mopidy import exceptions
|
||||
from mopidy.audio import utils
|
||||
@ -193,7 +193,6 @@ if __name__ == '__main__':
|
||||
|
||||
from mopidy.internal import path
|
||||
|
||||
GObject.threads_init()
|
||||
Gst.init()
|
||||
|
||||
scanner = Scanner(5000)
|
||||
|
||||
@ -5,9 +5,8 @@ import unittest
|
||||
|
||||
import gi
|
||||
gi.require_version('Gst', '1.0')
|
||||
from gi.repository import GObject, Gst
|
||||
from gi.repository import Gst
|
||||
|
||||
GObject.threads_init()
|
||||
Gst.init()
|
||||
|
||||
import mock
|
||||
|
||||
@ -5,9 +5,8 @@ import unittest
|
||||
|
||||
import gi
|
||||
gi.require_version('Gst', '1.0')
|
||||
from gi.repository import GObject, Gst
|
||||
from gi.repository import Gst
|
||||
|
||||
GObject.threads_init()
|
||||
Gst.init()
|
||||
|
||||
from mopidy import exceptions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user