Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI Use Auth.Token to avoid PyGithub DeprecationWarning - #34787

Merged
lesteve merged 1 commit into
scikit-learn:mainfrom
Brucee-ee:patch-1
Aug 24, 2026
Merged

CI Use Auth.Token to avoid PyGithub DeprecationWarning#34787
lesteve merged 1 commit into
scikit-learn:mainfrom
Brucee-ee:patch-1

Conversation

@Brucee-ee

@Brucee-ee Brucee-ee commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #34639

What does this implement/fix? Explain your changes.

Updates maint_tools/update_tracking_issue.py to use PyGithub's current
authentication API. The script was still using the deprecated
Github(token) constructor, which raises a DeprecationWarning in CI.
This switches to the auth=Auth.Token(token) pattern, matching what
other scripts in the repo already use.

Introduce yourself

Hi, I'm Luke, a CS student at Swansea University working towards a career
in cyber/ML for defence. This is one of my first contributions to
scikit-learn, thanks for the pointer to a good first issue, lesteve!

AI usage disclosure

I used AI assistance for:

  • Documentation (including examples)

The AI use was limited to reorganising and titling sections in my personal
university notes/project files in Word, for easier reference, not for
generating or researching this specific fix. The fix itself came from my
own prior notes and was implemented directly by me.

Any other comments?

Happy to make any adjustments needed.

@github-actions

Copy link
Copy Markdown

Thank you for opening your first pull request to scikit-learn! 🎉

To help get your contribution reviewed, please make sure that:

  • You have filled out the pull request template.

  • The pull request addresses an existing issue that is ready for contribution (e.g. not tagged as 'Needs Triage', 'Needs Decision', ...). If you are proposing a new feature, please open an issue to discuss it first.

  • There are no other open pull requests already targeting the same issue.

  • You have followed the pull request checklist. In particular, linting and tests should pass.

@lesteve lesteve left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@lesteve
lesteve merged commit 1115c88 into scikit-learn:main Aug 24, 2026
42 checks passed
@lesteve

lesteve commented Aug 24, 2026

Copy link
Copy Markdown
Member

@Brucee-ee quickly looking it seems like there are other places where we could do the same change, feel free to open another PR about this 🙏!

❯ git grep 'Github(' | grep -v auth
.github/scripts/first-time-contributor.py:gh = Github(GITHUB_TOKEN)
.github/scripts/label_title_regex.py:g = Github(context_dict["token"])

@Brucee-ee

Copy link
Copy Markdown
Contributor Author

Thanks @lesteve! Good spot, I'll open a follow-up PR applying the same auth=Auth.Token(...) change to .github/scripts/first-time-contributor.py and .github/scripts/label_title_regex.py.

prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 8, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
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.

CI PyGitHub DeprecationWarning in maint_tools/update_tracking_issue.py

2 participants