Skip to content

6.0 release breaks client exception imports #1886

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

Closed
adam-homeboost opened this issue Oct 30, 2024 · 1 comment
Closed

6.0 release breaks client exception imports #1886

adam-homeboost opened this issue Oct 30, 2024 · 1 comment
Assignees

Comments

@adam-homeboost
Copy link

Describe the bug

Client exception classes no longer available in module exports.

To reproduce

Prior to 6.0 you could write:

    import labelbox

    client = labelbox.Client(...)
    try:
        client.do_something()
    except labelbox.exceptions.SomeException:
        ...

This now breaks as labelbox no longer exports exceptions and they are now located on lbox.exceptions. "lbox?".

Note also that "lbox" has zero typing and fails mypy, therefore changing the import fails mypy checking too.

Please provide a compatibility shim so that existing code does not break or at least some kind of deprecation warning and documentation changes.

Expected behavior

This code should not break all of a sudden with zero warning. At least deprecate it for a bit.

Expect types for "lbox" module.

  • OS: linux
  • Python Version: 3.8.12
  • SDK + SDK Version: 6.0
@vbrodsky vbrodsky self-assigned this Oct 30, 2024
@vbrodsky
Copy link
Contributor

Hello @adam-homeboost
For sdk v.6.0.0 we have moved exceptions along with some other classes dealing with api to a separate module lbox. This try this change

import lbox


client = labelbox.Client(...)
try:
    client.do_something()
  except lbox.exceptions.SomeException:
        ...

@Gabefire Gabefire closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants