Repository: griptape-ai/griptape (language: python)

Issue:
Update pypdf version
 - [x] I have read and agree to the [contributing guidelines](https://github.com/griptape-ai/griptape#contributing).

**Is your feature request related to a problem? Please describe.**
I would like to install pypdf along side griptape at the latest version. Doing so gives me this error:

```sh
 ❯ poetry add pypdf
Using version ^5.0.0 for pypdf

Updating dependencies
Resolving dependencies... (0.1s)

Because griptape[loaders-pdf] (0.32.0) depends on pypdf (>=3.9,<4.0)
 and no versions of griptape match >0.32.0,<0.33.0, griptape[loaders-pdf] (>=0.32.0,<0.33.0) requires pypdf (>=3.9,<4.0).
So, because gtxl4 depends on both griptape[loaders-pdf] (^0.32.0) and pypdf (^5.0.0), version solving failed.
```

**Describe the solution you'd like**
The ideal solution would be to allow different versions of pypdf, though I don't think this works with the way dependency resolution works in python. The next best solution would be to update the version of pypdf in griptape.



Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 11e11c5e9..71475e53c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - **BREAKING**: Renamed parameter `pipe` on `HuggingFacePipelinePromptDriver` to `pipeline`.
 - Several places where API clients are initialized are now lazy loaded.
 - `Structure.output`'s type is now `BaseArtifact` and raises an exception if the output is `None`.
+- **BREAKING**: Update `pypdf` dependency to `^5.0.1`.
 
 ### Fixed
 - Anthropic native Tool calling
diff --git a/poetry.lock b/poetry.lock
index 3ec9ec7af..8594e6122 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -4863,17 +4863,17 @@ diagrams = ["jinja2", "railroad-diagrams"]
 
 [[package]]
 name = "pypdf"
-version = "3.17.4"
+version = "5.0.1"
 description = "A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files"
 optional = true
-python-versions = ">=3.6"
+python-versions = ">=3.8"
 files = [
-    {file = "pypdf-3.17.4-py3-none-any.whl", hash = "sha256:6aa0f61b33779b64486de3f42835d3668badd48dac4a536aeb87da187a5eacd2"},
-    {file = "pypdf-3.17.4.tar.gz", hash = "sha256:ec96e2e4fc9648ac609d19c00d41e9d606e0ae2ce5a0bbe7691426f5f157166a"},
+    {file = "pypdf-5.0.1-py3-none-any.whl", hash = "sha256:ff8a32da6c7a63fea9c32fa4dd837cdd0db7966adf6c14f043e3f12592e992db"},
+    {file = "pypdf-5.0.1.tar.gz", hash = "sha256:a361c3c372b4a659f9c8dd438d5ce29a753c79c620dc6e1fd66977651f5547ea"},
 ]
 
 [package.dependencies]
-typing_extensions = {version = ">=3.7.4.3", markers = "python_version < \"3.10\""}
+typing_extensions = {version = ">=4.0", markers = "python_version < \"3.11\""}
 
 [package.extras]
 crypto = ["PyCryptodome", "cryptography"]
@@ -6469,6 +6469,11 @@ files = [
     {file = "triton-3.0.0-1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34e509deb77f1c067d8640725ef00c5cbfcb2052a1a3cb6a6d343841f92624eb"},
     {file = "triton-3.0.0-1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bcbf3b1c48af6a28011a5c40a5b3b9b5330530c3827716b5fbf6d7adcc1e53e9"},
     {file = "triton-3.0.0-1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6e5727202f7078c56f91ff13ad0c1abab14a0e7f2c87e91b12b6f64f3e8ae609"},
+    {file = "triton-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39b052da883351fdf6be3d93cedae6db3b8e3988d3b09ed221bccecfa9612230"},
+    {file = "triton-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd34f19a8582af96e6291d4afce25dac08cb2a5d218c599163761e8e0827208e"},
+    {file = "triton-3.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d5e10de8c011adeb7c878c6ce0dd6073b14367749e34467f1cff2bde1b78253"},
+    {file = "triton-3.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8903767951bf86ec960b4fe4e21bc970055afc65e9d57e916d79ae3c93665e3"},
+    {file = "triton-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:41004fb1ae9a53fcb3e970745feb87f0e3c94c6ce1ba86e95fa3b8537894bef7"},
 ]
 
 [package.dependencies]
@@ -7103,4 +7108,4 @@ loaders-sql = ["sqlalchemy"]
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.9"
-content-hash = "310d1144f8393faf5b82f05e89270e930f8e25eb9d2036d5e1ca11a9b60cdc67"
+content-hash = "5533619c58403efdc324b1513ac64df7564dc7d917e37a00d3c1fbd91c2164e2"
diff --git a/pyproject.toml b/pyproject.toml
index 23471b71c..589eae8ad 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -68,7 +68,7 @@ tavily-python = {version = "^0.5.0", optional = true}
 
 # loaders
 pandas = {version = "^1.3", optional = true}
-pypdf = {version = "^3.9", optional = true}
+pypdf = {version = "^5.0.1", optional = true}
 pillow = {version = "^10.2.0", optional = true}
 mail-parser = {version = "^3.15.0", optional = true}
 filetype = {version = "^1.2", optional = true}


Test patch:
diff --git a/tests/unit/loaders/test_pdf_loader.py b/tests/unit/loaders/test_pdf_loader.py
index 3f4f7848e..376a9579a 100644
--- a/tests/unit/loaders/test_pdf_loader.py
+++ b/tests/unit/loaders/test_pdf_loader.py
@@ -20,7 +20,7 @@ def test_load(self, loader, create_source):
 
         artifacts = loader.load(source)
 
-        assert len(artifacts) == 151
+        assert len(artifacts) == 156
         assert artifacts[0].value.startswith("Bitcoin: A Peer-to-Peer")
         assert artifacts[-1].value.endswith('its applications," 1957.\n9')
         assert artifacts[0].embedding == [0, 1]
@@ -37,7 +37,7 @@ def test_load_collection(self, loader, create_source):
 
         for key in keys:
             artifact = collection[key]
-            assert len(artifact) == 151
+            assert len(artifact) == 156
             assert artifact[0].value.startswith("Bitcoin: A Peer-to-Peer")
             assert artifact[-1].value.endswith('its applications," 1957.\n9')
             assert artifact[0].embedding == [0, 1]