pydantic-core icon indicating copy to clipboard operation
pydantic-core copied to clipboard

2.18.0: pep517 based build fails

Open kloczek opened this issue 1 year ago β€’ 10 comments

Looks like something is wrong and I'm not sure what I can do more to diagnose this issue πŸ€”

+ cd pydantic-core-2.18.0
+ export RUST_BACKTRACE=full
+ RUST_BACKTRACE=full
+ ASMFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ CFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ CXXFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ FFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules'
+ FCFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules'
+ LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin'
+ RUSTFLAGS='-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C link-arg=-Wl,--as-needed -C link-arg=-Wl,--build-id=sha1 -C link-arg=-Wl,-z,now -C link-arg=-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -C link-arg=-Wl,-z,pack-relative-relocs -C link-arg=-Wl,-z,relro -C link-arg=-flto=auto --cap-lints=warn'
+ VALAFLAGS=-g
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR NM RANLIB RUSTFLAGS VALAFLAGS
+ PBR_VERSION=2.18.0
+ PDM_BUILD_SCM_VERSION=2.18.0
+ SETUPTOOLS_SCM_PRETEND_VERSION=2.18.0
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Running `maturin pep517 build-wheel -i /usr/bin/python3 --compatibility off`
πŸ“¦ Including license file "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/LICENSE"
🍹 Building a mixed python/rust project
πŸ”— Found pyo3 bindings
🐍 Found CPython 3.10 at /usr/bin/python3
πŸ“‘ Using build options features, bindings from pyproject.toml
   Compiling autocfg v1.1.0
   Compiling target-lexicon v0.12.9
   Compiling proc-macro2 v1.0.76
   Compiling python3-dll-a v0.2.9
   Compiling unicode-ident v1.0.10
   Compiling once_cell v1.18.0
   Compiling libc v0.2.147
   Compiling heck v0.4.1
   Compiling cfg-if v1.0.0
   Compiling rustversion v1.0.13
   Compiling version_check v0.9.4
   Compiling parking_lot_core v0.9.8
   Compiling static_assertions v1.1.0
   Compiling tinyvec_macros v0.1.1
   Compiling scopeguard v1.1.0
   Compiling portable-atomic v1.6.0
   Compiling smallvec v1.13.2
   Compiling serde v1.0.197
   Compiling memchr v2.6.3
   Compiling unicode-bidi v0.3.13
   Compiling zerocopy v0.7.32
   Compiling unindent v0.2.3
   Compiling indoc v2.0.4
   Compiling percent-encoding v2.3.1
   Compiling regex-syntax v0.8.2
   Compiling serde_json v1.0.114
   Compiling hashbrown v0.14.3
   Compiling equivalent v1.0.1
   Compiling ryu v1.0.14
   Compiling itoa v1.0.8
   Compiling uuid v1.7.0
   Compiling base64 v0.21.7
   Compiling lexical-util v0.8.5
   Compiling tinyvec v1.6.0
   Compiling form_urlencoded v1.2.1
   Compiling aho-corasick v1.0.2
   Compiling indexmap v2.2.2
   Compiling lexical-parse-integer v0.8.6
   Compiling quote v1.0.35
   Compiling unicode-normalization v0.1.22
   Compiling lexical-parse-float v0.8.5
   Compiling syn v2.0.48
   Compiling getrandom v0.2.10
   Compiling ahash v0.8.10
   Compiling idna v0.5.0
   Compiling num-traits v0.2.16
   Compiling num-integer v0.1.45
   Compiling lock_api v0.4.10
   Compiling memoffset v0.9.0
   Compiling num-bigint v0.4.4
   Compiling url v2.5.0
   Compiling regex-automata v0.4.5
   Compiling parking_lot v0.12.1
   Compiling pyo3-build-config v0.21.1
   Compiling regex v1.10.3
   Compiling pyo3-macros-backend v0.21.1
   Compiling pyo3-ffi v0.21.1
   Compiling pyo3 v0.21.1
   Compiling jiter v0.2.1
   Compiling pydantic-core v2.18.0 (/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0)
error: failed to run custom build command for `pydantic-core v2.18.0 (/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/target/release/build/pydantic-core-4c590a799fb93a67/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=Py_3_6
  cargo:rustc-cfg=Py_3_7
  cargo:rustc-cfg=Py_3_8
  cargo:rustc-cfg=Py_3_9
  cargo:rustc-cfg=Py_3_10
  cargo:rerun-if-changed=python/pydantic_core/core_schema.py
  cargo:rerun-if-changed=generate_self_schema.py

  --- stderr
  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 241, in <module>
      main()
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 211, in main
      value = get_schema(s, definitions)
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 55, in get_schema
      return type_dict_schema(obj, definitions)
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 151, in type_dict_schema
      raise ValueError(f'Unknown Schema forward ref: {fr_arg}')
  ValueError: Unknown Schema forward ref: list[CoreSchema]
  thread 'main' panicked at build.rs:29:9:
  generate_self_schema.py failed with exit status: 1
  stack backtrace:
     0:     0x55e1a60bfaa6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h69c73a6e4efece9e
     1:     0x55e1a60e191c - core::fmt::write::h5a3206cd19e1398e
     2:     0x55e1a60bd7cd - std::io::Write::write_fmt::hddabb9f61b3df43c
     3:     0x55e1a60bf854 - std::sys_common::backtrace::print::h8725e25cffe00661
     4:     0x55e1a60c0d7b - std::panicking::default_hook::{{closure}}::hb0f936e8957a615f
     5:     0x55e1a60c0ac9 - std::panicking::default_hook::h421e1acaa06b0239
     6:     0x55e1a60c121d - std::panicking::rust_panic_with_hook::hacb2a41eb325ef57
     7:     0x55e1a60c10f2 - std::panicking::begin_panic_handler::{{closure}}::hc4b1d9fd2e2dee4f
     8:     0x55e1a60bff86 - std::sys_common::backtrace::__rust_end_short_backtrace::h6330eede8720241c
     9:     0x55e1a60c0e24 - rust_begin_unwind
    10:     0x55e1a608d735 - core::panicking::panic_fmt::h77d9143ff35fccd0
    11:     0x55e1a608ef8c - build_script_build::generate_self_schema::h7ffd1f75bddb3fff
                                 at /home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/build.rs:29:9
    12:     0x55e1a608ef8c - build_script_build::main::h34cc45bbd9c223f2
                                 at /home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/build.rs:38:5
    13:     0x55e1a608df33 - core::ops::function::FnOnce::call_once::h19a588fac4206bb8
                                 at /builddir/build/BUILD/rustc-1.77.0-src/library/core/src/ops/function.rs:250:5
    14:     0x55e1a608df33 - std::sys_common::backtrace::__rust_begin_short_backtrace::h871115d0c341a49e
                                 at /builddir/build/BUILD/rustc-1.77.0-src/library/std/src/sys_common/backtrace.rs:155:18
    15:     0x55e1a608df49 - std::rt::lang_start::{{closure}}::h1c150d1ec0997b7b
                                 at /builddir/build/BUILD/rustc-1.77.0-src/library/std/src/rt.rs:166:18
    16:     0x55e1a60b9e83 - std::rt::lang_start_internal::h36bdc61521625955
    17:     0x55e1a608f0df - main
    18:     0x7fca0d96b1c8 - __libc_start_call_main
    19:     0x7fca0d96b28b - __libc_start_main_impl
    20:     0x55e1a608de65 - _start
    21:                0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
πŸ’₯ 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.10-64bit" PYO3_PYTHON="/usr/bin/python3" PYTHON_SYS_EXECUTABLE="/usr/bin/python3" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1

ERROR Backend subprocess exited when trying to invoke build_wheel

kloczek avatar Apr 05 '24 20:04 kloczek

List of installed modules in build env

Package            Version
------------------ -----------
attrs              23.2.0
build              1.2.1
dirty-equals       0.7.1
exceptiongroup     1.1.3
hypothesis         6.100.0
importlib_metadata 7.1.0
iniconfig          2.0.0
installer          0.7.0
maturin            1.5.1
packaging          24.0
pluggy             1.4.0
py-cpuinfo         9.0.0
pyproject_hooks    1.0.0
pytest             8.1.1
pytest-benchmark   4.0.0
pytest-mock        3.14.0
pytest-timeout     2.3.1
python-dateutil    2.9.0.post0
pytz               2024.1
ruff               0.3.5
sortedcontainers   2.4.0
tokenize_rt        5.2.0
tomli              2.0.1
typing_extensions  4.10.0
wheel              0.43.0
zipp               3.18.1

kloczek avatar Apr 05 '24 20:04 kloczek

Please can you give some details on the environment, os, how, and why your building pydantic-core from source.

samuelcolvin avatar Apr 05 '24 20:04 samuelcolvin

I'm building your module because I'm working on Linux/Solaris distribution. Currently in that distro is used python 3.10.x.

kloczek avatar Apr 05 '24 23:04 kloczek

No idea why it's failing for you and not others (e.g. our CI) and only now, maybe a subtle change in a patch release.

But I should be about to fix it.

samuelcolvin avatar Apr 06 '24 07:04 samuelcolvin

Is it anything else what I can try to do to provide more diagnostics? πŸ€”

kloczek avatar Apr 06 '24 10:04 kloczek

The reason is that you have the wrong version of typing extensions installed:

https://github.com/pydantic/pydantic-core/blob/f636403c2e8169bcbb94aa71a0727d76076f7e6e/pyproject.toml#L4

samuelcolvin avatar Apr 06 '24 12:04 samuelcolvin

oh, I've just re-read the version constraint, maybe that's not it.

samuelcolvin avatar Apr 06 '24 12:04 samuelcolvin

Which patch version of 3.10 are you using?

samuelcolvin avatar Apr 06 '24 13:04 samuelcolvin

Which patch version of 3.10 are you using?

Latest one 3.10.14.

kloczek avatar Apr 06 '24 15:04 kloczek

Similar issue, which is very peculiar considering the version check should work?:

  • https://github.com/pydantic/pydantic-core/blob/a7620419383a69bd2b28ab953c9a17f6ed35bb9a/generate_self_schema.py#L195-L198
poetry install --all-extras
Installing dependencies from lock file

Package operations: 218 installs, 6 updates, 0 removals

  - Installing pydantic-core (2.18.2): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  Running `maturin pep517 build-wheel -i /tmp/tmpg52uy9h8/.venv/bin/python --compatibility off`
  πŸ“¦ Including license file "/tmp/tmpjy5611r2/pydantic_core-2.18.2/LICENSE"
  🍹 Building a mixed python/rust project
  πŸ”— Found pyo3 bindings
  🐍 Found CPython 3.13 at /tmp/tmpg52uy9h8/.venv/bin/python
  πŸ“‘ Using build options features, bindings from pyproject.toml
     Compiling autocfg v1.1.0
     Compiling target-lexicon v0.12.9
     Compiling python3-dll-a v0.2.9
     Compiling proc-macro2 v1.0.76
     Compiling once_cell v1.18.0
     Compiling unicode-ident v1.0.10
     Compiling libc v0.2.147
     Compiling heck v0.4.1
     Compiling num-traits v0.2.16
     Compiling quote v1.0.35
     Compiling pyo3-build-config v0.21.1
     Compiling syn v2.0.48
     Compiling cfg-if v1.0.0
     Compiling rustversion v1.0.13
     Compiling version_check v0.9.4
     Compiling lock_api v0.4.10
     Compiling num-integer v0.1.45
     Compiling parking_lot_core v0.9.8
     Compiling pyo3-ffi v0.21.1
     Compiling memoffset v0.9.0
     Compiling num-bigint v0.4.4
     Compiling scopeguard v1.1.0
     Compiling smallvec v1.13.2
     Compiling tinyvec_macros v0.1.1
     Compiling portable-atomic v1.6.0
     Compiling static_assertions v1.1.0
     Compiling lexical-util v0.8.5
     Compiling tinyvec v1.6.0
     Compiling pyo3-macros-backend v0.21.1
     Compiling pyo3 v0.21.1
     Compiling ahash v0.8.10
     Compiling serde v1.0.197
     Compiling memchr v2.6.3
     Compiling unicode-normalization v0.1.22
     Compiling aho-corasick v1.0.2
     Compiling strum_macros v0.25.3
     Compiling serde_derive v1.0.197
     Compiling lexical-parse-integer v0.8.6
     Compiling parking_lot v0.12.1
     Compiling pyo3-macros v0.21.1
     Compiling jiter v0.2.1
     Compiling getrandom v0.2.10
     Compiling equivalent v1.0.1
     Compiling unicode-bidi v0.3.13
     Compiling zerocopy v0.7.32
     Compiling regex-syntax v0.8.2
     Compiling hashbrown v0.14.3
     Compiling percent-encoding v2.3.1
     Compiling indoc v2.0.4
     Compiling serde_json v1.0.114
     Compiling unindent v0.2.3
     Compiling form_urlencoded v1.2.1
     Compiling indexmap v2.2.2
     Compiling regex-automata v0.4.5
     Compiling idna v0.5.0
     Compiling strum v0.25.0
     Compiling lexical-parse-float v0.8.5
     Compiling pydantic-core v2.18.2 (/tmp/tmpjy5611r2/pydantic_core-2.18.2)
     Compiling ryu v1.0.14
     Compiling itoa v1.0.8
  error: failed to run custom build command for `pydantic-core v2.18.2 (/tmp/tmpjy5611r2/pydantic_core-2.18.2)`

  Caused by:
    process didn't exit successfully: `/tmp/tmpjy5611r2/pydantic_core-2.18.2/target/release/build/pydantic-core-1802aceee20bb22a/build-script-build` (exit status: 101)
    --- stdout
    cargo:rustc-cfg=Py_3_6
    cargo:rustc-cfg=Py_3_7
    cargo:rustc-cfg=Py_3_8
    cargo:rustc-cfg=Py_3_9
    cargo:rustc-cfg=Py_3_10
    cargo:rustc-cfg=Py_3_11
    cargo:rustc-cfg=Py_3_12
    cargo:rustc-cfg=Py_3_13
    cargo:rustc-cfg=Py_LIMITED_API
    cargo:rerun-if-changed=python/pydantic_core/core_schema.py
    cargo:rerun-if-changed=generate_self_schema.py

    --- stderr
    Traceback (most recent call last):
      File "/tmp/tmpjy5611r2/pydantic_core-2.18.2/generate_self_schema.py", line 193, in eval_forward_ref
        return type_._evaluate(core_schema.__dict__, None, set())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/tmp/tmpjy5611r2/pydantic_core-2.18.2/generate_self_schema.py", line 241, in <module>
        main()
        ~~~~^^
      File "/tmp/tmpjy5611r2/pydantic_core-2.18.2/generate_self_schema.py", line 211, in main
        value = get_schema(s, definitions)
      File "/tmp/tmpjy5611r2/pydantic_core-2.18.2/generate_self_schema.py", line 55, in get_schema
        return type_dict_schema(obj, definitions)
      File "/tmp/tmpjy5611r2/pydantic_core-2.18.2/generate_self_schema.py", line 153, in type_dict_schema
        field_type = eval_forward_ref(field_type)
      File "/tmp/tmpjy5611r2/pydantic_core-2.18.2/generate_self_schema.py", line 196, in eval_forward_ref
        return type_._evaluate(core_schema.__dict__, None)
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
    thread 'main' panicked at build.rs:29:9:
    generate_self_schema.py failed with exit status: 1
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...
  πŸ’₯ 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.13-64bit" PYO3_PYTHON="/tmp/tmpg52uy9h8/.venv/bin/python" PYTHON_SYS_EXECUTABLE="/tmp/tmpg52uy9h8/.venv/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/tmpjy5611r2/pydantic_core-2.18.2/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/tmpg52uy9h8/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1


  at venv_313/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
      160β”‚
      161β”‚                 error = ChefBuildError("\n\n".join(message_parts))
      162β”‚
      163β”‚             if error is not None:
    β†’ 164β”‚                 raise error from None
      165β”‚
      166β”‚             return path
      167β”‚
      168β”‚     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pydantic-core (2.18.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pydantic-core (==2.18.2)"'.

jm-nab avatar May 22 '24 20:05 jm-nab

@jm-nab that particular error is a duplicate of #1292

davidhewitt avatar May 23 '24 08:05 davidhewitt

2.18.2 seems is OK

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Running `maturin pep517 build-wheel -i /usr/bin/python3 --compatibility off`
πŸ“¦ Including license file "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.2/LICENSE"
🍹 Building a mixed python/rust project
πŸ”— Found pyo3 bindings
🐍 Found CPython 3.10 at /usr/bin/python3
πŸ“‘ Using build options features, bindings from pyproject.toml
   Compiling autocfg v1.1.0
   Compiling target-lexicon v0.12.9
   Compiling proc-macro2 v1.0.76
   Compiling python3-dll-a v0.2.9
   Compiling once_cell v1.18.0
   Compiling unicode-ident v1.0.10
   Compiling libc v0.2.147
   Compiling heck v0.4.1
   Compiling version_check v0.9.4
   Compiling cfg-if v1.0.0
   Compiling rustversion v1.0.13
   Compiling parking_lot_core v0.9.8
   Compiling static_assertions v1.1.0
   Compiling scopeguard v1.1.0
   Compiling tinyvec_macros v0.1.1
   Compiling portable-atomic v1.6.0
   Compiling smallvec v1.13.2
   Compiling memchr v2.6.3
   Compiling serde v1.0.197
   Compiling zerocopy v0.7.32
   Compiling regex-syntax v0.8.2
   Compiling indoc v2.0.4
   Compiling equivalent v1.0.1
   Compiling unindent v0.2.3
   Compiling percent-encoding v2.3.1
   Compiling hashbrown v0.14.3
   Compiling serde_json v1.0.114
   Compiling unicode-bidi v0.3.13
   Compiling itoa v1.0.8
   Compiling ryu v1.0.14
   Compiling uuid v1.7.0
   Compiling base64 v0.21.7
   Compiling tinyvec v1.6.0
   Compiling lexical-util v0.8.5
   Compiling form_urlencoded v1.2.1
   Compiling aho-corasick v1.0.2
   Compiling indexmap v2.2.2
   Compiling unicode-normalization v0.1.22
   Compiling lexical-parse-integer v0.8.6
   Compiling quote v1.0.35
   Compiling lexical-parse-float v0.8.5
   Compiling syn v2.0.48
   Compiling getrandom v0.2.10
   Compiling ahash v0.8.10
   Compiling idna v0.5.0
   Compiling num-traits v0.2.16
   Compiling num-integer v0.1.45
   Compiling lock_api v0.4.10
   Compiling num-bigint v0.4.4
   Compiling memoffset v0.9.0
   Compiling regex-automata v0.4.5
   Compiling url v2.5.0
   Compiling parking_lot v0.12.1
   Compiling pyo3-build-config v0.21.1
   Compiling regex v1.10.3
   Compiling pyo3-macros-backend v0.21.1
   Compiling pyo3-ffi v0.21.1
   Compiling pyo3 v0.21.1
   Compiling jiter v0.2.1
   Compiling pydantic-core v2.18.2 (/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.2)
   Compiling serde_derive v1.0.197
   Compiling strum_macros v0.25.3
   Compiling enum_dispatch v0.3.13
   Compiling strum_macros v0.26.1
   Compiling pyo3-macros v0.21.1
   Compiling strum v0.25.0
   Compiling speedate v0.14.0
    Finished `release` profile [optimized] target(s) in 6m 07s
πŸ“¦ Built wheel for CPython 3.10 to /home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.2/target/wheels/pydantic_core-2.18.2-cp310-cp310-linux_x86_64.whl
/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.2/target/wheels/pydantic_core-2.18.2-cp310-cp310-linux_x86_64.whl
Successfully built pydantic_core-2.18.2-cp310-cp310-linux_x86_64.whl

Closing.

kloczek avatar May 26 '24 19:05 kloczek

I am currently unable to install the latest release on Windows.

Output:

Collecting pydantic-core
  Using cached pydantic_core-2.18.3.tar.gz (384 kB)
  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'
Collecting typing-extensions!=4.7.0,>=4.6.0 (from pydantic-core)
  Using cached typing_extensions-4.12.0-py3-none-any.whl.metadata (3.0 kB)
Using cached typing_extensions-4.12.0-py3-none-any.whl (37 kB)
Building wheels for collected packages: pydantic-core
  Building wheel for pydantic-core (pyproject.toml): started
  Building wheel for pydantic-core (pyproject.toml): still running...
  Building wheel for pydantic-core (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  Building wheel for pydantic-core (pyproject.toml) did not run successfully.
  exit code: 1
  
  [97 lines of output]
  Running `maturin pep517 build-wheel -i C:\Python313_64bit\python.exe --compatibility off`
  Γ°ΕΈβ€œΒ¦ Including license file "C:\Users\Nfelt\AppData\Local\Temp\pip-install-et0bue1n\pydantic-core_2f2349bbbc6e497c9da3ad6b04b59a93\LICENSE"
  Γ°ΕΈ\x8dΒΉ Building a mixed python/rust project
  🔗 Found pyo3 bindings
  Γ°ΕΈ\x90\x8d Found CPython 3.13 at C:\Python313_64bit\python.exe
  Γ°ΕΈβ€œΒ‘ Using build options features, bindings from pyproject.toml
     Compiling target-lexicon v0.12.9
     Compiling autocfg v1.1.0
     Compiling cc v1.0.79
     Compiling proc-macro2 v1.0.76
     Compiling unicode-ident v1.0.10
     Compiling once_cell v1.18.0
     Compiling heck v0.4.1
     Compiling windows_x86_64_gnu v0.48.0
     Compiling version_check v0.9.4
     Compiling cfg-if v1.0.0
     Compiling rustversion v1.0.13
     Compiling libc v0.2.147
     Compiling parking_lot_core v0.9.8
     Compiling static_assertions v1.1.0
     Compiling portable-atomic v1.6.0
     Compiling scopeguard v1.1.0
     Compiling tinyvec_macros v0.1.1
     Compiling smallvec v1.13.2
     Compiling lexical-util v0.8.5
     Compiling memchr v2.6.3
     Compiling serde v1.0.197
     Compiling getrandom v0.2.10
     Compiling num-traits v0.2.16
     Compiling lock_api v0.4.10
     Compiling num-integer v0.1.45
     Compiling python3-dll-a v0.2.9
     Compiling num-bigint v0.4.4
     Compiling memoffset v0.9.0
     Compiling ahash v0.8.10
     Compiling tinyvec v1.6.0
     Compiling lexical-parse-integer v0.8.6
     Compiling aho-corasick v1.0.2
     Compiling percent-encoding v2.3.1
     Compiling windows-targets v0.48.1
     Compiling pyo3-build-config v0.21.2
     Compiling quote v1.0.35
     Compiling regex-syntax v0.8.2
     Compiling unicode-normalization v0.1.22
     Compiling equivalent v1.0.1
     Compiling unindent v0.2.3
     Compiling zerocopy v0.7.32
     Compiling indoc v2.0.4
     Compiling hashbrown v0.14.3
     Compiling serde_json v1.0.116
     Compiling unicode-bidi v0.3.13
     Compiling form_urlencoded v1.2.1
     Compiling lexical-parse-float v0.8.5
     Compiling ryu v1.0.14
     Compiling syn v2.0.48
     Compiling parking_lot v0.12.1
     Compiling itoa v1.0.8
     Compiling idna v0.5.0
     Compiling uuid v1.7.0
     Compiling base64 v0.21.7
     Compiling indexmap v2.2.2
     Compiling regex-automata v0.4.5
     Compiling url v2.5.0
     Compiling serde_derive v1.0.197
     Compiling strum_macros v0.25.3
     Compiling enum_dispatch v0.3.13
     Compiling strum_macros v0.26.1
     Compiling pyo3-macros-backend v0.21.2
     Compiling pyo3-ffi v0.21.2
     Compiling pyo3 v0.21.2
     Compiling jiter v0.2.1
     Compiling pydantic-core v2.18.3 (C:\Users\Nfelt\AppData\Local\Temp\pip-install-et0bue1n\pydantic-core_2f2349bbbc6e497c9da3ad6b04b59a93)
     Compiling strum v0.25.0
     Compiling regex v1.10.4
     Compiling pyo3-macros v0.21.2
     Compiling speedate v0.14.0
  error: failed to run custom build command for `pyo3-ffi v0.21.2`
  
  Caused by:
    process didn't exit successfully: `C:\Users\Nfelt\AppData\Local\Temp\pip-install-et0bue1n\pydantic-core_2f2349bbbc6e497c9da3ad6b04b59a93\target\release\build\pyo3-ffi-3aa7aa3f167032f2\build-script-build` (exit code: 1)
    --- stdout
    cargo:rerun-if-env-changed=PYO3_CROSS
    cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
    cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
    cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
    cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
    cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY
  
    --- stderr
    error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
    = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
    = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
  warning: build failed, waiting for other jobs to finish...
  ðŸ’Β₯ maturin failed
    Caused by: Failed to build a native library through cargo
    Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "C:\\Users\\Nfelt\\AppData\\Local\\Temp\\pip-install-et0bue1n\\pydantic-core_2f2349bbbc6e497c9da3ad6b04b59a93\\Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', 'C:\\Python313_64bit\\python.exe', '--compatibility', 'off'] 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 wheel 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

nfelt14 avatar May 30 '24 16:05 nfelt14

  --- stderr
    error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
    = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
    = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI

I'm releasing Python 3.13 support in PyO3 in the next version; so we can begin being able to build on 3.13 development versions soon. Until then, either set the environment variable and hope for the best (YMMV), or use a stable Python :)

davidhewitt avatar May 30 '24 19:05 davidhewitt

For me 2.18.2 and 2.18.3 are perfectly fine.

kloczek avatar May 30 '24 19:05 kloczek