Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: pydantic_2 #263228

Closed
nbraud opened this issue Oct 24, 2023 · 12 comments
Closed

Package request: pydantic_2 #263228

nbraud opened this issue Oct 24, 2023 · 12 comments

Comments

@nbraud
Copy link
Contributor

nbraud commented Oct 24, 2023

Project description

pydantic is a Python library for data validation and settings management using PEP 484 type annotations.

It's v2 implements validation and serialisation logic in Rust, for a 5-50x speedup compared to v1 (according to its authors), in addition to functional improvements, new features, etc.

Metadata

@natsukium
Copy link
Member

pydantic2 contains breaking changes, and many downstream packages are not yet ready for it.
A variant like pydantic_2 cannot be included in nixpkgs as the following comment.
#244564 (comment)

@nbraud
Copy link
Contributor Author

nbraud commented Oct 28, 2023

Oh, I see. Yeah, $PYTHONPATH does make that difficult then.

@nbraud nbraud closed this as completed Oct 28, 2023
@MayNiklas
Copy link
Member

MayNiklas commented Nov 6, 2023

pydantic2 contains breaking changes, and many downstream packages are not yet ready for it. A variant like pydantic_2 cannot be included in nixpkgs as the following comment. #244564 (comment)

If I understand it correctly:

  • we can't offer a v2 variant
  • we can't upgrade to v2 because of breaking changes

Since more and more packages start to rely on v2: what are our options then?
For example: fastAPI already uses v2.
Not all projects will migrate to v2 in the near future.

Update: also, we can't update packages already using v2.
Naive approach: don't we have the option, to flag a v2 variant as "conflicts with v1"?

@carlthome
Copy link
Member

Could this be reopened? This is a pretty major user issue (I'm just trying to run copier 8.3.0 and got into this rabbit hole) that will get worse over time.

@carlthome carlthome mentioned this issue Nov 20, 2023
13 tasks
@natsukium
Copy link
Member

A month ago we had over 1000 broken packages, now we are down to about 100.
This PR has a list of packages that are incompatible with v2 and we would like your help in creating patches for upstream.

@dzmitry-lahoda
Copy link

dzmitry-lahoda commented Dec 28, 2023

Hello,

may be there is some python packages list generated? not nixpkgs. so i can use arbitrary versions?

i found some abandoned/deprecated project. so my option is to directly build all pacakges. so i guess some generate would help. i do not care size, just need all versions at hand.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/installing-a-python-package-from-pypi/24553/9

@natsukium
Copy link
Member

I'm not sure why you commented here, but why don't you try dream2nix, poetry2nix or pyproject2nix?

@dzmitry-lahoda
Copy link

dream2nix

will fail for complex project. did not checked - but pretty sure - cool, ambitious - but cannot handle edge cases - which is blocker

poetry2nix

I use it, but need to do for each project, neither can shell directly into, until do it.

pyprojectx

not nix and not sure why it is better than pure poetry.

i seek for nix develop/build/run + poetry usage directly, not via some yet another tool to install, just some automated glue for nix+poetry.

@dzmitry-lahoda
Copy link

I'm not sure why you commented here,

I got problem, started to search, fastapi, codegent-model - all goes here. search first location is best one so others skip over my research and do next step.

@natsukium
Copy link
Member

I don't think it's appropriate to continue here since this issue has already been closed as completed and what you say has nothing to do with nixpkgs.

@dzmitry-lahoda
Copy link

@natsukium please do not continue. what is the issue?

here is pydantic2 here it is https://www.reddit.com/r/NixOS/comments/17twg8s/poetry2nix_with_a_cargo_dependency/

@NixOS NixOS locked as resolved and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants