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

validate pydantic version when testing on Debian #1766

Open
tomkralidis opened this issue Jul 29, 2024 · 3 comments
Open

validate pydantic version when testing on Debian #1766

tomkralidis opened this issue Jul 29, 2024 · 3 comments
Assignees
Labels
packaging Packaging question Further information is requested
Milestone

Comments

@tomkralidis
Copy link
Member

tomkralidis commented Jul 29, 2024

As discussed at FOSS4G Europe 2024 with @EdwardBetts and @pantierra (in support of pygeoapi on Debian):

https://hachyderm.io/@edward/112728302761775798

@EdwardBetts @pantierra can you confirm the Debian version?

On jammy (our current baseline):

dpkg -l | grep -i pydantic
ii  python3-pydantic            1.8.2-1                                 all          Data validation and settings management using Python type hinting

And a small script to test/reproduce (Debian sid):

docker run -it debian:sid
apt update -y && apt install python3-pydantic
from pydantic import BaseModel, Field

class Foo(BaseModel):
    api_version: str = Field(regex=r'^\d+\.\d+\..+$',
                             description="Semantic API version number.")

f = Foo(api_version='1.0.0')
@tomkralidis tomkralidis added question Further information is requested packaging Packaging labels Jul 29, 2024
@tomkralidis tomkralidis added this to the 0.18.0 milestone Jul 29, 2024
@francbartoli
Copy link
Contributor

regex is replaced by pattern when migrating from v1 to v2 docs. Atm, pygeoapi relies only to pydantic v1 while we are waiting for the debian package for v2 (the one based on rust)

@pantierra
Copy link
Contributor

The current version in Debian sid is the latest v1 version 1.10.17, which already has the renaming from regex to pattern included before v2.

@francbartoli
Copy link
Contributor

Sorry @pantierra, looking at the v1.10.17 tag in the field class I do see a regex parameter. Can you help me to find where it is the renamed pattern?

@tomkralidis tomkralidis modified the milestones: 0.18.0, 0.19.0 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Packaging question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants