Skip to content

Fix REQUESTS_TIMEOUT by converting to int#526

Merged
tdruez merged 1 commit intoaboutcode-org:mainfrom
rogu-beta:2026-04-30-requests-timeout
May 1, 2026
Merged

Fix REQUESTS_TIMEOUT by converting to int#526
tdruez merged 1 commit intoaboutcode-org:mainfrom
rogu-beta:2026-04-30-requests-timeout

Conversation

@rogu-beta
Copy link
Copy Markdown
Contributor

The commit 65c725c introduced DEJACODE_INTEGRATION_REQUESTS_TIMEOUT to control the timeout behavior for requests that DejaCode makes. The dejacode_toolkit_init_.py uses the function get_settings which either returns getenv or getattr. Since getenv returns a string, the usage of get_settings must convert to int before assigning it to REQUESTS_TIMEOUT, otherwise requests will raise an exception for not receiving an int or float.

Issues

Changes

The return value of get_settings is converted into an integer, ensuring that in either case of get_settings REQUESTS_TIMEOUT contains an integer.

Checklist

  • I have read the contributing guidelines
  • I have linked an existing issue above
  • [-] I have added unit tests covering the new code
  • I have reviewed and understood every line of this PR

The commit 65c725c introduced DEJACODE_INTEGRATION_REQUESTS_TIMEOUT to control the timeout behavior for requests that DejaCode makes. The dejacode_toolkit\__init__.py uses the function `get_settings` which either returns `getenv` or `getattr`. Since `getenv` returns a string, the usage of `get_settings` must convert to int before assigning it to REQUESTS_TIMEOUT, otherwise requests will raise an exception for not receiving an int or float.

Signed-off-by: Robert Guetzkow <robert.guetzkow@betasystems.com>
@tdruez tdruez merged commit e44d30c into aboutcode-org:main May 1, 2026
4 checks passed
@tdruez
Copy link
Copy Markdown
Contributor

tdruez commented May 1, 2026

Hey @rogu-beta thanks for catching and fixing this one 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Setting DEJACODE_INTEGRATION_REQUESTS_TIMEOUT results in connection issues

2 participants