Repository: opendatacube/odc-tools (language: python)

Issue:
Existing github action ci is returning errors - missing packaging
https://github.com/opendatacube/odc-tools/actions

```
Run find . -name _version.py | xargs python ./scripts/patch_version.py ${GITHUB_RUN_NUMBER:-0}
Traceback (most recent call last):
  File "./scripts/patch_version.py", line 2, in <module>
    from packaging import version
ModuleNotFoundError: No module named 'packaging'
Error: Process completed with exit code 123.
```

and

```
=================================== ERRORS ====================================
_________ ERROR collecting apps/dc_tools/tests/test_stac_api_to_dc.py __________
apps/dc_tools/tests/test_stac_api_to_dc.py:4: in <module>
    from odc.apps.dc_tools.stac_api_to_dc import cli
tests/env/lib/python3.8/site-packages/odc/apps/dc_tools/stac_api_to_dc.py:22: in <module>
    from pystac_client import Client
tests/env/lib/python3.8/site-packages/pystac_client/__init__.py:3: in <module>
    from pystac_client.client import Client
tests/env/lib/python3.8/site-packages/pystac_client/client.py:8: in <module>
    from pystac_client.collection_client import CollectionClient
tests/env/lib/python3.8/site-packages/pystac_client/collection_client.py:7: in <module>
    from pystac_client.item_search import ItemSearch
tests/env/lib/python3.8/site-packages/pystac_client/item_search.py:17: in <module>
    from pystac_client.stac_api_io import StacApiIO
tests/env/lib/python3.8/site-packages/pystac_client/stac_api_io.py:[31](https://github.com/opendatacube/odc-tools/runs/6976564857?check_suite_focus=true#step:8:32): in <module>
    class StacApiIO(DefaultStacIO):
tests/env/lib/python3.8/site-packages/pystac_client/stac_api_io.py:57: in StacApiIO
    def read_text(self, source: pystac.link.HREF, *args: Any, **kwargs: Any) -> str:
E   AttributeError: module 'pystac.link' has no attribute 'HREF'
=============================== warnings summary ===============================
tests/env/lib/python3.8/site-packages/datacube/utils/geometry/_base.py:1[53](https://github.com/opendatacube/odc-tools/runs/6976564857?check_suite_focus=true#step:8:54)
tests/env/lib/python3.8/site-packages/datacube/utils/geometry/_base.py:153
  /home/runner/work/odc-tools/odc-tools/tests/env/lib/python3.8/site-packages/datacube/utils/geometry/_base.py:153: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    DEFAULT_WKT_VERSION = (WktVersion.WKT1_GDAL if LooseVersion(rasterio.__gdal_version__) < LooseVersion("3.0.0")
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR apps/dc_tools/tests/test_stac_api_to_dc.py - AttributeError: module 'py...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 2 warnings, 1 error in 2.60s =========================
```
S3 find async
Re-work async s3 fetcher, instead of queues flowing to queues use futures, much simpler, also removed multi-threading as it doesn't help anyway.


Discussion / hints:
@pindge see this commit for a fix of the same issue in odc-stac repo
https://github.com/opendatacube/odc-stac/commit/e33f033c6bbb76a1dc3c085837211a518255d2df


Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7d0bb56a8..f33b76971 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -35,6 +35,7 @@ jobs:
         python -m pip install --upgrade \
          toml \
          wheel \
+         packaging \
          twine
         python -m pip freeze
 
@@ -123,6 +124,7 @@ jobs:
       shell: bash
       run: |
         echo "$(pwd)/tests/env/bin" >> $GITHUB_PATH
+        export PATH="$(pwd)/tests/env/bin"
 
     - name: Install in Edit mode
       shell: bash
@@ -133,7 +135,6 @@ jobs:
 
         ./scripts/dev-install.sh --no-deps
 
-
     - name: Start Test DB
       shell: bash
       run: |
@@ -143,6 +144,7 @@ jobs:
         pg_ctl -D ${pgdata} -l "${pgdata}/pg.log" start
         createdb datacube
         datacube system init
+        pip list --format=freeze
 
       env:
         DATACUBE_DB_URL: postgresql:///datacube


Test patch:
diff --git a/tests/test-env-py38.yml b/tests/test-env-py38.yml
index de3770e4b..103ca9813 100644
--- a/tests/test-env-py38.yml
+++ b/tests/test-env-py38.yml
@@ -5,6 +5,7 @@
 name: odc-tests-py38
 channels:
   - conda-forge
+
 dependencies:
   - python=3.8
 
@@ -24,8 +25,8 @@ dependencies:
   - tqdm
 
   # odc-apps-dc-tools
-  - pystac>=1.1.0
-  - pystac-client>=0.2.0
+  - pystac>=1.2.0
+  - pystac-client>=0.4.0
   - azure-storage-blob
   - fsspec
   - lxml # needed for thredds-crawler
@@ -60,7 +61,7 @@ dependencies:
   - pip:
       # odc.apps.dc-tools
       - thredds-crawler
-      - rio-stac==0.3.0
+      - rio-stac
 
       # odc.algo optional dependency
       - hdstats