Skip to content
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

Fix traitlets warning #871

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

omad
Copy link
Contributor

@omad omad commented Nov 8, 2024

The additional_profile_form_template_paths List traitlet is incorrectly specifying a default value as default=[]. Traitlets now uses default_value as the kwarg instead of default. It could be changed to that, but the default is an empty list anyway.

The warning can be seen at the end of pytest runs, including in GHA, see for example

=============================== warnings summary ===============================
../../../../../opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/traitlets/traitlets.py:3615
  /opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/traitlets/traitlets.py:3615: DeprecationWarning: metadata {'default': []} was set from the constructor. With traitlets 4.1, metadata should be set using the .tag() method, e.g., Int().tag(key1='value1', key2='value2')
    super().__init__(trait=trait, default_value=default_value, **kwargs)

The `additional_profile_form_template_paths` List traitlet was incorrectly specifying a default value as `default=[]`. Traitlets now uses `default_value` as a kwarg instead of `default`, so it could be changed to that, but it defaults to an empty list anyway.
@consideRatio consideRatio merged commit d20a65f into jupyterhub:main Nov 8, 2024
9 checks passed
@consideRatio
Copy link
Member

Thank you @omad!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants