Closed renovate[bot] closed 9 months ago
Test coverage for 4cead0d66d65973288b3dfeb26660bba350ff634
Name Stmts Miss Branch BrPart Cover Missing
---------------------------------------------------------------------
src/__init__.py 83 0 34 0 100%
src/action.py 155 0 46 0 100%
src/check.py 53 0 21 0 100%
src/clients.py 12 0 0 0 100%
src/commit.py 42 0 12 0 100%
src/constants.py 10 0 0 0 100%
src/content.py 50 0 10 0 100%
src/discourse.py 159 0 34 0 100%
src/docs_directory.py 33 0 8 0 100%
src/download.py 23 0 2 0 100%
src/exceptions.py 15 0 0 0 100%
src/index.py 142 0 56 0 100%
src/metadata.py 28 0 12 0 100%
src/migration.py 87 0 27 0 100%
src/navigation_table.py 65 0 20 0 100%
src/reconcile.py 123 0 60 0 100%
src/repository.py 284 0 88 0 100%
src/sort.py 43 0 26 0 100%
src/types_.py 196 0 54 0 100%
---------------------------------------------------------------------
TOTAL 1603 0 510 0 100%
Static code analysis report
Working... ββββββββββββββββββββββββββββββββββββββββ 100% 0:00:02
Run started:2023-09-29 19:15:30.729874
Test results:
No issues identified.
Code scanned:
Total lines of code: 17032
Total lines skipped (#nosec): 3
Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0
Run metrics:
Total issues (by severity):
Undefined: 0
Low: 0
Medium: 0
High: 0
Total issues (by confidence):
Undefined: 0
Low: 0
Medium: 0
High: 0
Files skipped (0):
This PR contains the following updates:
>=1.59,<1.60
->>=2.1,<2.2
Release Notes
pygithub/pygithub (PyGithub)
### [`v2.1.1`](https://togithub.com/PyGithub/PyGithub/releases/tag/v2.1.1) [Compare Source](https://togithub.com/pygithub/pygithub/compare/v2.1.0.post0...v2.1.1) #### Bug Fixes - Require urllib 1.26.0 or greater ([#2774](https://togithub.com/pygithub/pygithub/issues/2774)) ([`001c085`](https://togithub.com/pygithub/pygithub/commit/001c0852)) #### Maintenance - Fix pypi-release workflow, allow for manual run ([#2771](https://togithub.com/pygithub/pygithub/issues/2771)) ([`035c88f`](https://togithub.com/pygithub/pygithub/commit/035c88f1)) ### [`v2.1.0.post0`](https://togithub.com/PyGithub/PyGithub/releases/tag/v2.1.0.post0) [Compare Source](https://togithub.com/pygithub/pygithub/compare/v1.59.1...v2.1.0.post0) #### 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`: ```python 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 ```python 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: ```python 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.Netrc` instance to use Netrc credentials: ```python >>> auth = Auth.Netrc() >>> g = Github(auth=auth) >>> g.get_user().login 'login' ``` ##### Repository.create_pull Merged overloaded `create_pull` methods ```python def create_pull(self, issue, base, head) def create_pull(self, title, body, base, head, maintainer_can_modify=NotSet, draft=False) ``` into ```python 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 - Throttle requests to mitigate RateLimitExceededExceptions ([#2145](https://togithub.com/pygithub/pygithub/issues/2145)) ([`9915580`](https://togithub.com/pygithub/pygithub/commit/99155806)) - Retry retryable 403 (rate limit) ([#2387](https://togithub.com/pygithub/pygithub/issues/2387)) ([`0bb72ca`](https://togithub.com/pygithub/pygithub/commit/0bb72ca0)) - Close connections after use ([#2724](https://togithub.com/pygithub/pygithub/issues/2724)) ([`73236e2`](https://togithub.com/pygithub/pygithub/commit/73236e23)) #### Improvements - Make datetime objects timezone-aware ([#2565](https://togithub.com/pygithub/pygithub/issues/2565)) ([`0177f7c`](https://togithub.com/pygithub/pygithub/commit/0177f7c5)) - Make `Branch.edit_*` functions return objects ([#2748](https://togithub.com/pygithub/pygithub/issues/2748)) ([`8dee53a`](https://togithub.com/pygithub/pygithub/commit/8dee53a8)) - Add `license` attribute to `Repository` ([#2721](https://togithub.com/pygithub/pygithub/issues/2721)) ([`26d353e`](https://togithub.com/pygithub/pygithub/commit/26d353e7)) - Add missing attributes to `Repository` ([#2742](https://togithub.com/pygithub/pygithub/issues/2742)) ([`65cfeb1`](https://togithub.com/pygithub/pygithub/commit/65cfeb1b)) - Add `is_alphanumeric` attribute to `Autolink` and `Repository.create_autolink` ([#2630](https://togithub.com/pygithub/pygithub/issues/2630)) ([`b6a28a2`](https://togithub.com/pygithub/pygithub/commit/b6a28a26)) - Suppress `requests` fallback to netrc, provide `github.Auth.Netrc` ([#2739](https://togithub.com/pygithub/pygithub/issues/2739)) ([`ac36f6a`](https://togithub.com/pygithub/pygithub/commit/ac36f6a9)) - Pass Requester arguments to `AppInstallationAuth.__integration` ([#2695](https://togithub.com/pygithub/pygithub/issues/2695)) ([`8bf542a`](https://togithub.com/pygithub/pygithub/commit/8bf542ae)) - Adding feature for enterprise consumed license ([#2626](https://togithub.com/pygithub/pygithub/issues/2626)) ([`a7bfdf2`](https://togithub.com/pygithub/pygithub/commit/a7bfdf2d)) - Search Workflows by Name ([#2711](https://togithub.com/pygithub/pygithub/issues/2711)) ([`eadc241`](https://togithub.com/pygithub/pygithub/commit/eadc241e)) - Add `Secret` and `Variable` classes ([#2623](https://togithub.com/pygithub/pygithub/issues/2623)) ([`bcca758`](https://togithub.com/pygithub/pygithub/commit/bcca758d)) - Add Autolink API link ([#2632](https://togithub.com/pygithub/pygithub/issues/2632)) ([`aedfa0b`](https://togithub.com/pygithub/pygithub/commit/aedfa0b9)) - Add `required_linear_history` attribute to `BranchProtection` ([#2643](https://togithub.com/pygithub/pygithub/issues/2643)) ([`7a80fad`](https://togithub.com/pygithub/pygithub/commit/7a80fad9)) - Add retry issue to `GithubException`, don't log it ([#2611](https://togithub.com/pygithub/pygithub/issues/2611)) ([`de80ff4`](https://togithub.com/pygithub/pygithub/commit/de80ff4b)) - Add `message` property to `GithubException` ([#2591](https://togithub.com/pygithub/pygithub/issues/2591)) ([`f087cad`](https://togithub.com/pygithub/pygithub/commit/f087cad3)) - Add support for repo and org level actions variables ([#2580](https://togithub.com/pygithub/pygithub/issues/2580)) ([`91b3f40`](https://togithub.com/pygithub/pygithub/commit/91b3f40f)) - Add missing arguments to `Workflow.get_runs()` ([#2346](https://togithub.com/pygithub/pygithub/issues/2346)) ([`766df99`](https://togithub.com/pygithub/pygithub/commit/766df993)) - Add `github.Rate.used` field ([#2531](https://togithub.com/pygithub/pygithub/issues/2531)) ([`c4c2e52`](https://togithub.com/pygithub/pygithub/commit/c4c2e527)) #### Bug Fixes - Fix `Branch.bypass_pull_request_allowances` failing with "nil is not an object" ([#2535](https://togithub.com/pygithub/pygithub/issues/2535)) ([`c5542a6`](https://togithub.com/pygithub/pygithub/commit/c5542a6a)) - Fix `required_conversation_resolution` assertion ([#2715](https://togithub.com/pygithub/pygithub/issues/2715)) ([`54f2226`](https://togithub.com/pygithub/pygithub/commit/54f22267)) - Fix assertion creating pull request review comment ([#2641](https://togithub.com/pygithub/pygithub/issues/2641)) ([`2fa568b`](https://togithub.com/pygithub/pygithub/commit/2fa568b6)) - Safely coerce `responseHeaders` to `int` ([#2697](https://togithub.com/pygithub/pygithub/issues/2697)) ([`adbfce9`](https://togithub.com/pygithub/pygithub/commit/adbfce92)) - Fix assertion for `subject_type` in creating pull request review comment ([#2642](https://togithub.com/pygithub/pygithub/issues/2642)) ([`4933459`](https://togithub.com/pygithub/pygithub/commit/4933459e)) - Use timezone-aware reset datetime in `GithubRetry.py` ([#2610](https://togithub.com/pygithub/pygithub/issues/2610)) ([`950a694`](https://togithub.com/pygithub/pygithub/commit/950a6949)) - Fix `Branch.bypass_pull_request_allowances` failing with "nil is not an object" ([#2535](https://togithub.com/pygithub/pygithub/issues/2535)) ([`c5542a6`](https://togithub.com/pygithub/pygithub/commit/c5542a6a)) #### Maintenance - Epic mass-merge `.pyi` type stubs back to `.py` sources ([#2636](https://togithub.com/pygithub/pygithub/issues/2636)) - Move to main default branch ([#2566](https://togithub.com/pygithub/pygithub/issues/2566)) ([`e66c163`](https://togithub.com/pygithub/pygithub/commit/e66c163a)) - Force Unix EOL ([#2573](https://togithub.com/pygithub/pygithub/issues/2573)) ([`094538e`](https://togithub.com/pygithub/pygithub/commit/094538e1)) - Close replay test data file silently when test is failing already ([#2747](https://togithub.com/pygithub/pygithub/issues/2747)) ([`6d871d5`](https://togithub.com/pygithub/pygithub/commit/6d871d56)) - CI: Make CI support merge queue ([#2644](https://togithub.com/pygithub/pygithub/issues/2644)) ([`a91debf`](https://togithub.com/pygithub/pygithub/commit/a91debf1)) - CI: Run CI on release branches ([#2708](https://togithub.com/pygithub/pygithub/issues/2708)) ([`9a88b6b`](https://togithub.com/pygithub/pygithub/commit/9a88b6b1)) - CI: remove conflict label workflow ([#2669](https://togithub.com/pygithub/pygithub/issues/2669)) ([`95d8b83`](https://togithub.com/pygithub/pygithub/commit/95d8b83c)) - Fix pip install command in README.md ([#2731](https://togithub.com/pygithub/pygithub/issues/2731)) ([`2cc1ba2`](https://togithub.com/pygithub/pygithub/commit/2cc1ba2c)) - Update `add_attribute.py` to latest conding style ([#2631](https://togithub.com/pygithub/pygithub/issues/2631)) ([`e735972`](https://togithub.com/pygithub/pygithub/commit/e735972e)) - CI: Improve ruff DX ([#2667](https://togithub.com/pygithub/pygithub/issues/2667)) ([`48d2009`](https://togithub.com/pygithub/pygithub/commit/48d2009c)) - CI: Increase wait and retries of labels action ([#2670](https://togithub.com/pygithub/pygithub/issues/2670)) ([`ff0f31c`](https://togithub.com/pygithub/pygithub/commit/ff0f31c2)) - Replace `flake8` with `ruff` ([#2617](https://togithub.com/pygithub/pygithub/issues/2617)) ([`42c3b47`](https://togithub.com/pygithub/pygithub/commit/42c3b47c)) - CI: update labels action name and version ([#2654](https://togithub.com/pygithub/pygithub/issues/2654)) ([`c5c83eb`](https://togithub.com/pygithub/pygithub/commit/c5c83eb5)) - CI: label PRs that have conflicts ([#2622](https://togithub.com/pygithub/pygithub/issues/2622)) ([`1d637e4`](https://togithub.com/pygithub/pygithub/commit/1d637e4b)) - Unify requirements files location & source in setup.py ([#2598](https://togithub.com/pygithub/pygithub/issues/2598)) ([`2edc0f8`](https://togithub.com/pygithub/pygithub/commit/2edc0f8f)) - Enable mypy `disallow_untyped_defs` ([#2609](https://togithub.com/pygithub/pygithub/issues/2609)) ([`294c0cc`](https://togithub.com/pygithub/pygithub/commit/294c0cc9)) - Enable mypy `check_untyped_defs` ([#2607](https://togithub.com/pygithub/pygithub/issues/2607)) ([`8816889`](https://togithub.com/pygithub/pygithub/commit/8816889a)) - Set line length to 120 characters ([#2599](https://togithub.com/pygithub/pygithub/issues/2599)) ([`13e178a`](https://togithub.com/pygithub/pygithub/commit/13e178a3)) - CI: Build and check package before release ([#2593](https://togithub.com/pygithub/pygithub/issues/2593)) ([`3c880e7`](https://togithub.com/pygithub/pygithub/commit/3c880e76)) - Use `typing_extensions` for `TypedDict` ([#2592](https://togithub.com/pygithub/pygithub/issues/2592)) ([`5fcb0c7`](https://togithub.com/pygithub/pygithub/commit/5fcb0c7d)) - CI: Update action actions/setup-python ([#2382](https://togithub.com/pygithub/pygithub/issues/2382)) ([`2e5cd31`](https://togithub.com/pygithub/pygithub/commit/2e5cd31e)) - Add more methods and attributes to Repository.pyi ([#2581](https://togithub.com/pygithub/pygithub/issues/2581)) ([`72840de`](https://togithub.com/pygithub/pygithub/commit/72840de4)) - CI: Make pytest color logs ([#2597](https://togithub.com/pygithub/pygithub/issues/2597)) ([`7324110`](https://togithub.com/pygithub/pygithub/commit/73241102)) - precommit: move `flake8` as last ([#2595](https://togithub.com/pygithub/pygithub/issues/2595)) ([`11bb6bd`](https://togithub.com/pygithub/pygithub/commit/11bb6bd7)) - Test on Windows and macOS, don't fail fast ([#2590](https://togithub.com/pygithub/pygithub/issues/2590)) ([`5c60089`](https://togithub.com/pygithub/pygithub/commit/5c600894)) - Remove symlinks from test data ([#2588](https://togithub.com/pygithub/pygithub/issues/2588)) ([`8d3b905`](https://togithub.com/pygithub/pygithub/commit/8d3b9057))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.