Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.59.1
->==2.5.0
Release Notes
pygithub/pygithub (PyGithub)
v2.5.0
Compare Source
Breaking Changes
github.Requester.Requester.graphql_named_mutation
have been renamed:variables
renamed tomutation_input
output
renamed tooutput_schema
output
has been removedNew features
RepositoryDiscussion
powered by GraphQL API @EnricoMi (#3048)Repository.get_discussion()
to get a single Discussion @tiangolo (#3072)Improvements
actor
property to WorkflowRun @gbhand (#2764)Bug Fixes
Maintenance
510c140
)0d395d4
)v2.4.0
Compare Source
New features
Improvements
has_discussions
toAuthenticatedUser
andRepository
classes @cwlls (#3020)SecurityAndAnalysis
attributes @squatched (#3025)dict
type toadd_attribute
script @jackylamhk (#2977)make_latest
toGitRelease.update_release
@treee111 (#2888)Bug Fixes
Maintenance
v2.3.0
Compare Source
New features
Improvements
name
andmessage
whengenerate_release_notes
is true @heitorpolidoro (#2868)WorkflowJob
@xvega (#2921)created
andcheck_suite_id
filter for Repository Workflow runs @treee111 (#2891)Bug Fixes
add_to_collaborators
@jodelasur (#2905)Maintenance
.swp
fils to.gitignore
@boomanaiden154 (#2903)CONTRIBUTING.md
@wakamex (#2900)pyproject.toml
@treee111 (#2894)v2.2.0
Compare Source
Breaking Changes
The
github.Comparison.Comparison
instance returned byRepository.compare
provides acommits
property that used to return alist[github.Commit.Commit]
, which has now been changed toPaginatedList[github.Commit.Commit]
. This breaks user code that assumes alist
:This will raise a
TypeError: object of type 'PaginatedList' has no len()
, as the returnedPaginatedList
does not support the
len()
method. Use thetotalCount
property instead:New features
Improvements
Repository.compare().commits
return paginated list by @EnricoMi in https://github.com/PyGithub/PyGithub/pull/2882include_all_branches
tocreate_repo_from_template
ofAuthenticatedUser
andOrganization
by @janssonoskar in https://github.com/PyGithub/PyGithub/pull/2871Organization.create_repo
by @tekumara in https://github.com/PyGithub/PyGithub/pull/2700Repository
collaborator permissions by @flying-sheep in https://github.com/PyGithub/PyGithub/pull/1996PullRequestReview.dismiss
by @ColasGael in https://github.com/PyGithub/PyGithub/pull/2854request_cve
onRepositoryAdvisories
by @JLLeitschuh in https://github.com/PyGithub/PyGithub/pull/2855GithubObject.last_modified_datetime
to havelast_modified
as adatetime
by @chouetz in https://github.com/PyGithub/PyGithub/pull/2772internal
as valid Repository visibility value by @AndrewJDawes in https://github.com/PyGithub/PyGithub/pull/2806Bug Fixes
Maintenance
Repository
by @trim21 in https://github.com/PyGithub/PyGithub/pull/2798Full Changelog: PyGithub/PyGithub@v2.1.1...v2.2.0
v2.1.1
Compare Source
Bug Fixes
001c085
)Maintenance
035c88f
)v2.1.0.post0
Compare Source
Important
Request throttling
This release introduces a default throttling mechanism to mitigate secondary rate limit errors and comply with Github's best practices:
https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28#dealing-with-secondary-rate-limits
The default throttling of 1 second between writes and 0.25 second between any requests can be configured
for
github.Github
andgithub.GithubIntegration
:Set these parameters to
None
to disable throttling and restore earlier behavior.Request retry
This release introduces a default retry mechanism to retry retry-able 403 responses (primary and secondary rate limit errors only) and any 5xx response.
Class
github.GithubRetry
implements this behavior, and can be configured via theretry
argument ofgithub.Github
andgithub.GithubIntegration
.Retry behavior is configured similar to
urllib3.Retry
: https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.htmlSet this parameter to
None
to disable retry mechanism and restore earlier behaviour.Breaking Changes
Timestamps
Any timestamps returned by this library are
datetime
with timezone information, usually UTC.Before this release, timestamps used to be naive
datetime
instances without timezone.Comparing (other than
==
) these timestamps with naivedatetime
instances used to work but will now break.Add a timezone information to your
datetime
instances before comparison:Netrc authentication
A Netrc file (e.g.
~/.netrc
) does not override PyGithub authentication, anymore.If you require authentication through Netrc, then this is a breaking change.
Use a
github.Auth.NetrcAuth
instance to use Netrc credentials:Repository.create_pull
Merged overloaded
create_pull
methodsinto
Please update your usage of
Repository.create_pull
accordingly.New features
9915580
)0bb72ca
)73236e2
)Improvements
0177f7c
)Branch.edit_*
functions return objects (#2748) (8dee53a
)license
attribute toRepository
(#2721) (26d353e
)Repository
(#2742) (65cfeb1
)is_alphanumeric
attribute toAutolink
andRepository.create_autolink
(#2630) (b6a28a2
)requests
fallback to netrc, providegithub.Auth.Netrc
(#2739) (ac36f6a
)AppInstallationAuth.__integration
(#2695) (8bf542a
)a7bfdf2
)eadc241
)Secret
andVariable
classes (#2623) (bcca758
)aedfa0b
)required_linear_history
attribute toBranchProtection
(#2643) (7a80fad
)GithubException
, don't log it (#2611) (de80ff4
)message
property toGithubException
(#2591) (f087cad
)91b3f40
)Workflow.get_runs()
(#2346) (766df99
)github.Rate.used
field (#2531) (c4c2e52
)Bug Fixes
Branch.bypass_pull_request_allowances
failing with "nil is not an object" (#2535) (c5542a6
)required_conversation_resolution
assertion (#2715) (54f2226
)2fa568b
)responseHeaders
toint
(#2697) (adbfce9
)subject_type
in creating pull request review comment (#2642) (4933459
)GithubRetry.py
(#2610) (950a694
)Branch.bypass_pull_request_allowances
failing with "nil is not an object" (#2535) (c5542a6
)Maintenance
.pyi
type stubs back to.py
sources (#2636)e66c163
)094538e
)6d871d5
)a91debf
)9a88b6b
)95d8b83
)2cc1ba2
)add_attribute.py
to latest conding style (#2631) (e735972
)48d2009
)ff0f31c
)flake8
withruff
(#2617) (42c3b47
)c5c83eb
)1d637e4
)2edc0f8
)disallow_untyped_defs
(#2609) (294c0cc
)check_untyped_defs
(#2607) (8816889
)13e178a
)3c880e7
)typing_extensions
forTypedDict
(#2592) (5fcb0c7
)2e5cd31
)72840de
)7324110
)flake8
as last (#2595) (11bb6bd
)5c60089
)8d3b905
)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.