You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was porting today a legacy piece of software (written by another co-worker, I only maintain it) that was using libtmux-0.8.5 und made an upgrade to libtmux-0.24.0 and I was getting a lot of deprecation errors because of session.find_where usage.
exception libtmux.exc.LibTmuxException
Base Exception for libtmux Errors.
I don't want to start importing stuff from submodules with a leading underscore as this is mostly used by "private" modules and cannot be considered part of the public API.
I think you should either expose those exception directly in the top __init__.py and at least make ObjectDoesNotExist and ObjectDoesNotExist both inherit from libtmux.exc.LibTmuxException to keep it consistent.
Is there a reason why the the query_list implementation is the ._internal private submodule and why those exceptions do not inherit from libtmux.exc.LibTmuxException?
The text was updated successfully, but these errors were encountered:
I was porting today a legacy piece of software (written by another co-worker, I only maintain it) that was using
libtmux-0.8.5
und made an upgrade tolibtmux-0.24.0
and I was getting a lot of deprecation errors because ofsession.find_where
usage.The code looked mostly like this:
and I changed it to
I realized that when
sessions.get
does not found a session, it raisesObjectDoesNotExist
. ButObjectDoesNotExist
is declared like this:The problem is that
ObjectDoesNotExist
is actually defined inlibtmux._internal.query_list.py
while the the documentation says here https://libtmux.git-pull.com/reference/exceptions.htmlI don't want to start importing stuff from submodules with a leading underscore as this is mostly used by "private" modules and cannot be considered part of the public API.
I think you should either expose those exception directly in the top
__init__.py
and at least makeObjectDoesNotExist
andObjectDoesNotExist
both inherit fromlibtmux.exc.LibTmuxException
to keep it consistent.Is there a reason why the the query_list implementation is the
._internal
private submodule and why those exceptions do not inherit fromlibtmux.exc.LibTmuxException
?The text was updated successfully, but these errors were encountered: