Coder Social home page Coder Social logo

Comments (18)

arnaudsjs avatar arnaudsjs commented on June 11, 2024 1

I think this change in the rust compiler introduced in v1.74.0 (See also: RFC) is causing the issue.

from pydantic-core.

locobastos avatar locobastos commented on June 11, 2024 1

Hello, same issue with:

  • python 3.11.5
  • rustc 1.71.1 (eb26296b5 2023-08-03) (Red Hat 1.71.1-1.module_el8.9.0+3639+04ae6405)
  • pydantic-core 2.16.2

EDIT1: I'm looking for the most recent version that is compatible with rust 1.71.1 on AlmaLinux 8 and I will give the result here
EDIT2: I've not seen that I've the same environment than @arnaudsjs
EDIT3: pydantic-core 2.15.0 is building with our environment. But I've not found any pydantic version that requires this exact version.

From what I've found, at the moment, Pydantic 2.5.3 + Pydantic-Core 2.14.6 are the latest versions working with Rust 1.71.1.

from pydantic-core.

PatrickBaus avatar PatrickBaus commented on June 11, 2024 1

This issue also persists with alpine Linux <= 3.19 as it uses Rust 1.72.1-r0. This breaks my builds of a python docker container for the ARMv6 Raspberry Pi platform.

As said above, the last working version is Pydantic 2.5.3 + Pydantic-Core 2.14.6.

  • Python 3.11.6-r1
  • Rust 1.72.1-r0

from pydantic-core.

locobastos avatar locobastos commented on June 11, 2024 1

Red Hat is pretty slow to release packages because of their aim of the stability. Anyway, here is what I've found on the version history:

  • Rust 1.47.0
    --> Released on 8 October 2020
    --> Available in AlmaLinux 8.3 repository on 12 March 2021
    --> + 155 days
  • Rust 1.49.0
    --> Release on 31 December 2020
    --> Available in AlmaLinux 8.4 repository on 17 April 2021
    --> + 107 days
  • Rust 1.52.1
    --> Released on 10 May 2021
    --> Available in AlmaLinux 8.4 repository on 11 August 2021
    --> + 101 days
  • Rust 1.54.0
    --> Released on 29 July 2021
    --> Available in AlmaLinux 8.5 repository on 10 October 2021
    --> + 73 days
  • Rust 1.58.1
    --> Released on 20 January 2022
    --> Available in AlmaLinux 8.6 repository on 12 April 2022
    --> + 82 days
  • Rust 1.62.1
    --> Released on 19 July 2022
    --> Available in AlmaLinux 8.7 repository on 13 October 2022
    --> + 86 days
  • Rust 1.66.1
    --> Released on 10 January 2023
    --> Available in AlmaLinux 8.8 repository on 6 April 2023
    --> + 86 days
  • Rust 1.71.1
    --> Released on 3 August 2023
    --> Available 18 October 2023
    --> + 49 days

It seems they decrease the time between the release date and the availibility date, but I also know that they will release only versions they need.

from pydantic-core.

arnaudsjs avatar arnaudsjs commented on June 11, 2024 1

@davidhewitt I won't have the time to work on this. We are currently working around this issue by using the binary wheel instead. We were facing this issue on RockyLinux 8, which is like AlmaLinux, a binary-compatible derivative of RedHat Enterprise Linux. So the above-mentioned table should hold for both AlmaLinux, RockyLinux and RedHat Enterprise Linux.

from pydantic-core.

davidhewitt avatar davidhewitt commented on June 11, 2024

@arnaudsjs are you able to try building with latest Rust stable? (Rust 1.75.0 at present.)

from pydantic-core.

arnaudsjs avatar arnaudsjs commented on June 11, 2024

I tried building the package with Rust version 1.75.0 and like that the build does work.

from pydantic-core.

samuelcolvin avatar samuelcolvin commented on June 11, 2024

What's the reason you need to build with older rust?

from pydantic-core.

locobastos avatar locobastos commented on June 11, 2024

Because neither AlmaLinux 8 nor AlmaLinux 9 has a newer version of Rust available in the official repositories.

from pydantic-core.

davidhewitt avatar davidhewitt commented on June 11, 2024

I think we should add an official minimum supported rust-version to our Cargo.toml and also test it in CI. Based on the features that we heavily use in this repository, I suspect that we could make something in the range 1.65 - 1.71 work, with a little effort.

It would likely not be a breaking change so we should be able to ship this as a patch release.

@arnaudsjs @locobastos would either of you be interested in helping create a PR to extend our rust support backwards and guarantee it?

Also, do you know how frequently AlmaLinux updates available Rust version? It would be helpful to know how many versions we should consider lagging current stable by.

from pydantic-core.

locobastos avatar locobastos commented on June 11, 2024

@samuelcolvin,

It's not a big deal, it just means that building on RHEL8-like distro is limited to an older version of pydantic + pydantic-core.
We can have newer version by using pip3 install pydantic pydantic-core:

Successfully installed annotated-types-0.6.0 pydantic-2.6.1 pydantic-core-2.16.2 typing-extensions-4.9.0

from pydantic-core.

locobastos avatar locobastos commented on June 11, 2024

@davidhewitt, I will not have the time to help you. The only one thing I will do, is to try on an AlmaLinux 8 docker container as I'm doing today. I'm not sure I'll have a capital gains on this issue. @arnaudsjs already gave the command to reproduce this issue.

from pydantic-core.

davidhewitt avatar davidhewitt commented on June 11, 2024

Thanks @locobastos, that table is very helpful 👍

from pydantic-core.

BtbN avatar BtbN commented on June 11, 2024

This is also happening on Alpine, for which no wheels are available.
The latest rust version available there is 1.72, and installing a lot of stuff has recently become impossible, specially if pydantic-core is a build-time dependency.

from pydantic-core.

davidhewitt avatar davidhewitt commented on June 11, 2024

@BtbN I'm surprised you are finding there are no Alpine wheels, we do build for musllinux.

Can you run pip debug and show the first 10 compatible tags it lists? E.g. for my desktop I get

Compatible tags: 1041
  cp312-cp312-manylinux_2_38_x86_64
  cp312-cp312-manylinux_2_37_x86_64
  cp312-cp312-manylinux_2_36_x86_64
  cp312-cp312-manylinux_2_35_x86_64
  cp312-cp312-manylinux_2_34_x86_64
  cp312-cp312-manylinux_2_33_x86_64
  cp312-cp312-manylinux_2_32_x86_64
  cp312-cp312-manylinux_2_31_x86_64
  cp312-cp312-manylinux_2_30_x86_64
  cp312-cp312-manylinux_2_29_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]

from pydantic-core.

davidhewitt avatar davidhewitt commented on June 11, 2024

We have a user needing 1.68 in #1202.

To extend back that far we'd need to replace our OnceLock from the std library with the external once_cell crate. Not the end of the world.

from pydantic-core.

hsteinhaus avatar hsteinhaus commented on June 11, 2024

Thanks @davidhewitt for pointing me to this issue.

Is there a chance to catch that type of problem earlier, i.e. with some kind of an explicit dependency check before failing with an obscure compile error?

from pydantic-core.

davidhewitt avatar davidhewitt commented on June 11, 2024

Yes, there is a rust-version key we should set in the Cargo.toml. #1206 will do that.

from pydantic-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.