Skip to content

Remove deprecated usage of lazy argument in get_repo test calls - #3555

Merged
EnricoMi merged 2 commits into
PyGithub:mainfrom
comNayaK:fix/lazy-deprecation-warnings
Aug 18, 2026
Merged

Remove deprecated usage of lazy argument in get_repo test calls#3555
EnricoMi merged 2 commits into
PyGithub:mainfrom
comNayaK:fix/lazy-deprecation-warnings

Conversation

@comNayaK

@comNayaK comNayaK commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Description
This PR resolves 148 deprecation warnings raised during test suite execution.

It refactors the deprecated usage of get_repo(..., lazy=True/False) across 18 test files to use the recommended withLazy(lazy).get_repo(...) method on the main Github class.

Changes

  • Replaced get_repo(..., lazy=True) and get_repo(..., lazy=False) calls with withLazy(True).get_repo(...) and withLazy(False).get_repo(...) in the test suite.
  • Verified that all 1123 tests pass cleanly and warnings are eliminated.

@EnricoMi EnricoMi changed the title refactor: remove deprecated usage of lazy argument in get_repo test calls Remove deprecated usage of lazy argument in get_repo test calls Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (7de2644) to head (09ea140).
⚠️ Report is 57 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3555      +/-   ##
==========================================
- Coverage   97.00%   96.99%   -0.01%     
==========================================
  Files         172      176       +4     
  Lines       18934    19905     +971     
==========================================
+ Hits        18366    19307     +941     
- Misses        568      598      +30     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Test Results

     9 files  ±0       9 suites  ±0   5m 45s ⏱️ +5s
 1 148 tests ±0   1 148 ✅ ±0  0 💤 ±0  0 ❌ ±0 
14 201 runs  ±0  14 200 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 09ea140. ± Comparison against base commit 5e2de31.

♻️ This comment has been updated with latest results.

@EnricoMi EnricoMi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@EnricoMi EnricoMi added the maintenance General maintenance not adding features or fixes label Aug 18, 2026
@EnricoMi EnricoMi changed the title Remove deprecated usage of lazy argument in get_repo test calls Remove deprecated usage of lazy argument in get_repo test calls Aug 18, 2026
@EnricoMi
EnricoMi added this pull request to the merge queue Aug 18, 2026
Merged via the queue into PyGithub:main with commit b03e683 Aug 18, 2026
26 checks passed
lettuce-bot Bot added a commit to lettuce-financial/github-bot-signed-commit that referenced this pull request Aug 21, 2026
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [PyGithub](https://redirect.github.com/pygithub/pygithub) | `==2.9.1`
→ `==2.10.0` |
![age](https://developer.mend.io/api/mc/badges/age/pypi/pygithub/2.10.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pygithub/2.9.1/2.10.0?slim=true)
|
| [pygithub](https://redirect.github.com/pygithub/pygithub) | `==2.9.1`
→ `==2.10.0` |
![age](https://developer.mend.io/api/mc/badges/age/pypi/pygithub/2.10.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pygithub/2.9.1/2.10.0?slim=true)
|

---

### Release Notes

<details>
<summary>pygithub/pygithub (PyGithub)</summary>

###
[`v2.10.0`](https://redirect.github.com/PyGithub/PyGithub/releases/tag/v2.10.0):
2.10.0

[Compare
Source](https://redirect.github.com/pygithub/pygithub/compare/v2.9.1...v2.10.0)

##### Notable changes

##### Drop Python 3.9 support due to End-of-Life

Python 3.9 reached its end-of-life October 31, 2025. Support has been
removed with this release.

##### New Features

- Allow to specify the Github API version by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3480](https://redirect.github.com/PyGithub/PyGithub/pull/3480)
- Add issue dependency endpoints by
[@&#8203;james-geiger](https://redirect.github.com/james-geiger) in
[PyGithub/PyGithub#3477](https://redirect.github.com/PyGithub/PyGithub/pull/3477)

##### Improvements

- Add `incomplete_results` property to `PaginatedList` by
[@&#8203;Felixoid](https://redirect.github.com/Felixoid) in
[PyGithub/PyGithub#3396](https://redirect.github.com/PyGithub/PyGithub/pull/3396)
- Add `WorkflowRun.get_attempt` and `Repository.get_workflow_job`
functions by [@&#8203;cecheta](https://redirect.github.com/cecheta) in
[PyGithub/PyGithub#3401](https://redirect.github.com/PyGithub/PyGithub/pull/3401)
- Add support for `head_repo` when creating pull request by
[@&#8203;shannon](https://redirect.github.com/shannon) in
[PyGithub/PyGithub#3479](https://redirect.github.com/PyGithub/PyGithub/pull/3479)
- Add `max_rate_limit_wait` to `GithubRetry` to cap rate limit backoff
by [@&#8203;tanistheta](https://redirect.github.com/tanistheta) in
[PyGithub/PyGithub#3540](https://redirect.github.com/PyGithub/PyGithub/pull/3540)
- Add `return_run_details` parameter to `Workflow.create_dispatch` by
[@&#8203;SebastienSyd](https://redirect.github.com/SebastienSyd) in
[PyGithub/PyGithub#3471](https://redirect.github.com/PyGithub/PyGithub/pull/3471)
- Update `SecurityAndAnalysis` by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3503](https://redirect.github.com/PyGithub/PyGithub/pull/3503)

##### Bug Fixes

- Fix duplicated URL in `OrganizationVariable.edit()` and
`OrganizationSecret.edit()` by
[@&#8203;Krishnachaitanyakc](https://redirect.github.com/Krishnachaitanyakc)
in
[PyGithub/PyGithub#3472](https://redirect.github.com/PyGithub/PyGithub/pull/3472)
- Fix `GithubException.__str__` decoding bytes data by
[@&#8203;SAY-5](https://redirect.github.com/SAY-5) in
[PyGithub/PyGithub#3494](https://redirect.github.com/PyGithub/PyGithub/pull/3494)
- Fixing `OrganizationVariable.value` by properly using base class by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3507](https://redirect.github.com/PyGithub/PyGithub/pull/3507)
- Parse only the query string for `PaginatedList.totalCount` by
[@&#8203;Noethix55555](https://redirect.github.com/Noethix55555) in
[PyGithub/PyGithub#3518](https://redirect.github.com/PyGithub/PyGithub/pull/3518)
- Encode boolean query parameters as lowercase by
[@&#8203;Noethix55555](https://redirect.github.com/Noethix55555) in
[PyGithub/PyGithub#3516](https://redirect.github.com/PyGithub/PyGithub/pull/3516)
- Fix doubled slash in request path for `base_url` with trailing slash
by [@&#8203;Noethix55555](https://redirect.github.com/Noethix55555) in
[PyGithub/PyGithub#3537](https://redirect.github.com/PyGithub/PyGithub/pull/3537)
- Fix `WorkflowRun` schema suggestion by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3559](https://redirect.github.com/PyGithub/PyGithub/pull/3559)
- Fix OAuth2 authorization `state` / `code_verifier` parameters by
[@&#8203;TheoGoudout](https://redirect.github.com/TheoGoudout) in
[PyGithub/PyGithub#3440](https://redirect.github.com/PyGithub/PyGithub/pull/3440)
- Allow creating custom property with `values_editable_by` param by
[@&#8203;chawlajay9](https://redirect.github.com/chawlajay9) in
[PyGithub/PyGithub#3548](https://redirect.github.com/PyGithub/PyGithub/pull/3548)
- Fix `OrganizationSecret.edit()` to seal the value and use `PUT` by
[@&#8203;Noethix55555](https://redirect.github.com/Noethix55555) in
[PyGithub/PyGithub#3529](https://redirect.github.com/PyGithub/PyGithub/pull/3529)
- Fix lazy retrieval of latest tag name by
[@&#8203;sathieu](https://redirect.github.com/sathieu) in
[PyGithub/PyGithub#3487](https://redirect.github.com/PyGithub/PyGithub/pull/3487)
- Fix typing and typos by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3485](https://redirect.github.com/PyGithub/PyGithub/pull/3485)

##### Maintenance

- Add support for Python 3.15 and drop EOL 3.9 by
[@&#8203;hugovk](https://redirect.github.com/hugovk) in
[PyGithub/PyGithub#3551](https://redirect.github.com/PyGithub/PyGithub/pull/3551)
- Move self-link awareness into `CompletableGithubObject` by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3432](https://redirect.github.com/PyGithub/PyGithub/pull/3432)
- Add documentation for agents, add Claude skills by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3509](https://redirect.github.com/PyGithub/PyGithub/pull/3509)
- Add `sphinx-copybutton` for code blocks by
[@&#8203;DivyanshiGautam31](https://redirect.github.com/DivyanshiGautam31)
in
[PyGithub/PyGithub#3493](https://redirect.github.com/PyGithub/PyGithub/pull/3493)
- Add support to OpenAPI script for applying schema to methods by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3374](https://redirect.github.com/PyGithub/PyGithub/pull/3374)
- Improve OpenAPI apply properties and methods by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3495](https://redirect.github.com/PyGithub/PyGithub/pull/3495)
- Fix OpenAPI method verb detection by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3496](https://redirect.github.com/PyGithub/PyGithub/pull/3496)
- Add OpenAPI script tests by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3489](https://redirect.github.com/PyGithub/PyGithub/pull/3489)
- Fix OpenAPI apply method by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3498](https://redirect.github.com/PyGithub/PyGithub/pull/3498)
- Reordering OpenAPI test sequence by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3500](https://redirect.github.com/PyGithub/PyGithub/pull/3500)
- Apply typing convention by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3504](https://redirect.github.com/PyGithub/PyGithub/pull/3504)
- Bump `mypy` Python version to 3.12 by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3505](https://redirect.github.com/PyGithub/PyGithub/pull/3505)
- Use `@overload` to type `get_user` by
[@&#8203;xmo-odoo](https://redirect.github.com/xmo-odoo) in
[PyGithub/PyGithub#3502](https://redirect.github.com/PyGithub/PyGithub/pull/3502)
- Add overload type annotations by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3506](https://redirect.github.com/PyGithub/PyGithub/pull/3506)
- Simplify `OrganizationVariable` by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3508](https://redirect.github.com/PyGithub/PyGithub/pull/3508)
- Add OpenAPI script filename option to create class by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3512](https://redirect.github.com/PyGithub/PyGithub/pull/3512)
- OpenAPI script improvements by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3511](https://redirect.github.com/PyGithub/PyGithub/pull/3511)
- Make OpenAPI index file deterministic by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3514](https://redirect.github.com/PyGithub/PyGithub/pull/3514)
- Add more OpenAPI script tests by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3501](https://redirect.github.com/PyGithub/PyGithub/pull/3501)
- Make unified diffs of run path by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) in
[PyGithub/PyGithub#3515](https://redirect.github.com/PyGithub/PyGithub/pull/3515)
- CI: Upgrade Github actions, pin to commit SHAs by
[@&#8203;EnricoMi](https://redirect.github.com/EnricoMi) with
[@&#8203;Copilot](https://redirect.github.com/Copilot) in
[PyGithub/PyGithub#3552](https://redirect.github.com/PyGithub/PyGithub/pull/3552)
- Use simple str contains instead of re in requester 401 OTP check by
[@&#8203;scop](https://redirect.github.com/scop) in
[PyGithub/PyGithub#3541](https://redirect.github.com/PyGithub/PyGithub/pull/3541)
- Remove deprecated usage of `lazy` argument in `get_repo` test calls by
[@&#8203;comNayaK](https://redirect.github.com/comNayaK) in
[PyGithub/PyGithub#3555](https://redirect.github.com/PyGithub/PyGithub/pull/3555)
- docs: add exception handling example by
[@&#8203;zain-asif-dev](https://redirect.github.com/zain-asif-dev) in
[PyGithub/PyGithub#3543](https://redirect.github.com/PyGithub/PyGithub/pull/3543)
- docs: add example for uploading multiple files in a single commit by
[@&#8203;laurazimrn](https://redirect.github.com/laurazimrn) in
[PyGithub/PyGithub#3545](https://redirect.github.com/PyGithub/PyGithub/pull/3545)

**Full Changelog**:
<PyGithub/PyGithub@v2.9.1...v2.10.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- 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 these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/lettuce-financial/github-bot-signed-commit).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zNS40IiwidXBkYXRlZEluVmVyIjoiNDQuMzUuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance General maintenance not adding features or fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants