title: Python GTK3: how to create a Gtk.FileChooseDialog?
body: <p>How to create a Gtk.FileChooseDialog properly?</p>
  
  <p><a href="http://python-gtk-3-tutorial.readthedocs.io/en/latest/dialogs.html#id2" rel="nofollow">This popular tutorial</a> says to use code like the following:</p>
  
  <pre><code>import gi
  gi.require_version('Gtk', '3.0')
  from gi.repository import Gtk
  
  dialog = Gtk.FileChooserDialog("Please choose a folder", None,
      Gtk.FileChooserAction.SELECT_FOLDER,
      (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
       "Select", Gtk.ResponseType.OK))
  </code></pre>
  
  <p>But, if you run this with <code>python -W error</code> (to catch the deprecated warnings) it says:</p>
  
  <pre><code>  File "test3.py", line 8, in &lt;module&gt;
      "Select", Gtk.ResponseType.OK))
    File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 287, in new_init
      category, stacklevel=stacklevel)
  gi.overrides.Gtk.PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "title, parent, action, buttons" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  </code></pre>
  
  <p>Using <code>Gtk.FileChooserDialog.new</code> gives <code>TypeError: Dialog constructor cannot be used to create instances of a subclass FileChooserDialog</code>.</p>
  
  <p><a href="https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/FileChooserDialog.html" rel="nofollow">The API</a> says nothing about the constructor. Weird.</p>
  
  <p>ps: The answer to this question should work with <code>python -W error</code>. It should not rely on deprecated APIs. It is the all point of me asking.</p>