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.60
->>=2.1,<2.2
Release Notes
pygithub/pygithub (PyGithub)
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.Netrc
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 Mend Renovate. View repository job log here.