Comments (21)
I think this change in the rust compiler introduced in v1.74.0 (See also: RFC) is causing the issue.
from pydantic-core.
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.
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.
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.
@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.
@arnaudsjs are you able to try building with latest Rust stable? (Rust 1.75.0 at present.)
from pydantic-core.
I tried building the package with Rust version 1.75.0
and like that the build does work.
from pydantic-core.
What's the reason you need to build with older rust?
from pydantic-core.
Because neither AlmaLinux 8 nor AlmaLinux 9 has a newer version of Rust available in the official repositories.
from pydantic-core.
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.
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.
@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.
Thanks @locobastos, that table is very helpful 👍
from pydantic-core.
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.
@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.
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.
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.
Yes, there is a rust-version
key we should set in the Cargo.toml. #1206 will do that.
from pydantic-core.
Rust 1.75.0
--> Released on 28 December 2023
--> Available since 10 April 2024 on AlmaLinux 8.10
--> + 104 days
This Rust version allows us to build pydantic-core v2.16.3 / pydantic 2.6.4
@davidhewitt
from pydantic-core.
👍 next pydantic-core
will have MSRV of 1.75.0
from pydantic-core.
Just a note.
On an AlmaLinux 8.10 with Rust 1.75.0 + Cargo 1.75.0 + Python 3.11.7:
pydantic == 2.5.3 Build OK
└── pydantic_core == 2.14.6 Build OK
pydantic == 2.6.0 Build OK
└── pydantic_core == 2.16.1 Build OK
pydantic == 2.6.1 Build OK
└── pydantic_core == 2.16.2 Build OK
pydantic == 2.6.2 Build OK
└── pydantic_core == 2.16.3 Build OK
pydantic == 2.6.3 Build OK
└── pydantic_core == 2.16.3 Build OK
pydantic == 2.6.4 Build OK
└── pydantic_core == 2.16.3 Build OK
pydantic == 2.7.0 Build OK
└── pydantic_core == 2.18.1 Build FAILED (Need Rust >= 1.76)
pydantic == 2.7.1 Build OK
└── pydantic_core == 2.18.2 Build FAILED (Need Rust >= 1.76)
pydantic == 2.7.2 Build OK
└── pydantic_core == 2.18.3 Build FAILED (Need Rust >= 1.76)
pydantic == 2.7.3 Build OK
└── pydantic_core == 2.18.4 Build FAILED (Need Rust >= 1.76)
from pydantic-core.
Related Issues (20)
- Worst case validation performance scales with the number of pydantic objects in memory HOT 4
- Unable to build Pydantic-Core 2.16.3 on Alpine 3.19 HOT 3
- Datetime underflow causes validation to fail HOT 1
- Different behavior for `extra_behavior` and `config.extra_fields_behavior`
- Add support for simple ser schema with `any` (`lambda x: x` replacement)
- Strict bug :( with config vs runtime flag
- False-positive `SchemaError` for keyword-only args: Non-default argument follows default argument
- 2.18.0: pep517 based build fails HOT 15
- `serialization` logic not regognized in `json` and `python` schemas at lower levels
- Make `validate_json` accept `memoryview`. HOT 1
- [BUG] Serializing datetime.time loses timezone data when datetime.datetime is reqired for utc offset because of DST HOT 1
- generate_self_schema.py incompatible with Python 3.13.0b1 HOT 2
- Unexpected behavior for Partial=True HOT 2
- UUID validators with custom string object HOT 1
- Fail to build pydantic_core on OS X 10.11 with Python 3.10 HOT 8
- 2.18.2: pytest fails in 3 units HOT 7
- Recursive serialization of UUID seems to fail json.dumps HOT 1
- Lower MSRV to 1.75
- `include` and `exclude` are not passed to field serializer contexts in function serializer HOT 1
- fail-fast list schema configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydantic-core.