ripe-beach-27396
09/06/2024, 3:53 PMpants generate-lockfiles
which generates lockfiles using the expected python version
When I try to run pants lint ::
I get the error
11:09:35.84 [ERROR] 1 Exception encountered:
Engine traceback:
in `lint` goal
ValueError: Couldn't determine a compatible Interpreter Constraint from ('3.11', '3.12')
Finally when I try to generate a pex file for one of the targets - the issue seems to be that the packages exist for python 3.11 but not 3.9 ( which I "think" is the version that is being used to build the pex file )
pex: Building pex :: Resolving distributions for requirements: apache-flink<2.0.0,>=1.20.0 setuptools<75.0.0,>=74.1.2 :: Resolving requirements from lock file 3rdparty/python/flink-wordcnt.lock :: Categorizing 84 downloaded artifacts
There were 4 errors downloading required artifacts:
1. apache-flink 1.20 from <https://files.pythonhosted.org/packages/37/85/830c518b8a80095c371d3af5143c90d51a21958f1d0c4095ce799445bcfe/apache-flink-1.20.0.tar.gz>
note: This error originates from a subprocess, and is likely not a problem with pip.
2. numpy 1.24.4 from <https://files.pythonhosted.org/packages/a4/9b/027bec52c633f6556dba6b722d9a0befb40498b9ceddd29cbe67a45a127c/numpy-1.24.4.tar.gz>
note: This error originates from a subprocess, and is likely not a problem with pip.
3. pandas 2.1 from <https://files.pythonhosted.org/packages/6f/31/a4a8e7367856d9584d0332793edfe631182a9cca885f12dbe2dd77c10c4a/pandas-2.1.0.tar.gz>
hint: See above for details.
4. pemja 0.4.1 from <https://files.pythonhosted.org/packages/90/2b/2ca14e70edd1c8bb38fcef6c6902d08702fa9a3a1e60da81b1a9cb22a200/pemja-0.4.1.tar.gz>
note: This error originates from a subprocess, and is likely not a problem with pip.
ripe-beach-27396
09/06/2024, 3:54 PMpants.toml
[GLOBAL]
pants_version = '2.21.0'
level = 'debug'
backend_packages = [
'pants.backend.build_files.fmt.black',
'pants.backend.python',
'pants.backend.python.lint.black',
'pants.backend.python.lint.flake8',
'pants.backend.python.lint.isort',
'pants.backend.python.typecheck.mypy',
'pants.backend.docker',
'pants.backend.shell',
'pants.backend.experimental.javascript',
"pants.backend.project_info",
"pants.backend.awslambda.python",
"pants.backend.python.mixed_interpreter_constraints",
"pants.backend.python.providers.experimental.pyenv",
]
[python-bootstrap]
search_path = [
"<PYENV>",
"/Users/brooks-jolly/.pyenv/versions",
]
[tailor]
ignore_paths = [
"python/src/awslambdas/deploy/**",
]
[python]
interpreter_constraints = ['>=3.11,<3.13']
interpreter_versions_universe = ["3.11", "3.12"]
enable_resolves = true
default_resolve = "python-default"
[generate-lockfiles]
diff = true
[source]
root_patterns = [
"python/src/awslambdas",
"python/src/common",
"python/src/services",
"python/src/common",
"python/src/acloudguru",
]
[test]
output = "all"
[docker]
build_verbose = false
env_vars = ["DOCKER_CONFIG=${HOME}/.docker"]
tools = [
"docker-credential-desktop"
]
[python.resolves]
flink-wordcnt = "3rdparty/python/flink-wordcnt.lock"
flink-movie = "3rdparty/python/flink-movie.lock"
python-default = "3rdparty/python/default.lock"
ripe-beach-27396
09/06/2024, 3:55 PMpex
python_sources(
name="flinkwordcount",
interpreter_constraints=[">=3.11,<3.13"],
resolve="flink-wordcnt",
)
python_tests(
name="tests",
sources=["tests/test_*.py", "tests/*_test.py", "tests/tests.py"],
resolve="flink-wordcnt",
interpreter_constraints=[">=3.11,<3.13"],
)
poetry_requirements(
name="flink-wordcnt",
source="pyproject.toml",
resolve="flink-wordcnt",
)
pex_binary(
name="bin",
entry_point="flow-stream-processing-poc.flink-wordcnt-example.datastream_wordcount",
execution_mode="venv",
dependencies=[":flinkwordcount", ":flink-wordcnt", "//:zscaler"],
interpreter_constraints=[">=3.11,<3.13"],
resolve="flink-wordcnt",
)
wide-midnight-78598
09/06/2024, 4:05 PMripe-beach-27396
09/06/2024, 4:11 PMEngine traceback:
in `lint` goal
ValueError: Couldn't determine a compatible Interpreter Constraint from ('2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12')
ripe-beach-27396
09/06/2024, 4:16 PMpants lint python/src/services/flow-stream-processing-poc/flink-wordcnt-example/:
for example executes successfully.wide-midnight-78598
09/06/2024, 4:17 PMpants peek ::
as sometime that surfaces errorswide-midnight-78598
09/06/2024, 4:18 PMripe-beach-27396
09/06/2024, 4:22 PMripe-beach-27396
09/06/2024, 8:14 PM