Add user agent config bit and set it for GH actions #221
+7
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new configuration option for setting a custom HTTP user agent in the
speasy
package. The changes ensure that the user agent can be customized for HTTP requests, improving identification and compatibility for specific use cases. Updates were made across configuration files and core functionality.Configuration Updates:
.github/workflows/PRs.yml
and.github/workflows/tests.yml
: Added theSPEASY_CORE_HTTP_USER_AGENT
environment variable to define a custom user agent for GitHub Actions workflows. [1] [2]speasy/config/__init__.py
: Introduced a new configuration entryhttp_user_agent
with a default value and description, allowing users to set a custom user agent for HTTP requests.Core Functionality Updates:
speasy/core/http.py
: Updated theUSER_AGENT
variable to use the custom value fromcore_config.http_user_agent
if set; otherwise, it defaults to the existing user agent format.