Skip to content

Fix REQUESTS_TIMEOUT by converting to int#526

Open
rogu-beta wants to merge 1 commit intoaboutcode-org:mainfrom
rogu-beta:2026-04-30-requests-timeout
Open

Fix REQUESTS_TIMEOUT by converting to int#526
rogu-beta wants to merge 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>
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

1 participant