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

Skip to content

Releases: PyGithub/PyGithub

v2.6.1

21 Feb 13:45
da30d6e
Compare
Choose a tag to compare

Bug Fixes

  • Fix broken pickle support for Auth classes by @EnricoMi in #3211
  • Remove schema from Deployment, remove message attribute by @EnricoMi in #3223
  • Fix incorrect deprecated import by @EnricoMi in #3225
  • Add CodeSecurityConfigRepository returned by get_repos_for_code_security_config by @EnricoMi in #3219
  • Make GitTag.verification return GitCommitVerification by @EnricoMi in #3226

Maintenance

  • Mention removal of AppAuth.private_key in changelog by @EnricoMi in #3212

Full Changelog: v2.6.0...v2.6.1

v2.6.0

15 Feb 17:36
e3e07d7
Compare
Choose a tag to compare

Breaking Changes

  • Rework Views and Clones by @EnricoMi in #3168:
    View and clones traffic information returned by Repository.get_views_traffic and Repository.get_clones_traffic
    now return proper PyGithub objects, instead of a dict, with all information that used to be provided by the dict:

Code like

repo.get_views_traffic().["views"].timestamp
repo.get_clones_traffic().["clones"].timestamp

should be replaced with

repo.get_views_traffic().views.timestamp
repo.get_clones_traffic().clones.timestamp
  • Fix typos by @kianmeng in #3086:
    Property OrganizationCustomProperty.respository_id renamed to OrganizationCustomProperty.repository_id.

New Features

Improvements

Bug Fixes

  • Patch httpretty socket for latest urllib3 release by @EnricoMi in #3102
  • Fix API break when contents not found by @skinitimski in #3181
  • Change start_side argument of PullRequest.create_review_comment from int to str by @ryanpeach in #3170
  • Create Review Request - transform string params to a list by @a-sido in #3099
  • Fix Repository.get_contents redirection by @EnricoMi in #3183

Others

Maintenance

Read more

v2.5.0

06 Nov 20:49
19ddb9f
Compare
Choose a tag to compare

Breaking Changes

  • Parameters of method github.Requester.Requester.graphql_named_mutation have been renamed:
    • Parameter variables renamed to mutation_input
    • Parameter output renamed to output_schema
    • Default value of parameter output has been removed

New features

Improvements

Bug Fixes

  • Fix requesting urls containing parameters with parameters dict @EnricoMi (#2929)
  • PullRequest.delete_branch: fix the remaining pull requests check @fetsko (#3063)

Maintenance

v2.4.0

26 Aug 06:48
8508735
Compare
Choose a tag to compare

New features

Improvements

Bug Fixes

Maintenance

v2.3.0

24 Mar 14:24
7266e81
Compare
Choose a tag to compare

New features

Improvements

  • Create release with optional name and message when generate_release_notes is true @heitorpolidoro (#2868)
  • Add missing attributes to WorkflowJob @xvega (#2921)
  • Add created and check_suite_id filter for Repository Workflow runs @treee111 (#2891)
  • Assert requester argument type in Auth @EnricoMi (#2912)

Bug Fixes

Maintenance

v2.2.0

30 Jan 07:54
7e7653f
Compare
Choose a tag to compare

Breaking Changes

The github.Comparison.Comparison instance returned by Repository.compare provides a commits property that used to return a list[github.Commit.Commit], which has now been changed to PaginatedList[github.Commit.Commit]. This breaks user code that assumes a list:

commits = repo.compare("v0.6", "v0.7").commits
no_of_commits = len(commits)  # will raise a TypeError

This will raise a TypeError: object of type 'PaginatedList' has no len(), as the returned PaginatedList
does not support the len() method. Use the totalCount property instead:

commits = repo.compare("v0.6", "v0.7").commits
no_of_commits = commits.totalCount

New features

  • Add support to call GraphQL API

Improvements

Bug Fixes

Maintenance

Full Changelog: v2.1.1...v2.2.0

v2.1.1

29 Sep 21:59
e584a90
Compare
Choose a tag to compare

Bug Fixes

Maintenance

  • Fix pypi-release workflow, allow for manual run (#2771) (035c88f)

v2.1.0.post0

29 Sep 15:58
035c88f
Compare
Choose a tag to compare

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 and github.GithubIntegration:

g = github.Github(seconds_between_requests=0.25, seconds_between_writes=1)

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 the retry argument of github.Github and github.GithubIntegration.
Retry behavior is configured similar to urllib3.Retry: https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html

g = github.Github(retry=github.GithubRetry())

Set 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 naive datetime instances used to work but will now break.
Add a timezone information to your datetime instances before comparison:

if g.get_repo("PyGithub/PyGithub").created_at < datetime(2012, 2, 26, tzinfo=timezone.utc):
  ...

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:

>>> auth = Auth.NetrcAuth()
>>> g = Github(auth=auth)
>>> g.get_user().login
'login'

Repository.create_pull

Merged overloaded create_pull methods

def create_pull(self, issue, base, head)
def create_pull(self, title, body, base, head, maintainer_can_modify=NotSet, draft=False)

into

def create_pull(self, base, head, *, title=NotSet, body=NotSet, maintainer_can_modify=NotSet, draft=NotSet, issue=NotSet)

Please update your usage of Repository.create_pull accordingly.

New features

Improvements

  • Make datetime objects timezone-aware (#2565) (0177f7c)
  • Make Branch.edit_* functions return objects (#2748) (8dee53a)
  • Add license attribute to Repository (#2721) (26d353e)
  • Add missing attributes to Repository (#2742) (65cfeb1)
  • Add is_alphanumeric attribute to Autolink and Repository.create_autolink (#2630) (b6a28a2)
  • Suppress requests fallback to netrc, provide github.Auth.Netrc (#2739) (ac36f6a)
  • Pass Requester arguments to AppInstallationAuth.__integration (#2695) (8bf542a)
  • Adding feature for enterprise consumed license (#2626) (a7bfdf2)
  • Search Workflows by Name (#2711) (eadc241)
  • Add Secret and Variable classes (#2623) (bcca758)
  • Add Autolink API link (#2632) (aedfa0b)
  • Add required_linear_history attribute to BranchProtection (#2643) (7a80fad)
  • Add retry issue to GithubException, don't log it (#2611) (de80ff4)
  • Add message property to GithubException (#2591) (f087cad)
  • Add support for repo and org level actions variables (#2580) (91b3f40)
  • Add missing arguments to Workflow.get_runs() (#2346) (766df99)
  • Add github.Rate.used field (#2531) (c4c2e52)

Bug Fixes

  • Fix Branch.bypass_pull_request_allowances failing with "nil is not an object" (#2535) (c5542a6)
  • Fix required_conversation_resolution assertion (#2715) (54f2226)
  • Fix assertion creating pull request review comment (#2641) (2fa568b)
  • Safely coerce responseHeaders to int (#2697) (adbfce9)
  • Fix assertion for subject_type in creating pull request review comment (#2642) (4933459)
  • Use timezone-aware reset datetime in GithubRetry.py (#2610) (950a694)
  • Fix Branch.bypass_pull_request_allowances failing with "nil is not an object" (#2535) (c5542a6)

Maintenance

v2.0.1-preview

03 Aug 10:35
Compare
Choose a tag to compare
v2.0.1-preview Pre-release
Pre-release

Bug Fixes

v1.59.1

03 Aug 09:42
Compare
Choose a tag to compare

Bug Fixes