Description
Serializing GetUserListRequest emits a DeprecationWarning even when the request only sets non-deprecated fields.
This can be reproduced without making any network call. The warning appears during local query param serialization.
SDK Version
Python Version
Minimal Reproduction
import warnings
from clerk_backend_api import models, utils
request = models.GetUserListRequest(
email_address=['smoke@example.com'],
limit=1,
)
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter('always')
params = utils.get_query_params(request)
print(params)
print('warnings', len(caught))
for warning in caught:
print(
type(warning.message).__name__,
str(warning.message),
'file=',
warning.filename,
'line=',
warning.lineno,
)
Actual Behavior
This produces output like:
{'email_address': ['smoke@example.com'], 'limit': ['1'], 'offset': ['0'], 'order_by': ['-created_at']}
warnings 1
DeprecationWarning warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible. file= /.../site-packages/clerk_backend_api/utils/queryparams.py line= 65
Expected Behavior
No deprecation warning should be emitted unless the caller explicitly uses a deprecated request field.
Likely Cause
GetUserListRequest includes a deprecated field:
and the generated serializer appears to access all model fields during query param population, which triggers the warning even when that field is unset.
Why This Matters
This shows up in normal usage of clerk.users.list(...) and creates noisy test output for valid code paths that are not using deprecated API fields.
Notes
The warning happens during SDK-side query param serialization, not during the network request itself.
Possible Fix Direction
A possible fix would be to avoid triggering deprecated field access for unset/default query-model fields during serialization, while still preserving warnings when deprecated fields are explicitly provided.
Description
Serializing
GetUserListRequestemits aDeprecationWarningeven when the request only sets non-deprecated fields.This can be reproduced without making any network call. The warning appears during local query param serialization.
SDK Version
clerk-backend-api==5.0.6Python Version
3.12.13Minimal Reproduction
Actual Behavior
This produces output like:
{'email_address': ['smoke@example.com'], 'limit': ['1'], 'offset': ['0'], 'order_by': ['-created_at']}
warnings 1
DeprecationWarning warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible. file= /.../site-packages/clerk_backend_api/utils/queryparams.py line= 65
Expected Behavior
No deprecation warning should be emitted unless the caller explicitly uses a deprecated request field.
Likely Cause
GetUserListRequest includes a deprecated field:
and the generated serializer appears to access all model fields during query param population, which triggers the warning even when that field is unset.
Why This Matters
This shows up in normal usage of clerk.users.list(...) and creates noisy test output for valid code paths that are not using deprecated API fields.
Notes
The warning happens during SDK-side query param serialization, not during the network request itself.
Possible Fix Direction
A possible fix would be to avoid triggering deprecated field access for unset/default query-model fields during serialization, while still preserving warnings when deprecated fields are explicitly provided.