FS#71724 - [python-pydantic] shipped version is not compiled, causes performance penalty

Attached to Project: Community Packages
Opened by lightning (lightning) - Wednesday, 04 August 2021, 10:50 GMT
Last edited by David Runge (dvzrv) - Wednesday, 13 July 2022, 17:07 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To David Runge (dvzrv)
Filipe LaĆ­ns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
From [1]:
> pydantic can optionally be compiled with cython which should give a 30-50% performance improvement.
> To test if pydantic is compiled run:
> ```
> import pydantic
> print('compiled:', pydantic.compiled)
> ```

Steps to reproduce:
```
$ python
Python 3.9.6 (default, Jun 30 2021, 10:22:16)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pydantic
>>> pydantic.compiled
False
```

Suggested Fix: add `cython` to `makedepends`, which works for me. This changes the architecture from any to x86_64, though.

[1] https://pydantic-docs.helpmanual.io/install/
This task depends upon

Closed by  David Runge (dvzrv)
Wednesday, 13 July 2022, 17:07 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with 1.9.1-2
Comment by David Runge (dvzrv) - Wednesday, 13 July 2022, 15:11 GMT
@lightning: Thanks for the ticket.

I have rebuilt python-pydantic in [community-testing]. Please check whether 1.9.1-2 works for you as intended.
Comment by lightning (lightning) - Wednesday, 13 July 2022, 15:34 GMT
Thanks for taking care of this!

I confirm, everything works as intended. You may close the ticket.