Skip to content

Consider setting a fixed minimum Rust version  #1176

Closed
@arnaudsjs

Description

@arnaudsjs

When I use the procedure in the README to build pydantic-core, the build fails. The issue can be reproduced in the following way:

git clone -b v2.16.1 https://github.com/pydantic/pydantic-core.git
cd pydantic-core
python3.11 -m venv env
source env/bin/activate
make install
It results in this output
+ git clone -b v2.16.1 https://github.com/pydantic/pydantic-core.git
Cloning into 'pydantic-core'...
Note: switching to '4538190f0e7a47a99ca44351f744007b016511d4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

+ cd pydantic-core
+ python3.11 -m venv env
+ source env/bin/activate
++ deactivate nondestructive
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /usr/bin/bash -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ unset VIRTUAL_ENV_PROMPT
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/tmp/pydantic-core/env
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
++ PATH=/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ PS1='(env) '
++ export PS1
++ VIRTUAL_ENV_PROMPT='(env) '
++ export VIRTUAL_ENV_PROMPT
++ '[' -n /usr/bin/bash -o -n '' ']'
++ hash -r
+ make install
/usr/bin/which: no maturin in (/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no maturin in (/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no maturin in (/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no maturin in (/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no maturin in (/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
/usr/bin/which: no maturin in (/tmp/pydantic-core/env/bin:/home/arnaud/.local/bin:/home/arnaud/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
pip install -U pip wheel pre-commit
Looking in indexes: https://artifacts.internal.inmanta.com/inmanta/dev
Requirement already satisfied: pip in ./env/lib64/python3.11/site-packages (22.3.1)
Collecting pip
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/505/2d7889c1f9d05/pip-23.3.2-py3-none-any.whl (2.1 MB)
Collecting wheel
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/177/f9c9b0d45c478/wheel-0.42.0-py3-none-any.whl (65 kB)
Collecting pre-commit
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/c25/5039ef399049a/pre_commit-3.6.0-py2.py3-none-any.whl (204 kB)
Collecting cfgv>=2.0.0
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/b72/65b1f29fd3316/cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)
Collecting identify>=1.0.0
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/d40/ce5fcd7628176/identify-2.5.33-py2.py3-none-any.whl (98 kB)
Collecting nodeenv>=0.11.1
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/df8/65724bb3c3adc/nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Collecting pyyaml>=5.1
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/d2b/04aac4d386b17/PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
Collecting virtualenv>=20.10.0
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/423/8949c5ffe6876/virtualenv-20.25.0-py3-none-any.whl (3.8 MB)
Requirement already satisfied: setuptools in ./env/lib64/python3.11/site-packages (from nodeenv>=0.11.1->pre-commit) (65.5.1)
Collecting distlib<1,>=0.3.7
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/034/db59a0b96f8ca/distlib-0.3.8-py2.py3-none-any.whl (468 kB)
Collecting filelock<4,>=3.12.2
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/57d/bda9b35157b05/filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting platformdirs<5,>=3.9.1
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/061/4df2a2f37e1a6/platformdirs-4.2.0-py3-none-any.whl (17 kB)
Installing collected packages: distlib, wheel, pyyaml, platformdirs, pip, nodeenv, identify, filelock, cfgv, virtualenv, pre-commit
Attempting uninstall: pip
Found existing installation: pip 22.3.1
Uninstalling pip-22.3.1:
Successfully uninstalled pip-22.3.1
Successfully installed cfgv-3.4.0 distlib-0.3.8 filelock-3.13.1 identify-2.5.33 nodeenv-1.8.0 pip-23.3.2 platformdirs-4.2.0 pre-commit-3.6.0 pyyaml-6.0.1 virtualenv-20.25.0 wheel-0.42.0
pip install -r tests/requirements.txt
Looking in indexes: https://artifacts.internal.inmanta.com/inmanta/dev
Collecting git+https://github.com/dateutil/dateutil.git@f2293200747fb03d56c6c5997bfebeabe703576f (from -r tests/requirements.txt (line 6))
Cloning https://github.com/dateutil/dateutil.git (to revision f2293200747fb03d56c6c5997bfebeabe703576f) to /tmp/pip-req-build-q77eh6k6
Running command git clone --filter=blob:none --quiet https://github.com/dateutil/dateutil.git /tmp/pip-req-build-q77eh6k6
Running command git rev-parse -q --verify 'sha^f2293200747fb03d56c6c5997bfebeabe703576f'
Running command git fetch -q https://github.com/dateutil/dateutil.git f2293200747fb03d56c6c5997bfebeabe703576f
Running command git checkout -q f2293200747fb03d56c6c5997bfebeabe703576f
Resolved https://github.com/dateutil/dateutil.git to commit f2293200747fb03d56c6c5997bfebeabe703576f
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Ignoring exceptiongroup: markers 'python_version < "3.11"' don't match your environment
Collecting coverage==7.4.0 (from -r tests/requirements.txt (line 1))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/485/e9f897cf4856a/coverage-7.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (237 kB)
Collecting dirty-equals==0.7.1.post0 (from -r tests/requirements.txt (line 2))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/7fb/9217ea7cd04c0/dirty_equals-0.7.1.post0-py3-none-any.whl (27 kB)
Collecting hypothesis==6.92.9 (from -r tests/requirements.txt (line 3))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/8c1/ab9f3c883fe63/hypothesis-6.92.9-py3-none-any.whl (431 kB)
Collecting pandas==2.1.3 (from -r tests/requirements.txt (line 8))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/d5d/ed6ff28abbf0e/pandas-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting pytest==7.4.4 (from -r tests/requirements.txt (line 9))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/b09/0cdf5ed60bf4c/pytest-7.4.4-py3-none-any.whl (325 kB)
Collecting pytest-codspeed~=2.2.0 (from -r tests/requirements.txt (line 11))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/5da/48b842fc46592/pytest_codspeed-2.2.0-py3-none-any.whl (10 kB)
Collecting pytest-examples==0.0.10 (from -r tests/requirements.txt (line 14))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/3d0/b52424e454846/pytest_examples-0.0.10-py3-none-any.whl (17 kB)
Collecting pytest-speed==0.3.5 (from -r tests/requirements.txt (line 15))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/ef9/f17d6800b158e/pytest_speed-0.3.5-py3-none-any.whl (9.7 kB)
Collecting pytest-mock==3.11.1 (from -r tests/requirements.txt (line 16))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/21c/279fff83d7076/pytest_mock-3.11.1-py3-none-any.whl (9.6 kB)
Collecting pytest-pretty==1.2.0 (from -r tests/requirements.txt (line 17))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/6f7/9122bf53864ae/pytest_pretty-1.2.0-py3-none-any.whl (6.2 kB)
Collecting pytest-timeout==2.2.0 (from -r tests/requirements.txt (line 18))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/bde/531e096466f49/pytest_timeout-2.2.0-py3-none-any.whl (13 kB)
Collecting pytz==2023.3.post1 (from -r tests/requirements.txt (line 19))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/ce4/2d816b81b6850/pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
Collecting numpy==1.26.2 (from -r tests/requirements.txt (line 21))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/96c/a5482c3dbdd05/numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting attrs>=22.2.0 (from hypothesis==6.92.9->-r tests/requirements.txt (line 3))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/99b/87a485a5820b2/attrs-23.2.0-py3-none-any.whl (60 kB)
Collecting sortedcontainers<3.0.0,>=2.1.0 (from hypothesis==6.92.9->-r tests/requirements.txt (line 3))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/a16/3dcaede0f1c02/sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting tzdata>=2022.1 (from pandas==2.1.3->-r tests/requirements.txt (line 8))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/aa3/ace4329eeacda/tzdata-2023.4-py2.py3-none-any.whl (346 kB)
Collecting iniconfig (from pytest==7.4.4->-r tests/requirements.txt (line 9))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/b6a/85871a79d2e3b/iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting packaging (from pytest==7.4.4->-r tests/requirements.txt (line 9))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/8c4/91190033a9af7/packaging-23.2-py3-none-any.whl (53 kB)
Collecting pluggy<2.0,>=0.12 (from pytest==7.4.4->-r tests/requirements.txt (line 9))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/7db/9f7b503d67d1c/pluggy-1.4.0-py3-none-any.whl (20 kB)
Collecting black>=23 (from pytest-examples==0.0.10->-r tests/requirements.txt (line 14))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/b3d/64db762eae4a5/black-24.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
Collecting ruff>=0.0.258 (from pytest-examples==0.0.10->-r tests/requirements.txt (line 14))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/b17/b93c02cdb6aeb/ruff-0.1.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB)
Collecting click>=7 (from pytest-speed==0.3.5->-r tests/requirements.txt (line 15))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/ae7/4fb96c20a0277/click-8.1.7-py3-none-any.whl (97 kB)
Collecting rich>=12 (from pytest-speed==0.3.5->-r tests/requirements.txt (line 15))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/6da/14c108c4866ee/rich-13.7.0-py3-none-any.whl (240 kB)
Collecting six>=1.5 (from python-dateutil==2.8.3.dev33+gf229320->-r tests/requirements.txt (line 6))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/8ab/b2f1d86890a2d/six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting cffi~=1.15.1 (from pytest-codspeed~=2.2.0->-r tests/requirements.txt (line 11))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/944/11f22c3985aca/cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
Collecting filelock~=3.12.2 (from pytest-codspeed~=2.2.0->-r tests/requirements.txt (line 11))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/08c/21d87ded6e2b9/filelock-3.12.4-py3-none-any.whl (11 kB)
Collecting mypy-extensions>=0.4.3 (from black>=23->pytest-examples==0.0.10->-r tests/requirements.txt (line 14))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/439/2f6c0eb8a5668/mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting pathspec>=0.9.0 (from black>=23->pytest-examples==0.0.10->-r tests/requirements.txt (line 14))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/a0d/503e138a4c123/pathspec-0.12.1-py3-none-any.whl (31 kB)
Requirement already satisfied: platformdirs>=2 in ./env/lib64/python3.11/site-packages (from black>=23->pytest-examples==0.0.10->-r tests/requirements.txt (line 14)) (4.2.0)
Collecting pycparser (from cffi~=1.15.1->pytest-codspeed~=2.2.0->-r tests/requirements.txt (line 11))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/8ee/45429555515e1/pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting markdown-it-py>=2.2.0 (from rich>=12->pytest-speed==0.3.5->-r tests/requirements.txt (line 15))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/355/216845c60bd96/markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich>=12->pytest-speed==0.3.5->-r tests/requirements.txt (line 15))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/b27/c2826c47d0f32/pygments-2.17.2-py3-none-any.whl (1.2 MB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=12->pytest-speed==0.3.5->-r tests/requirements.txt (line 15))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/840/08a41e51615a4/mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Building wheels for collected packages: python-dateutil
Building wheel for python-dateutil (pyproject.toml): started
Building wheel for python-dateutil (pyproject.toml): finished with status 'done'
Created wheel for python-dateutil: filename=python_dateutil-2.8.3.dev33+gf229320-py2.py3-none-any.whl size=78541 sha256=d7e0b776f15454f56276ca921cc5d8d5e1fb95456eaf891b59906d007a55b118
Stored in directory: /home/arnaud/.cache/pip/wheels/c8/bf/d9/05659cade1e93b6b2474d6824f963c0dfd9a402e3561b5686d
Successfully built python-dateutil
Installing collected packages: sortedcontainers, pytz, tzdata, six, ruff, pygments, pycparser, pluggy, pathspec, packaging, numpy, mypy-extensions, mdurl, iniconfig, filelock, dirty-equals, coverage, click, attrs, python-dateutil, pytest, markdown-it-py, hypothesis, cffi, black, rich, pytest-timeout, pytest-mock, pytest-examples, pytest-codspeed, pandas, pytest-speed, pytest-pretty
Attempting uninstall: filelock
Found existing installation: filelock 3.13.1
Uninstalling filelock-3.13.1:
Successfully uninstalled filelock-3.13.1
Successfully installed attrs-23.2.0 black-24.1.1 cffi-1.15.1 click-8.1.7 coverage-7.4.0 dirty-equals-0.7.1.post0 filelock-3.12.4 hypothesis-6.92.9 iniconfig-2.0.0 markdown-it-py-3.0.0 mdurl-0.1.2 mypy-extensions-1.0.0 numpy-1.26.2 packaging-23.2 pandas-2.1.3 pathspec-0.12.1 pluggy-1.4.0 pycparser-2.21 pygments-2.17.2 pytest-7.4.4 pytest-codspeed-2.2.0 pytest-examples-0.0.10 pytest-mock-3.11.1 pytest-pretty-1.2.0 pytest-speed-0.3.5 pytest-timeout-2.2.0 python-dateutil-2.8.3.dev33+gf229320 pytz-2023.3.post1 rich-13.7.0 ruff-0.1.15 six-1.16.0 sortedcontainers-2.4.0 tzdata-2023.4
pip install -r tests/requirements-linting.txt
Looking in indexes: https://artifacts.internal.inmanta.com/inmanta/dev
Collecting griffe==0.38.1 (from -r tests/requirements-linting.txt (line 1))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/334/c79d3b5964ade/griffe-0.38.1-py3-none-any.whl (1.0 MB)
Collecting pyright==1.1.345 (from -r tests/requirements-linting.txt (line 2))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/008/91361baf58698/pyright-1.1.345-py3-none-any.whl (18 kB)
Collecting ruff==0.1.13 (from -r tests/requirements-linting.txt (line 3))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/9a1/600942485c6e6/ruff-0.1.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.5 MB)
Collecting mypy==1.8.0 (from -r tests/requirements-linting.txt (line 4))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/d19/c413b3c07cbec/mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB)
Collecting colorama>=0.4 (from griffe==0.38.1->-r tests/requirements-linting.txt (line 1))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/4f1/d9991f5acc0ca/colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: nodeenv>=1.6.0 in ./env/lib64/python3.11/site-packages (from pyright==1.1.345->-r tests/requirements-linting.txt (line 2)) (1.8.0)
Collecting typing-extensions>=4.1.0 (from mypy==1.8.0->-r tests/requirements-linting.txt (line 4))
Using cached https://artifacts.internal.inmanta.com/root/pypi/%2Bf/af7/2aea155e91adf/typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Requirement already satisfied: mypy-extensions>=1.0.0 in ./env/lib64/python3.11/site-packages (from mypy==1.8.0->-r tests/requirements-linting.txt (line 4)) (1.0.0)
Requirement already satisfied: setuptools in ./env/lib64/python3.11/site-packages (from nodeenv>=1.6.0->pyright==1.1.345->-r tests/requirements-linting.txt (line 2)) (65.5.1)
Installing collected packages: typing-extensions, ruff, colorama, pyright, mypy, griffe
Attempting uninstall: ruff
Found existing installation: ruff 0.1.15
Uninstalling ruff-0.1.15:
Successfully uninstalled ruff-0.1.15
Successfully installed colorama-0.4.6 griffe-0.38.1 mypy-1.8.0 pyright-1.1.345 ruff-0.1.13 typing-extensions-4.9.0
pip install -e .
Looking in indexes: https://artifacts.internal.inmanta.com/inmanta/dev
Obtaining file:///tmp/pydantic-core
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: typing-extensions!=4.7.0,>=4.6.0 in ./env/lib64/python3.11/site-packages (from pydantic_core==2.16.1) (4.9.0)
Building wheels for collected packages: pydantic_core
Building editable for pydantic_core (pyproject.toml): started
Building editable for pydantic_core (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

× Building editable for pydantic_core (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [154 lines of output]
Running maturin pep517 build-wheel -i /tmp/pydantic-core/env/bin/python3.11 --compatibility off --editable
📦 Including license file "/tmp/pydantic-core/LICENSE"
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.11 at /tmp/pydantic-core/env/bin/python3.11
📡 Using build options features, bindings from pyproject.toml
warning: unused manifest key lints (may be supported in a future version)

  this Cargo does not support nightly features, but if you
  switch to nightly channel you can pass
  `-Zlints` to enable this feature.
     Compiling autocfg v1.1.0
     Compiling proc-macro2 v1.0.76
     Compiling target-lexicon v0.12.9
     Compiling unicode-ident v1.0.10
     Compiling python3-dll-a v0.2.9
     Compiling libc v0.2.147
     Compiling once_cell v1.18.0
     Compiling version_check v0.9.4
     Compiling cfg-if v1.0.0
     Compiling heck v0.4.1
     Compiling static_assertions v1.1.0
     Compiling lexical-util v0.8.5
     Compiling num-traits v0.2.16
     Compiling ahash v0.8.7
     Compiling quote v1.0.35
     Compiling pyo3-build-config v0.20.2
     Compiling syn v2.0.48
     Compiling getrandom v0.2.10
     Compiling lock_api v0.4.10
     Compiling num-integer v0.1.45
     Compiling parking_lot_core v0.9.8
     Compiling zerocopy v0.7.32
     Compiling rustversion v1.0.13
     Compiling memoffset v0.9.0
     Compiling num-bigint v0.4.4
     Compiling scopeguard v1.1.0
     Compiling smallvec v1.11.2
     Compiling allocator-api2 v0.2.16
     Compiling tinyvec_macros v0.1.1
     Compiling tinyvec v1.6.0
     Compiling hashbrown v0.14.3
     Compiling pyo3-ffi v0.20.2
     Compiling pyo3 v0.20.2
     Compiling lexical-write-integer v0.8.5
     Compiling lexical-parse-integer v0.8.6
     Compiling serde v1.0.195
     Compiling memchr v2.6.3
     Compiling lexical-parse-float v0.8.5
     Compiling lexical-write-float v0.8.5
     Compiling unicode-normalization v0.1.22
     Compiling aho-corasick v1.0.2
     Compiling parking_lot v0.12.1
     Compiling pyo3-macros-backend v0.20.2
     Compiling unicode-bidi v0.3.13
     Compiling indoc v2.0.4
     Compiling equivalent v1.0.1
     Compiling serde_json v1.0.109
     Compiling percent-encoding v2.3.1
     Compiling regex-syntax v0.8.2
     Compiling unindent v0.2.3
     Compiling form_urlencoded v1.2.1
     Compiling indexmap v2.0.0
     Compiling idna v0.5.0
     Compiling lexical-core v0.8.5
     Compiling pydantic-core v2.16.1 (/tmp/pydantic-core)
     Compiling ryu v1.0.14
     Compiling serde_derive v1.0.195
     Compiling strum_macros v0.25.3
     Compiling regex-automata v0.4.3
     Compiling pyo3-macros v0.20.2
     Compiling itoa v1.0.8
     Compiling enum_dispatch v0.3.12
     Compiling url v2.5.0
     Compiling strum v0.25.0
     Compiling speedate v0.13.0
     Compiling regex v1.10.2
     Compiling uuid v1.6.1
     Compiling base64 v0.21.7
     Compiling jiter v0.0.6
  error[E0446]: crate-private type `extra::Extra<'_>` in public interface
     --> src/serializers/fields.rs:149:5
      |
  149 | /     pub fn main_to_python<'py>(
  150 | |         &self,
  151 | |         py: Python<'py>,
  152 | |         main_iter: impl Iterator<Item = PyResult<(&'py PyAny, &'py PyAny)>>,
  ...   |
  155 | |         extra: Extra,
  156 | |     ) -> PyResult<&'py PyDict> {
      | |______________________________^ can't leak crate-private type
      |
     ::: src/serializers/extra.rs:73:1
      |
  73  |   pub(crate) struct Extra<'a> {
      |   --------------------------- `extra::Extra<'_>` declared as crate-private
  
  error[E0446]: crate-private type `extra::Extra<'_>` in public interface
     --> src/serializers/fields.rs:214:5
      |
  214 | /     pub fn main_serde_serialize<'py, S: serde::ser::Serializer>(
  215 | |         &self,
  216 | |         main_iter: impl Iterator<Item = PyResult<(&'py PyAny, &'py PyAny)>>,
  217 | |         expected_len: usize,
  ...   |
  221 | |         extra: Extra,
  222 | |     ) -> Result<S::SerializeMap, S::Error> {
      | |__________________________________________^ can't leak crate-private type
      |
     ::: src/serializers/extra.rs:73:1
      |
  73  |   pub(crate) struct Extra<'a> {
      |   --------------------------- `extra::Extra<'_>` declared as crate-private
  
  error[E0446]: crate-private type `extra::Extra<'_>` in public interface
     --> src/serializers/fields.rs:260:5
      |
  260 | /     pub fn add_computed_fields_python(
  261 | |         &self,
  262 | |         model: Option<&PyAny>,
  263 | |         output_dict: &PyDict,
  ...   |
  266 | |         extra: &Extra,
  267 | |     ) -> PyResult<()> {
      | |_____________________^ can't leak crate-private type
      |
     ::: src/serializers/extra.rs:73:1
      |
  73  |   pub(crate) struct Extra<'a> {
      |   --------------------------- `extra::Extra<'_>` declared as crate-private
  
  error[E0446]: crate-private type `extra::Extra<'_>` in public interface
     --> src/serializers/fields.rs:277:5
      |
  277 | /     pub fn add_computed_fields_json<S: serde::ser::Serializer>(
  278 | |         &self,
  279 | |         model: Option<&PyAny>,
  280 | |         map: &mut S::SerializeMap,
  ...   |
  283 | |         extra: &Extra,
  284 | |     ) -> Result<(), S::Error> {
      | |_____________________________^ can't leak crate-private type
      |
     ::: src/serializers/extra.rs:73:1
      |
  73  |   pub(crate) struct Extra<'a> {
      |   --------------------------- `extra::Extra<'_>` declared as crate-private
  
  For more information about this error, try `rustc --explain E0446`.
  error: could not compile `pydantic-core` (lib) due to 4 previous errors
  💥 maturin failed
    Caused by: Failed to build a native library through cargo
    Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.11-64bit" PYO3_PYTHON="/tmp/pydantic-core/env/bin/python3.11" PYTHON_SYS_EXECUTABLE="/tmp/pydantic-core/env/bin/python3.11" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pydantic-core/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/pydantic-core/env/bin/python3.11', '--compatibility', 'off', '--editable'] returned non-zero exit status 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building editable for pydantic_core
Failed to build pydantic_core
ERROR: Could not build wheels for pydantic_core, which is required to install pyproject.toml-based projects
make: *** [Makefile:18: install] Error 1

Could someone provide me more insight into what is going wrong here?

System details:

  • Python version: 3.11.5
  • Rust version: 1.71.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions