ripe-gigabyte-88964
03/16/2023, 4:37 PMfrom azure.cosmos.exceptions import CosmosHttpResponseError
E ModuleNotFoundError: No module named 'azure.cosmos'
Does this have to do with the module mapping maybe? Even though I see azure.cosmos in the default mapping.ripe-gigabyte-88964
03/16/2023, 4:37 PMpants.toml
?ripe-gigabyte-88964
03/16/2023, 4:41 PMfrom gql.transport.requests import RequestsHTTPTransport
/Users/nick.dellosa/.cache/pants/named_caches/pex_root/venvs/s/8444aa37/venv/lib/python3.8/site-packages/gql/transport/requests.py:11: in <module>
from requests_toolbelt.multipart.encoder import MultipartEncoder
E ModuleNotFoundError: No module named 'requests_toolbelt'
witty-crayon-22786
03/16/2023, 4:45 PMazure.cosmos
entry was added in the last two months: it might not be in the release that you are usingwitty-crayon-22786
03/16/2023, 4:47 PMSide note, is it possible to add stuff to the global mapping innot currently, no: would need to add it to the?pants.toml
python_requirements
target that provides the requirement: https://www.pantsbuild.org/docs/reference-python_requirements#codemodule_mappingcoderipe-gigabyte-88964
03/16/2023, 5:13 PMripe-gigabyte-88964
03/16/2023, 5:14 PMazure.cosmos
wasn't in the 2.15 release yetwitty-crayon-22786
03/16/2023, 5:14 PMwitty-crayon-22786
03/16/2023, 5:15 PMpants
users use it for monorepos, where different portions of the repo use different portions of the resolve.ripe-gigabyte-88964
03/16/2023, 5:19 PMrequirements.txt
files into one then?witty-crayon-22786
03/16/2023, 5:20 PMwitty-crayon-22786
03/16/2023, 5:20 PMripe-gigabyte-88964
03/16/2023, 5:28 PMripe-gigabyte-88964
03/16/2023, 5:30 PMwitty-crayon-22786
03/16/2023, 5:31 PMwitty-crayon-22786
03/16/2023, 5:31 PMhappy-kitchen-89482
03/16/2023, 6:38 PMhappy-kitchen-89482
03/16/2023, 6:39 PMhappy-kitchen-89482
03/16/2023, 6:48 PMhappy-kitchen-89482
03/16/2023, 6:48 PMripe-gigabyte-88964
03/16/2023, 7:48 PM15:45:27.09 [WARN] Pants cannot infer owners for the following imports in the target path/to/my/test_module.py:tests:
* pytest (line: 4)
I am relying on the pytest resolve for pytest installation.ripe-gigabyte-88964
03/16/2023, 7:53 PMrequests-toolbelt
, which is a transitive dependency of gql
. I even tried adding it to my requirements/lockfile and in my BUILD file I have python_tests(dependencies=["3rdparty/python:globals#requests-toolbelt"])
but seems like pants still isn't inferring it correctly.witty-crayon-22786
03/16/2023, 8:05 PMgql
you also get requests-toolbelt
): see https://www.pantsbuild.org/docs/python-third-party-dependencies#advanced-usageripe-gigabyte-88964
03/16/2023, 8:27 PMhappy-kitchen-89482
03/16/2023, 8:29 PMpytest
to your "user resolve", because you're importing it. But, the next 2.16.0rc will include the ability to install the pytest tool from your "user resolve" instead of its "tool resolve", so you don't need to specify its version twice.happy-kitchen-89482
03/16/2023, 8:30 PMpytest
serves two roles - a tool, and a runtime library