Skip to content

Commit 1016f87

Browse files
BREAKING CHANGE: removed requests from solnlib's dependencies (#412)
**Issue number:[ADDON-73536](https://splunk.atlassian.net/browse/ADDON-73536)** ### PR Type **What kind of change does this PR introduce?** * [x] Breaking change * [ ] Feature * [ ] Bug Fix * [ ] Refactoring (no functional or API changes) * [ ] Documentation Update * [ ] Maintenance (dependency updates, CI, etc.) ## Summary The requests library has been removed from solnlib, so solnlib now depends on the requests library from the running environment. ### Changes removed requests from pyproject.toml ### User experience Solnlib will no longer install requests library. if requests are installed in `<Add-on>/lib` e.g. as a dependency of another library, that version will be taken first. If requests is missing from the add-on’s lib directory, then requests provided from splunk will be used. In case the splunk requests version is not sufficient for the user, user can deliver version he needs by simply adding it to the requirements.txt or pyproject.toml file in the add-on. ## Checklist If an item doesn't apply to your changes, leave it unchecked. * [x] I have performed a self-review of this change according to the [development guidelines](https://splunk.github.io/addonfactory-ucc-generator/contributing/#development-guidelines) * [x] Tests have been added/modified to cover the changes [(testing doc)](https://splunk.github.io/addonfactory-ucc-generator/contributing/#build-and-test) * [x] Changes are documented * [x] PR title and description follows the [contributing principles](https://splunk.github.io/addonfactory-ucc-generator/contributing/#pull-requests)
2 parents e0d4b15 + 641e7ab commit 1016f87

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

docs/release_6_0_0.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Removed requests and urllib3 from solnlib
2+
The `requests` and `urllib3` libraries has been removed from solnlib, so solnlib now depends on the `requests` and `urllib3` libraries from the running environment.
3+
By default, Splunk delivers the above libraries and their version depends on the Splunk version. More information [here](https://docs.splunk.com/Documentation/Splunk/9.2.3/ReleaseNotes/Credits).
4+
5+
**IMPORTANT**: `urllib3` is available in Splunk `v8.1.0` and later
6+
7+
Please note that if `requests` or `urllib3` are installed in `<Add-on>/lib` e.g. as a dependency of another library, that version will be taken first.
8+
If `requests` or `urllib3` is missing in the add-on's `lib` directory, the version provided by Splunk will be used.
9+
10+
## Custom Version of requests and urllib3
11+
In case the Splunk's `requests` or `urllib3` version is not sufficient for you,
12+
you can deliver version you need by simply adding it to the `requirements.txt` or `pyproject.toml` file in your add-on.
13+
14+
## Use solnlib outside the Splunk
15+
**Solnlib** no longer provides `requests` and `urllib3` so if you want to use **solnlib** outside the Splunk, please note that you will need to
16+
provide these libraries yourself in the environment where **solnlib** is used.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ plugins:
3030

3131
nav:
3232
- Home: index.md
33+
- Release 6.0.0: release_6_0_0.md
3334
- References:
3435
- modular_input:
3536
- "checkpointer.py": modular_input/checkpointer.md

poetry.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ classifiers = [
4040

4141
[tool.poetry.dependencies]
4242
python = ">=3.7,<3.14"
43-
requests = "^2.31.0"
44-
urllib3 = "<2"
4543
sortedcontainers = ">=2"
4644
defusedxml = ">=0.7"
4745
splunk-sdk = ">=1.6"

0 commit comments

Comments
 (0)