Skip to content

Address pandas.value_counts() deprecation warnings #602

Open
@dlqqq

Description

@dlqqq

Description

The build-changelog step now emits several warnings to the terminal:

 /opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/github_activity/github_activity.py:406: FutureWarning: pandas.value_counts is deprecated and will be removed in a future version. Use pd.Series(obj).value_counts() instead.
  item_commentors_counts = pd.value_counts(item_commentors)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/github_activity/github_activity.py:406: FutureWarning: value_counts with argument that is not not a Series, Index, ExtensionArray, or np.ndarray is deprecated and will raise in a future version.
  item_commentors_counts = pd.value_counts(item_commentors)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/github_activity/github_activity.py:406: FutureWarning: pandas.value_counts is deprecated and will be removed in a future version. Use pd.Series(obj).value_counts() instead.
  item_commentors_counts = pd.value_counts(item_commentors)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/github_activity/github_activity.py:406: FutureWarning: value_counts with argument that is not not a Series, Index, ExtensionArray, or np.ndarray is deprecated and will raise in a future version.
  item_commentors_counts = pd.value_counts(item_commentors)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/github_activity/github_activity.py:413: FutureWarning: pandas.value_counts is deprecated and will be removed in a future version. Use pd.Series(obj).value_counts() instead.
  comment_contributor_counts = pd.value_counts(comment_helpers)
/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/github_activity/github_activity.py:413: FutureWarning: value_counts with argument that is not not a Series, Index, ExtensionArray, or np.ndarray is deprecated and will raise in a future version.
  comment_contributor_counts = pd.value_counts(comment_helpers)

Reproduce

See https://github.com/jupyterlab/jupyter-chat/actions/runs/12487228881/job/34848157691.

Expected behavior

We should follow their recommendation to suppress these warnings and prevent Jupyter Releaser from breaking in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions