Skip to content

Minor fixes and improvements #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ with:

This installs a self-contained package with the most commonly needed
libraries. It should just work on most common platforms, including Linux,
Window and macOS, with x64 and ARM CPUs.
Windows and macOS, with x64 and ARM CPUs.

If your platform is unsupported or the pre-built binary is
unsuitable, you can install libvips separately instead.
Expand Down
8 changes: 1 addition & 7 deletions pyvips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,4 @@ def _remove_log_handler():
from .vimage import *
from .vregion import *

__all__ = [
'Error', 'Image', 'Region', 'Introspect', 'Operation', 'GValue', 'Interpolate', 'GObject',
'VipsObject', 'type_find', 'type_name', 'version', '__version__',
'at_least_libvips', 'API_mode',
'get_suffixes',
'cache_set_max', 'cache_set_max_mem', 'cache_set_max_files',
]
__all__ = ['API_mode']
6 changes: 6 additions & 0 deletions pyvips/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ def leak_set(leak):
return vips_lib.vips_leak_set(leak)


def shutdown():
"""Shut libvips down."""
vips_lib.vips_shutdown()


def version(flag):
"""Get the major, minor or micro version number of the libvips library.

Expand Down Expand Up @@ -152,6 +157,7 @@ def flags_dict(gtype):

__all__ = [
'leak_set',
'shutdown',
'version',
'at_least_libvips',
'type_find',
Expand Down
5 changes: 4 additions & 1 deletion pyvips/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,8 @@ def __str__(self):


__all__ = [
'_to_bytes', '_to_string', '_to_string_copy', 'Error',
'_to_bytes',
'_to_string',
'_to_string_copy',
'Error'
]
4 changes: 1 addition & 3 deletions pyvips/vdecls.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,4 @@ def cdefs(features):
return code


__all__ = [
'cdefs'
]
__all__ = ['cdefs']
19 changes: 10 additions & 9 deletions pyvips/voperation.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,6 @@ def add_name(gtype, a, b):
print(' ' + docstr)


def shutdown():
"""Shut libvips down."""
vips_lib.vips_shutdown()


def cache_set_max(mx):
"""Set the maximum number of operations libvips will cache."""
vips_lib.vips_cache_set_max(mx)
Expand Down Expand Up @@ -598,10 +593,16 @@ def operation_block_set(name, state):


__all__ = [
'Introspect', 'Operation',
'cache_set_max', 'cache_set_max_mem', 'cache_set_max_files',
'Introspect',
'Operation',
'cache_set_max',
'cache_set_max_mem',
'cache_set_max_files',
'cache_set_trace',
'cache_get_max', 'cache_get_max_mem', 'cache_get_max_files',
'cache_get_max',
'cache_get_max_mem',
'cache_get_max_files',
'cache_get_size',
'block_untrusted_set', 'operation_block_set',
'block_untrusted_set',
'operation_block_set'
]