OK, now for a dependency issue… I must have missed...
# general
c
OK, now for a dependency issue… I must have missed some crucial detail somewhere.. πŸ˜‰ [SOLVED]
I get this import error:
Copy code
$ ./pants dependencies --transitive tests/auth_test.py 
20:46:45.15 [INFO] Initializing scheduler...
20:46:45.51 [INFO] Scheduler initialized.
deps:.._pyproject.toml
deps:backoff
deps:cachetools
deps:flasgger
deps:flask
deps:gevent
deps:memorised
deps:requests
deps:svs-configuration
deps:svs-logging
deps:svs-stats
deps:svs-utils
src/cdi/__init__.py
src/cdi/api.py
src/cdi/auth.py
src/cdi/cache.py
src/cdi/cli.py
src/cdi/discovery.py
src/cdi/geventpatch.py
src/cdi/globals.py
src/cdi/health.py
src/cdi/model.py
src/cdi/server/__init__.py
src/cdi/server/wsgi.py
src/cdi/service/__init__.py
src/cdi/service/factory.py
src/cdi/service/restlibs.py
src/cdi/service/service.py
src/cdi/session.py
src/cdi/tasks.py
src/cdi/tasks_api.py
src/cdi/test/__init__.py
src/cdi/test/api.py
src/cdi/test/model.py
src/cdi/test/utils.py
src/cdi/utils.py
tests/__init__.py
tests/conftest.py:tests0
xxx@xxx:~/src/svs/python/cdi-server (feature/pants_buildtool *) [cdi-server:3.9.6]
$ ./pants test tests/auth_test.py 
20:48:07.85 [WARN] Completed: test - tests/auth_test.py:tests0 failed (exit code 4).
monkey patch code, using gevent
ImportError while loading conftest '/private/var/folders/8j/c8jf_msj009947wyw82xvdkw0000gn/T/process-executionVBzZkd/tests/conftest.py'.
tests/conftest.py:1: in <module>
    from cdi.test.api import *
src/cdi/__init__.py:11: in <module>
    from . import server, cache, utils, tasks_api  # noqa: F401
src/cdi/server/__init__.py:8: in <module>
    from cdi import discovery
src/cdi/discovery.py:5: in <module>
    from svs_utils import zk, rancher_metadata
/Users/xxx/.cache/pants/named_caches/pex_root/venvs/94920f73ec7d45a86e29af57c24be15d50650fea/2fc5c1b7ae485b7657ccc1640e20fc576a94f369/lib/python3.9/site-packages/svs_utils/zk/__init__.py:1: in <module>
    from .client import ZK_HOSTS  # noqa: F401
/Users/xxx/.cache/pants/named_caches/pex_root/venvs/94920f73ec7d45a86e29af57c24be15d50650fea/2fc5c1b7ae485b7657ccc1640e20fc576a94f369/lib/python3.9/site-packages/svs_utils/zk/client.py:5: in <module>
    from kazoo.client import KazooClient
E   ModuleNotFoundError: No module named 'kazoo'



𐄂 tests/auth_test.py:tests0 failed.
Project tree like this:
Copy code
$ tree -L 2 -d deps src tests
deps
src
β”œβ”€β”€ cdi
β”‚Β Β  β”œβ”€β”€ deprecated
β”‚Β Β  β”œβ”€β”€ server
β”‚Β Β  β”œβ”€β”€ service
β”‚Β Β  β”œβ”€β”€ smorest
β”‚Β Β  └── test
tests
β”œβ”€β”€ deprecated
└── service_test

12 directories
this on pants 2.6.0
I notice that
kazoo
does not show up in the list of deps.. however, it is present as a BUILD target:
Copy code
$ ./pants list deps/:
deps:.._pyproject.toml
deps:backoff
deps:blinker
deps:cachetools
deps:decorator
deps:flasgger
deps:flask
deps:flask-cors
deps:gevent
deps:kazoo
deps:memorised
deps:python-memcached
deps:requests
deps:statsd
deps:svs-configuration
deps:svs-logging
deps:svs-stats
deps:svs-utils
Could this be a misconfigured svs-utils.. in case we don’t walk 3rdparty libs for dep inference, but trust their setup.py files to be conclusive in what they require?
Aahh.. right, that could be it, sorry for the noise, I’ll explore that line first… (we have a few extras on that lib, to select what additional dep libs to install, based on what is going to be used)
Yep, that got me further, to the next import issue.. progress! πŸ˜„
❀️ 2