witty-crayon-22786
09/03/2021, 10:57 PM--loop
flag to the docs. if you’re not using it, i’d highly recommend giving it a try!: https://www.pantsbuild.org/docs/goals#running-goalsmodern-wolf-36228
09/05/2021, 8:25 AMpex -c
way.curved-television-6568
09/06/2021, 9:29 AMpex_binary(entry_point="main.py")
but no python_library()
I get this error when running the pex:
ImportError: Error while finding module specification for 'helloworld.main' (ModuleNotFoundError: No module named 'helloworld')
Adding the python_library target solves it, but that may not be the most obvious thing, given the error message..modern-wolf-36228
09/07/2021, 9:41 AMmodern-wolf-36228
09/07/2021, 1:58 PMa.pex
and the other is b.pex
. Those don't have any related project dependency between themselves (to be sure I've extracted and checked the files inside both of them).
The thing is that Pydantic checks if you have the same validation functions being used, to force you to not duplicate code. So I have this error:
pydantic.errors.ConfigError: duplicate validator function "a.config.Settings.mongo_connection"; if this is intended, set `allow_reuse=True`
I have a mongo_connection
validator on both a.pex
and b.pex
. Which I agree is duplicated, and I should add as a dependency for both of them, but I'm migrating from a polyrepo setup, so I'll probably have many of those.
Anyway, my question is: how a.pex
is able to see b
?curved-television-6568
09/07/2021, 2:28 PMinterpreter_constraints = [">=3.8.*"]
in my pants.toml
. [SOLVED]hundreds-father-404
09/07/2021, 3:30 PM./pants tailor
, there's still too much boilerplate and it's particularly hard to change metadata for a couple files because you have add new targets and update the sources
field for old ones. Not intuitive / a common gotcha, and lots of boilerplate
We agree! We've wanted to solve for a year, and I think this proposal would do it without introducing any breaking changes. https://docs.google.com/document/d/1bcQRJazx6ODKc0PZRUgPx_bqHc6XurpBawTMD2zhtAk/edit#
Feedback welcomed!witty-crayon-22786
09/07/2021, 4:40 PMplain-carpet-73994
09/07/2021, 4:43 PMpip install
. Specifically pip install pyrealsense2==2.49.0
works but if I put that in my constraints.txt
Pants can't install it. I re-ran the command pants was running and removed CLI options to get it down to the minimum:
/Users/oliverdain/.cache/pants/named_caches/pex_root/venvs/ed22d73f2adcc11d2242086e3c714a5181886e41/ea52facb9baa3bab8b4e9c79c1aa16d07c3e12e5/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/oliverdain/.cache/pants/named_caches/pex_root --log /private/var/folders/tb/5hcfs_nx5g72yt8wz8c42_4w0000gn/T/process-executionZcFGYp/.tmp/tmpfchex0j2/pip.log download --dest /private/var/folders/tb/5hcfs_nx5g72yt8wz8c42_4w0000gn/T/process-executionZcFGYp/.tmp/tmp9bliehja/Library.Frameworks.Python.framework.Versions.3.7.bin.python3.7 pyrealsense2==2.49.0+companion --index-url <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/simple>
Note that in the above I'm not using my constraints.txt
but instead directly passing the package version I need. I get this error:
2021-09-07T09:38:09,804 <https://us-central1-python.pkg.dev:443> "GET /infrastructure-314723/python-deps/simple/pyrealsense2/ HTTP/1.1" 200 1028
2021-09-07T09:38:09,806 Updating cache with response from "<https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/simple/pyrealsense2/>"
2021-09-07T09:38:09,834 Found link <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/pyrealsense2/pyrealsense2-2.47.0-cp37-cp37m-macosx_10_15_x86_64.whl> (from <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/simple/pyrealsense2/>), version: 2.47.0
2021-09-07T09:38:09,835 Found link <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/pyrealsense2/pyrealsense2-2.47.0.3313-cp37-cp37m-macosx_10_15_x86_64.whl> (from <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/simple/pyrealsense2/>), version: 2.47.0.3313
2021-09-07T09:38:09,835 Skipping link: none of the wheel's tags match: cp37-cp37m-macosx_11_0_x86_64: <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/pyrealsense2/pyrealsense2-2.49.0%2Bcompanion-cp37-cp37m-macosx_11_0_x86_64.whl> (from <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/simple/pyrealsense2/>)
2021-09-07T09:38:09,836 Skipping link: none of the wheel's tags match: cp37-cp37m-macosx_11_0_x86_64: <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/pyrealsense2/pyrealsense2-2.49.0-cp37-cp37m-macosx_11_0_x86_64.whl> (from <https://us-central1-python.pkg.dev/infrastructure-314723/python-deps/simple/pyrealsense2/>)
2021-09-07T09:38:09,836 Given no hashes to check 0 links for project 'pyrealsense2': discarding no candidates
2021-09-07T09:38:09,836 ERROR: Could not find a version that satisfies the requirement pyrealsense2==2.49.0+companion
It sure looks like that package has the right tags so I don't understand the none of the wheel's tags match
errors. Any thoughts?witty-crayon-22786
09/07/2021, 5:12 PM2.6.x
and 2.7.x
are close: if you have time to try out the release candidates and help to validate that they work for you, it would help to make the stable releases even better!: https://pantsbuild.slack.com/archives/C18RRR4JK/p1630862237010700echoing-farmer-15630
09/07/2021, 5:53 PMpip install -r
that requirements.txt, but pants can't find the library that requires the extra url when I try tests. Am I missing something terribly obvious?curved-television-6568
09/07/2021, 6:37 PMREQUESTS_CA_BUNDLE
solves it, but is not a workable approach, since that breaks for pants
)
I see there’s a ton of open issues wrgt certificates in the poetry repo already, so there’s clearly issues in the area..
If not, I’ll keep investigating…. [poetry PRs submitted]happy-kitchen-89482
09/07/2021, 9:42 PMdazzling-diamond-4749
09/07/2021, 11:11 PMsplit -l $block_size
. I suspect that I need to toposort and dedupe test targets?nutritious-hair-72580
09/08/2021, 9:02 AM./pants test
but just the tests in & under the current working directory?modern-wolf-36228
09/08/2021, 1:56 PMuser
09/08/2021, 9:40 PMuser
09/08/2021, 9:56 PMhappy-kitchen-89482
09/09/2021, 12:23 AMuser
09/09/2021, 12:29 AMuser
09/09/2021, 12:53 AMworried-salesclerk-37834
09/09/2021, 4:13 AMdataclasses
. Using 2.8.0.dev0
(trying to use the GCP stuff!) and current python version is 3.6.10.
I have a requirements file with this specified:
dataclasses==0.8; python_version < '3.7'
When I import as import dataclasses
the dependency is not included. But when I import as from dataclasses import asdict
, I'm able to pull in the dependency. Is this a bug, or some quirk that I just missed in the docs?user
09/09/2021, 4:36 PMuser
09/09/2021, 4:51 PMuser
09/09/2021, 8:32 PMpolite-garden-50641
09/09/2021, 11:39 PM./pants help subsystems
this repos in the pants repo (if the TF backend is enabled), any idea what I am missing?dazzling-diamond-4749
09/10/2021, 1:22 AMPopen
and just bash. Popen(shell=True)
has the same output as bash
This is how I set up the command
tag_filters = [f'--filter-tag-regex="{x}"' for x in test_group.filter_expression()]
filter_args = [
"./pants",
"filter",
"--filter-target-type=python_tests",
"--filter-granularity=file"
*tag_filters,
"::"
]
Calling with
filter_process = subprocess.Popen(
filter_args,
stdout=subprocess.PIPE,
)
Pants seems to just ignore the tags that I'm trying to filter
If I do
filter_process = subprocess.Popen(
" ".join(filter_args),
stdout=subprocess.PIPE,
shell=True,
)
the result is as expected
Maybe I'm doing something silly?user
09/10/2021, 1:33 AMambitious-student-81104
09/10/2021, 2:07 PMambitious-student-81104
09/10/2021, 3:05 PM