Skip to content

Commit

Permalink
fix: Set a User-Agent header on all requests readthedocs/readthedocs.…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Nov 25, 2024
1 parent 8d66eee commit 62002ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

0.5.5 (2024-11-25)
------------------

- Set a User-Agent header on all requests.

0.5.4 (2024-10-27)
------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Open Contracting Partnership"

# The short X.Y version
version = "0.5.4"
version = "0.5.5"
# The full version, including alpha/beta/rc tags
release = version

Expand Down
3 changes: 3 additions & 0 deletions ocdsextensionregistry/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
# https://urllib3.readthedocs.io/en/latest/advanced-usage.html#customizing-pool-behavior
adapter = HTTPAdapter(max_retries=3, pool_maxsize=int(os.getenv('REQUESTS_POOL_MAXSIZE', '10')))
session = CachedSession(backend='memory', expire_after=os.getenv('REQUESTS_CACHE_EXPIRE_AFTER', NEVER_EXPIRE))
session.headers.update(
{'User-Agent': 'ocdsextensionregistry (+http://www.open-contracting.org; [email protected])'}
)
session.mount('https://', adapter)
session.mount('http://', adapter)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ocdsextensionregistry"
version = "0.5.4"
version = "0.5.5"
authors = [{name = "Open Contracting Partnership", email = "[email protected]"}]
description = "Eases access to information from the extension registry of the Open Contracting Data Standard"
readme = "README.rst"
Expand Down

0 comments on commit 62002ba

Please sign in to comment.