Skip to content

Conversation

@J-Bu
Copy link
Contributor

@J-Bu J-Bu commented Jun 11, 2025

If a server advertises a resource with multiple extensions scim2-client will fail with:

  File "/usr/local/lib/python3.11/site-packages/pydantic/_internal/_generics.py", line 373, in map_generic_model_arguments
    raise TypeError(f'Too many arguments for {cls}; actual {len(args)}, expected {expected_len}')
TypeError: Too many arguments for <class 'scim2_models.rfc7643.schema.User'>; actual 3, expected 1

The problem here is that a tuple is used as container for the Generic AnyExtension but it must be a Union to make pydantic happy. The scim2-models also checks if the type is a Union.

…nsion

Using a tuple results in a pydantic error:
  File "/usr/local/lib/python3.11/site-packages/pydantic/_internal/_generics.py", line 373, in map_generic_model_arguments
    raise TypeError(f'Too many arguments for {cls}; actual {len(args)}, expected {expected_len}')
TypeError: Too many arguments for <class 'scim2_models.rfc7643.schema.User'>; actual 3, expected 1
@azmeuk
Copy link
Contributor

azmeuk commented Jun 12, 2025

Thank you for your contribution.
Could you please add a unit test for this use case?

@J-Bu
Copy link
Contributor Author

J-Bu commented Jun 30, 2025

Sorry for the late response finally found the time to add a unit test.

@azmeuk
Copy link
Contributor

azmeuk commented Jul 2, 2025

Hi. It seems there are errors with Python > 3.9.

@azmeuk azmeuk added the bug Something isn't working label Aug 1, 2025
@azmeuk
Copy link
Contributor

azmeuk commented Aug 1, 2025

Superseded by #32

@azmeuk azmeuk closed this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants