8000 timeout_add calls callback with incorrect arguments · Issue #45 · pygobject/pgi · GitHub
[go: up one dir, main page]

Skip to content
timeout_add calls callback with incorrect arguments #45
@anntzer

Description

@anntzer

Python 3.6 pgi 0.0.11.1 pygobject 3.26.1 Arch Linux

Consider

import gi; gi.require_version('Gtk', '3.0')
from gi.repository import GLib, Gtk

# import pgi as gi; gi.require_version('Gtk', '3.0')
# from pgi.repository import GLib, Gtk

import sys

def on_timer(*args, **kwargs):
    print(args, kwargs)
    sys.exit(0)

GLib.timeout_add(1, on_timer)

Gtk.main()

With gi, this correctly prints (), {}. With pgi, this incorrectly prints (None,), {}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0