Skip to content

GH-33241: [Archery] Replace github3 with pygithub#48886

Open
fangchenli wants to merge 5 commits intoapache:mainfrom
fangchenli:crossbow-pygithub-migration
Open

GH-33241: [Archery] Replace github3 with pygithub#48886
fangchenli wants to merge 5 commits intoapache:mainfrom
fangchenli:crossbow-pygithub-migration

Conversation

@fangchenli
Copy link
Copy Markdown

@fangchenli fangchenli commented Jan 19, 2026

Rationale for this change

Archery currently uses both pygithub and github3. It's unnecessary and increases maintenance burden.

What changes are included in this PR?

Replace all github3 usage with pygithub.

Are these changes tested?

Yes, unittests added.

Are there any user-facing changes?

No.

@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #33241 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions bot added the awaiting review Awaiting review label Jan 19, 2026
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #33241 has been automatically assigned in GitHub to PR creator.

@fangchenli fangchenli marked this pull request as ready for review January 19, 2026 22:13
Copy link
Copy Markdown
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, awesome work. The changes look great in general. I'll have to take some time to do some validation as crossbow isn't extensively tested at the moment. Can you remove this one while I find some time to test it?

github3.py

@raulcd
Copy link
Copy Markdown
Member

raulcd commented Jan 20, 2026

Failures are unrelated, will be fixed once the following issue closed. It has a PR ready to be merged:

@fangchenli fangchenli requested a review from raulcd February 21, 2026 00:43
Copy link
Copy Markdown
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thanks @fangchenli
@kou I plan to merge this and if we find any small issue not covered by tests during crossbow runs we can fix them.
I haven't validated manually the different cases but have reviewed the changes.

@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #33241 has been automatically assigned in GitHub to PR creator.

Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

It makes sense.

@fangchenli BTW, I'm not sure why you worked on this but are you interested in GitHub API related issue? We want to complete #47340 but we need to update our GitHub API usage too. (Changing Type: XXX issue label to XXX issue type in our development scripts.) Do you want to work on it?

Comment on lines +469 to +471
# NOTE: We access the private _Github__requester to get response
# headers, as PyGithub doesn't expose the token expiration header
# through its public API. This may break with future PyGithub updates.
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.

Could you open an issue to PyGithub to add a public API for this?

Comment on lines 551 to -554
# Since github has changed something the asset uploading via requests
# got instable, so prefer the cURL alternative.
# Potential cause:
# sigmavirus24/github3.py/issues/779#issuecomment-379470626
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.

Can we remove curl fallback with PyGithub?

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.

3 participants