high-yak-8589905/19/2022, 4:11 AM
for a pex binary?
rapid-bird-7930005/19/2022, 4:20 AM
rhythmic-morning-8731305/19/2022, 5:03 AM
which depends on a
target in the same file which depends on a
, it says "No python_distribution target found to own stubs/trafaret/__init__.pyi:stubs". Shouldn't it be included in the original
target transitively? I don't want to make a separate package for the type stubs but just embed it inside the
package. How do I avoid the error without changing the directory structure?
eager-dress-6640505/19/2022, 6:45 AM
to enabling resolves/pex lockfiles in 🧵
requirement_constraints = "constraints.lock"
incalculable-yacht-7585105/19/2022, 3:58 PM
goal on a project that has CPython>=3.6.* as an interpreter constraint (pants 2.11). Has anyone else experienced this issue? (Note: [setuptools.lockfile] is set to
File "/Users/KHowa8/.pyenv/versions/3.7.13/lib/python3.7/ctypes/__init__.py", line 7, in <module> from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes'
loud-laptop-1794905/19/2022, 4:24 PM
But when running directly it works:
./pants lint --changed-since=master ... src/util/celery.py:25:0: E0401: Unable to import 'raven.contrib.celery' (import-error)
./pants lint src/util/celery.py ... ✓ black succeeded. ✓ isort succeeded. ✓ pylint succeeded.
rapid-bird-7930005/19/2022, 5:58 PM
? Seeing this error on some go builds:
semi related to this thread: https://pantsbuild.slack.com/archives/C046T6T9U/p1652934048576209
exit status 128:\n\terror: could not expand include path '~/.gitcinclude'\n\tfatal: bad config line 44 in file /usr/local/git/etc/gitconfig
brash-baker-9119005/19/2022, 6:52 PM
to perform a breaking-changes check on our protobufs short of diving into Pants code to implement it, maybe via
loud-laptop-1794905/19/2022, 7:51 PM
high-yak-8589905/19/2022, 8:38 PM
instead of something like
cold-soccer-6322805/19/2022, 9:04 PM
file, we have the following:
However, when he runs Pants commands, he sees the following line:
[python] interpreter_constraints = ["CPython==3.9.*"]
This is problematic because we use Python 3.9 features, which is causing his runtime to fail. What is the reason that Python 3.7 is being used here?
Bootstrapping Pants using /usr/local/bin/python3.7
loud-laptop-1794905/19/2022, 10:24 PM
brash-baker-9119005/19/2022, 10:34 PM
, is there a way to not have it try to build the images?
./pants package ::
high-yak-8589905/19/2022, 10:35 PM
section, is that as simple as subclassing
high-yak-8589905/19/2022, 11:20 PM
and in other places I see them taking in a
. Is there a general consensus on which is preferred? Seems like those who pass in `FieldSet`s typically specify the
attribute while the other way around is to specify the
. Are they equivalent ways of doing things?
high-yak-8589905/19/2022, 11:47 PM
(or a subclass of it). What could I reference for when I don't need this functionality (e.g. the library doing the work is a python library in the plugin environment and not a call out to the system)?
cold-soccer-6322805/20/2022, 3:21 AM
libraries. In Python code, they're both referred to as
, for example:
I noticed that I can't specify two separate
from google import auth from google import api_core
where the values are the same, otherwise the build system gets confused...
high-yak-8589905/20/2022, 5:23 AM
green-match-6633705/20/2022, 5:43 AM
green-match-6633705/20/2022, 5:43 AM
bulky-alarm-9402705/20/2022, 2:00 PM
targets? This is kindof related to my previous question about getting the output of git describe
agreeable-oyster-2898105/20/2022, 7:46 PM
, having tried with
works perfectly fine Once I try to have it running with
./pants run xxx
(from local or from a docker image, which is the ultimate goal), I can’t seem to find the right syntax for the module/app
Will give me the following error:
COPY packages.hello_world/main.pex packages/hello_world/main.pex CMD ./packages/hello_world/main.pex packages.hello_world.main:app
I’ve been trying multiple syntax, and I either get:
/pants run packages/hello_world /Users/quentin/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/bin/pants 15:34:54.78 [INFO] Canceled: Building docker image hello_world:latest 15:34:56.01 [INFO] Completed: Building docker image hello_world:latest [2022-05-20 19:34:57 +0000]  [INFO] Starting gunicorn 20.1.0 [2022-05-20 19:34:57 +0000]  [INFO] Listening at: <http://127.0.0.1:8000> (8) [2022-05-20 19:34:57 +0000]  [INFO] Using worker: sync [2022-05-20 19:34:57 +0000]  [INFO] Booting worker with pid: 11 [2022-05-20 19:34:57 +0000]  [ERROR] Exception in worker process Traceback (most recent call last): File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/root/.pex/venvs/s/4323ba33/venv/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app mod = importlib.import_module(module) File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked ModuleNotFoundError: No module named 'packages.hello_world.main' [2022-05-20 19:34:57 +0000]  [INFO] Worker exiting (pid: 11) [2022-05-20 19:34:57 +0000]  [INFO] Shutting down: Master [2022-05-20 19:34:57 +0000]  [INFO] Reason: Worker failed to boot.
Failed to find attribute 'app' in 'packages.hello_world'.
which tells me that • the package
ModuleNotFoundError: No module named 'packages.hello_world.main'
exists • the package `packages.hellow_world.main`doesn’t exist • there is no
attribute in the package • there is no
attribute in the package folder structure is:
You can find a repo to reproduce the issue here: https://github.com/qventura/pants-flask/tree/main/packages/hello_world Thanks in advance, if anyone can help me finding the right way to start my app, I’ll be grateful!
/packages/hello_word |- Build |- Dockerfile |- main.py
mysterious-motherboard-9736605/21/2022, 12:03 AM
always regenerate from scratch? If so, is there an equivalent of
(see here) so that transitive dependencies stay on the same versions as before, if they have no need to change?
poetry lock --no-update
eager-dress-6640505/22/2022, 1:01 PM
package. Details in 🧵
happy-kitchen-8948205/23/2022, 2:22 AM
to tell me why.
cold-soccer-6322805/23/2022, 4:38 PM
exist, and also saw that in the Python backend, there was
. Was wondering if there was a way to make a request to get all Python targets with some suffix
hundreds-father-40405/23/2022, 5:43 PM
now behave the same as "target-aware" goals like
runs on all files, and
./pants count-loc ::
only will run on changed BUILD files 2.
./pants --changed-since=HEAD update-build-files
now does what you'd intuitively expect. Before, it would run on the target that left off the
./pants test dir
field 🤦 now, you can set an option so that directories == all targets & files in the directory 3.
options work from anywhere. Before:
./pants filter --target-type=python_test :: | xargs ./pants test
./pants --filter-target-type=python_test test ::
brainy-solstice-2704205/23/2022, 7:01 PM
(which is deprecated) and
to co-exist? I currently have a setup that would allow me to use different version of pants in parallel while I upgrade small pieces at at time (rather than have 200+ BUILD files changed at one time and risk breaking everything in the process). Even if I told pants to ignore unknown types, that would be OK
high-yak-8589905/23/2022, 7:23 PM
get translated into its
pair for docker image tagging?
best-fall-6142805/23/2022, 8:02 PM
is taking significantly longer. From 20 sec to 150 sec. Is that expected?
pants export ::