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

Add support for pydantic 2.x ? #589

Closed
marillat opened this issue Jul 27, 2024 · 7 comments
Closed

Add support for pydantic 2.x ? #589

marillat opened this issue Jul 27, 2024 · 7 comments
Labels
enhancement Improve existing feature

Comments

@marillat
Copy link
Contributor

FastFlix Version:
5.7.4
Operating System:
Linux amd64 Debian unstable Python 3.12
Describe the bug
FastFlix fail to start with (python3-pydantic 2.4.2 and python3-pydantic-core 2.11.0)

File "/usr/lib/python3/dist-packages/pydantic/_internal/_generate_schema.py", line 415, in _unknown_type_schema
    raise PydanticSchemaGenerationError(
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'box.Box'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.

For further information visit https://errors.pydantic.dev/2.8/u/schema-for-unknown-type
@marillat marillat added the bug Something isn't working label Jul 27, 2024
@marillat marillat changed the title FastFlix is supposed to work with pydantic 2.x ? Add support for pydantic 2.x ? Jul 27, 2024
@marillat
Copy link
Contributor Author

marillat commented Jul 27, 2024

I forgot to read the pyproject.toml
I changed the bug title. It's possible to change the status to Feature request ?
The main problem is that we have only pydantic 2 .x in testing/unstable

@cdgriffith
Copy link
Owner

Hi @marillat, sounds like you are trying to use only system packages?

I would recommend setting up a venv for any python projects you are running, detailed in the release:

git clone https://github.com/cdgriffith/FastFlix.git
cd FastFlix
python3.12 -m pip install --upgrade pip
python3.12 -m venv venv
. ./venv/bin/activate  
pip install .

@cdgriffith cdgriffith added enhancement Improve existing feature and removed bug Something isn't working labels Aug 6, 2024
@marillat
Copy link
Contributor Author

marillat commented Aug 6, 2024

Hi @marillat, sounds like you are trying to use only system packages?

Yes.

I would recommend setting up a venv for any python projects you are running, detailed in the release:

As I'm a Debian maintainer I try to not use venv, composer or npm and I don't want to build appimage.
Also, old code are not always maintainer and you can introduce more or less serious security issue.

Feel free to close this issue.

@cdgriffith
Copy link
Owner

Curious why you would shy away from venvs? They purposefully isolate an environment so you don't have to worry about the system's overall security when using packages for a specific program.

And can keep ticket open as I will have to migrate to pydantic 2 anyways!

@cdgriffith
Copy link
Owner

Decided to jump to new version with next release. It may cause errors with some people's old save profiles, so currently in beta: https://github.com/cdgriffith/FastFlix/releases/tag/5.8.0b0

cdgriffith added a commit that referenced this issue Aug 9, 2024
* Adding #283 support for experimental DTS (dca) audio by adding -strict -2 (thanks to Sub7)
* Adding #354 M1 support (thanks to Nhunz and Anton)
* Adding #536 Improve Profiles - save advanced options (thanks to CelticTaonga and DCNerds)
* Adding #568 center app on startup (thanks to Viet-Duc Le)
* Adding #589 support for pydantic 2.x (thanks to dmo marillat)
* Adding #592 Add alpha channel for VP9 (thjanks to subof)
* Fixing #185 audio channels not being set properly and resetting on encoder change (thanks to Tupsi)
* Fixing #522 add file fails - fixed as of 5.7.0 (thanks to pcl5x2008)
* Fixing #531 list limitation in readme that FFmpeg must support the software encoders listed (thanks to brunoais)
* Fixing #567 Profiles for WebP did not work (nor GIF dither) (thanks to jpert)
* Fixing #582 BT.2020-10 Color transfer not maintained (thanks to Ryushin)
* Fixing #585 error when trying to return a video from queue that has the video track after audio or subtitiles (thanks to Hankuu)
* Fixing #586 audio channels being set incorrectly (thanks to Hankuu)
* Fixing #588 audio and subtitle dispositions were not set from source (thanks to GeZorTenPlotZ)
@cdgriffith
Copy link
Owner

@marillat
Copy link
Contributor Author

marillat commented Aug 9, 2024

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing feature
Projects
None yet
Development

No branches or pull requests

2 participants