From 998bd1bc1e326bf926fca4d0590071fdafa36168 Mon Sep 17 00:00:00 2001 From: yihanzhao Date: Fri, 22 Nov 2024 14:28:43 +1100 Subject: [PATCH 1/2] Unpin the urllib3 to allow use of latest 2.x version --- .github/workflows/open-source-unit-tests.yml | 3 +++ requirements-dev.txt | 7 +++++++ requirements.txt | 13 ++----------- setup.py | 4 +--- tox.ini | 5 +---- 5 files changed, 14 insertions(+), 18 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.github/workflows/open-source-unit-tests.yml b/.github/workflows/open-source-unit-tests.yml index 426fd1c3..f853c07c 100644 --- a/.github/workflows/open-source-unit-tests.yml +++ b/.github/workflows/open-source-unit-tests.yml @@ -144,6 +144,9 @@ jobs: - name: Run Py-Marqo Tests run: | + # show all warnings to capture deprecation warnings when running tests + export PYTHONWARNINGS="default" + python -m pip install --upgrade pip # Required for Python 3.12 and above pip install setuptools diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..a060cecc --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,7 @@ +-r requirements.txt +pillow +numpy +pytest +dataclasses +requests_mock +tenacity \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1762176a..fefe934b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,4 @@ -# marqo client: -urllib3<2.0.0, >=1.26.0 +urllib3>=1.26.0 requests -packaging - -# testing -pillow -numpy -pytest -dataclasses pydantic>=2.0.0 -requests_mock -tenacity \ No newline at end of file +packaging \ No newline at end of file diff --git a/setup.py b/setup.py index a5794abd..780251f2 100644 --- a/setup.py +++ b/setup.py @@ -8,13 +8,11 @@ install_requires=[ # client: "requests", - "urllib3<2.0.0, >=1.26.0", + "urllib3>=1.26.0", "pydantic>=2.0.0", - "typing-extensions>=4.5.0", "packaging" ], tests_require=[ - "pytest", "tox" ], name="marqo", diff --git a/tox.ini b/tox.ini index 51e26438..d0d09614 100644 --- a/tox.ini +++ b/tox.ini @@ -8,10 +8,7 @@ passenv = whitelist_externals = python deps = - -r requirements.txt - pytest - pillow - numpy + -r requirements-dev.txt commands = pytest {posargs} From 4771cf088e812ae3910d609038cd8e7b2bc8d88d Mon Sep 17 00:00:00 2001 From: yihanzhao Date: Fri, 22 Nov 2024 14:36:19 +1100 Subject: [PATCH 2/2] Add a reminder --- requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fefe934b..a4d1204e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ urllib3>=1.26.0 requests pydantic>=2.0.0 -packaging \ No newline at end of file +packaging + +# Please note that test dependescies should be put in requirements-dev.txt file \ No newline at end of file