Testing out 2.19 in our repo, and hitting an edge ...
# general
m
Testing out 2.19 in our repo, and hitting an edge case. In 2.18, we have a working test in a docker environment that invokes a command baked in to the docker container via
subprocess.run
. In 2.19, the
subprocess.run
command has started to fail. I've tracked down the failure to the use of
numpy
that's mounted via the pants cache instead of the use of
numpy
that's installed in the system:
Copy code
.cache/pex_root/venvs/2d3830e298a4dad70f5d35a1119fcc584bf75a48/eb45c7bb2a4eeee4ce103116cf7295fd133dce65/lib/python3.9/site-packages/numpy/__init__.py", line 305, in __getattr__\n    raise AttributeError(__former_attrs__[attr])\nAttributeError: module \'numpy\' has no attribute \'bool\'.\n`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.\nThe aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n    <https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations>\nioutils.c:568:run_command_get_outputs: Command failed: return value 1\naugment-xylist.c:591:backtick: Failed to run command: /usr/local/bin/removelines /tmp/tmp.xyls.yh2hGH /tmp/tmp.removelines.AO7Kbp\n'
I think that this is a bug, likely related to path-munging that enables the new feature "Docker environments ... can now handle docker images without python."
If this sounds like a 🐞 , I can also make a GH issue. 🙂
I've developed a workaround for this (which involved updating the 3rd party code that I was using in my docker container). May or may not be a bug, but I suspect that it has a subtle cause that may be confusing. Thanks for 2.19!
c
If you're able to show how to reproduce this behavior, a GH issue would be great, thanks 🙂