| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The test_gvalue_gobject_ref_counts appears to be working just fine these
days.
|
| |
|
|
|
|
| |
They moved away from bitbucket some time ago.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a4880dbc4575fadc0e3 a special case for partial() was added to handle gtk4 template
callbacks. This in turn broken normal usage of partial objects.
To work around that add a special marker in the gtk template code for now until
we find a better fix.
Also adds a test so this doesn't happen again.
Fixes #464
|
|
|
|
|
|
|
| |
Since 2.68 Gio.File.new_for_path("") returns a GDummyFile instead of
a GLocalFile. We don't really care since we just want to test that there
is a name despite the type not being in the gir, so just pass a potentially
valid path instead.
|
| |
|
| |
|
|
|
|
|
| |
It already allows everything which can be passed to bool() except None.
I don't see a good reason for that so allow None as well.
|
|
|
|
|
| |
This sometimes segfaults on pypy3. I can't see why, so skip for now
and reenable once pypy3 haa a stable release.
|
|
|
|
|
|
| |
does't support that.
TypeError is wrong there anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case functions like PyLong_AsLong() fail we bail out and just return the
error set by it. In most cases this is due to overflow and results in error
messages such as "too large to convert" and "too large to convert to C long".
The problem here is that for the same type of error we get different error
messages depending on the Python version, the architecture (long size) or the
size of the value itself.
To unify the error message reraise the OverflowError with our default
error message in all cases.
|
| |
|
|
|
|
|
| |
Accept that case in the tests and link the bug filed upstream:
https://bitbucket.org/pypy/pypy/issues/2788
|
|
|
|
|
|
| |
It will fail early in PYGLIB_PyLong_AsLong() and give us a different error message.
It would be nice if the error would be independent of the long size, but that's
for another time.
|
| |
|
|
|
|
|
| |
And adds a simpler version of previously failing test.
Not sure about why this helps.
|
|
|
|
| |
It shouldn't make a difference.
|
|
|
|
| |
PyPy doesn't support it.
|
| |
|
|
|
|
|
| |
I can't reproduce the error here, so I'm probably missing something.
Having this tested is a good idea either way.
|
|
|
|
| |
some of them skipped as they crash
|
|
|
|
|
|
|
|
| |
This fixes a crash when calling help() on the module which got stricter with
Python 3.7.
It's a bit questionable why the type has __path__ in the first place as
that's only meant for packages. But let's leave that for now.
|
|
|
|
| |
stdout
|
|
|
|
| |
This reverts commit 10c062001ddd948b0a70545cbf613b38ed6fa46c.
|
|
|
|
| |
This reverts commit a506d5e3c64321c43a4ce7c2a72ca8d36e985999.
|
|
|
|
| |
This reverts commit daefdfa3e4dc97b4ae38250358d722f09764cc9b.
|
|
|
|
| |
This reverts commit 7ed8191818733b9130bce84f782dc6f8f734abf7.
|
|
|
|
|
|
|
|
|
|
|
| |
pytest will just import the files passed to it and try to run tests.
Since we need to run some setup code convert the tests directory to
a Python package and do the initialization in __init__.py. This makes
the init code (env vars, typelib search path, dbus) always run when
something from the package gets imported.
python3 setup.py build_tests # build pygobject and tests
py.test-3 tests/test_gi.py # run tests in test_gi.py only
|
|
|
|
|
|
|
|
|
|
|
| |
Someone on IRC had problems running the test suite, and that's not the first
time, so remove it for now (added in 63c7f17c2248)
The locale generation adds extra dependencies and only works on Linux,
and while the test does something useful it complicates things too much.
We need to find a better way (in Python if possible) to test for locale
dependend upper()/lower().
|
|
|
|
|
|
|
| |
The int based flag type can't represent the flag value on 32 bit,
some more work is needed there. Remove that check again for now.
https://bugzilla.gnome.org/show_bug.cgi?id=786948
|
|
|
|
|
|
|
|
| |
Add a flags type which has a value with the highes bit set
and fits in an int. While the C type is a signed int, the type
is registered as flags, which GI interprets as unsigned.
https://bugzilla.gnome.org/show_bug.cgi?id=786948
|
|
|
|
|
|
|
| |
It used the fallback path and copied pointers.
Do the same thing we do for integer items instead.
https://bugzilla.gnome.org/show_bug.cgi?id=788890
|
|
|
|
| |
see f40df0a09803ec9c729d842f1f83c6d56aebac22
|
|
|
|
| |
Some filename tests assumed a Unicode locale, skip those.
|
|
|
|
|
| |
Python 3.6 has changed the default filesystem encoding on Windows
from mbcs to utf-8. Some tests assume mbcs, so skip them for now.
|
|
|
|
| |
2.7/3.3 support the u/b prefixes and both have callable()
|
|
|
|
|
| |
Python 3.6 got stricter here and raises warnings/errors for invalid escape
sequences.
|
|
|
|
|
|
|
|
|
|
| |
Expose everything from _gi._gobject in _gi instead.
This does not move any code around, just removes the module.
Also removes the gi._gobject package and replaces it
with a small dummy module in gi.__init__.py
https://bugzilla.gnome.org/show_bug.cgi?id=735206
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=769789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Py2+Unix: Convert unicode to bytes using the fsencoding. Pass bytes as is.
Returns path as bytes as is.
Py2+Windows: Convert unicode to wtf-8. Pass bytes as is.
Returns path as bytes as is.
Py3+Unix: Convert str using os.fsencode so that the surrogateescape handler
can restore the real path if the source was a Python API such as os.listdir
sys.argv etc. Pass bytes as is. Return str decoded using os.fsdecode so that
it can be passed to Python API such as open, os.listdir etc.
Py3+Windows: Convert str to wtf-8. Decode bytes using the fsencoding first.
Returns str + surrogates.
This change makes anyting taking filenames on Python 3 behave the same
as Python functions like listdir() or open(). Compared to Python 3 builtin
functions which return the same type that was passed in we always return str.
One remaining problem is that glib assumes that Windows paths are utf-16,
while they are just 16bit arrays and as a result utf-8 is not enough to
represent all possible paths. We use wtf-8 here instead (utf-8 with lone surrogates),
which allows us to convert all paths, but glib functions accessing the fs
will fail with them.
PyUnicode_EncodeFSDefault was added in CPython 3.2 so bump the requirement.
https://bugzilla.gnome.org/show_bug.cgi?id=746564
|
|
|
|
|
|
| |
This made these tests on 64bit Windows fail because sizeof(gsize) != sizeof(glong)
https://bugzilla.gnome.org/show_bug.cgi?id=780591
|
|
|
|
|
|
|
|
|
|
|
|
| |
(in a msys2 environment)
* Replace LD_LIBRARY_PATH with gir code in runtests.py
* Remove unneeded runtests-windows.py
* Unset MSYSTEM to disable path separator hacks by msys2
* Set sys.path in runtests.py
* Skip various tests failing/hanging/crashing on Windows
https://bugzilla.gnome.org/show_bug.cgi?id=780396
|
|
|
|
|
|
|
| |
* Skip all tests which fail, crash or hang.
* Disable D-Bus in case dbus-run-session is not available.
https://bugzilla.gnome.org/show_bug.cgi?id=780396
|
|
|
|
|
|
|
|
|
|
|
| |
Make _pygi_marshal_from_py_filename handle None input
values. This allows one to pass None to parameters
annotated as nullable filenames.
This fixes a test suite error in test_spawn_async_with_pipes
triggered by an annotation change in glib.
https://bugzilla.gnome.org/show_bug.cgi?id=770821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glist and ghashtable objects both store pointers. Complex objects are
stored as pointers to the objects, but simpler objects like an integer
value are stored directly as a pointer, using for example the
GINT_TO_POINTER and GPOINTER_TO_INT macros.
This is done in pygobject with the _pygi_hash_pointer_to_arg and
_pygi_arg_to_hash_pointer functions. These functions handle the various
type of objects. However they consider that an enum, represented with the
GI_TYPE_TAG_INTERFACE type (extended interface object), are always a
pointer. This is wrong as it is often a 32-bit value. Therefore on 64-bit
big endian machines, the value is handle with the 2 32-bit parts swapped.
This patches fixes that by changing the second argument of both functions
from GITypeTag to GITypeInfo. This way the interface can be determined,
and the underlying storage type can also be determined. This currently
only handles enum and flags, leaving other types as pointers. The patch
also adds two tests in the testsuite, one for each direction.
https://bugzilla.gnome.org/show_bug.cgi?id=770608
|
|
|
|
|
|
|
| |
For example __name__ is now SpawnFlags instead of PyGLibSpawnFlags
and __repr__ shows GLib.SpawnFlags in stead of PyGLibSpawnFlags.
https://bugzilla.gnome.org/show_bug.cgi?id=657915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Includes the module, Python type name, pointer and wrapper pointer
and GType name. e.g.
"<Gtk.Border object at 0x7f26bee9e4c8 (GtkBorder at 0x1c72e30)>"
In case of PyGObjects created from GType set the module to __gi__
instead of guessing the old static binding name. Also
remove the code that tries to add them to the guessed static bindings
module while at it. The __repr__ will now return
"<__gi__.X11Keymap ..." instead of "<gtk.gdk.X11Keymap ..."
https://bugzilla.gnome.org/show_bug.cgi?id=657915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This silences glib warnings which are due to testing
of error handling, deprecation warnings which we ignore
since we want to continue testing deprecated code and
other error output of code which is supposed to fail.
To reduce code duplication and make things easier
this introduces a shared helper module containing
various context managers and decorators which allow
testing and silencing of warnings and errors.
https://bugzilla.gnome.org/show_bug.cgi?id=751156
|
|
|
|
|
|
|
|
|
| |
version to import wasn't specified.
This makes the warning visible by default.
See commit ef3bff4e570363e4f383d4cdae9cecd4073b03d8 for more info on the warning.
https://bugzilla.gnome.org/show_bug.cgi?id=727379
|
|
|
|
|
|
|
|
|
|
|
| |
In case the test explicitly tests the deprecated attribute
silence the resulting warnings.
Instead of replacing GObject.PARAM_READWRITE with
GObject.ParamFlags.READWRITE use (READABLE | WRITABLE)
to not depend on a newer glib version.
https://bugzilla.gnome.org/show_bug.cgi?id=743514
|