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

Gst rtsp server stubs #183

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

yelodevopsi
Copy link
Contributor

Also for discussion:

  • The requirements for project.toml say python 3.7<, but I needed 3.12.2 and pip 24< to run the pip install .[dev] dependencies

@yelodevopsi yelodevopsi changed the title Gst rtsp server subs Gst rtsp server stubs Apr 9, 2024
@lovetox
Copy link
Collaborator

lovetox commented Apr 9, 2024

Please remove the commit adding stubs generated by the install, these should only be installed on a system and not in our code repository.

Please run black and isort over your other changes.

@yelodevopsi yelodevopsi force-pushed the gst-rtsp-server-subs branch from 43d7f31 to 1c80b49 Compare April 9, 2024 19:33
@yelodevopsi
Copy link
Contributor Author

Thanks for the feedback ! I was in a hurry to test this. I'll clean up and re-commit.

I have some points I'm curious to which was not obvious in the docs/README.md from before:

  • Is anyone able to run this with 3.7> as set in pyproject.toml? I've been hassling with multiple python3-versions until I found that merely/only 3.12.2 works with the current code.

  • How do you handle versioning between various distros with various base-gir1.2-* packages?
    I see that stubs are created for any "1.0" version for i.e. Gst and GstRtspServer, but they have many various patch/minor updates to generate stubs from:

libgirepository1.0-dev is already the newest version (1.78.1-1).                Ubuntu 23.10
libgirepository1.0-dev is already the newest version (1.72.0-1).                Ubuntu 22.04.4 LTS
libgirepository1.0-dev is already the newest version (1.64.1-1~ubuntu20.04.1).  Ubuntu 20.04 LTS

gir1.2-gstreamer-1.0 is already the newest version (1.22.5-1).
gir1.2-gstreamer-1.0 is already the newest version (1.20.3-0ubuntu1)
gir1.2-gstreamer-1.0 is already the newest version (1.16.3-0ubuntu1.1).

Have I missed something here? Or should the versioning rather be set to i.e. 1.22.5 instead of "1"?

@lovetox
Copy link
Collaborator

lovetox commented Apr 9, 2024

about your python problems, i can imagine that maybe some development script is not backwards compatible with python 3.7. pyproject.toml defines the python version for the package itself, not development tools. But anyway i agree we should add this information to the contributing or readme file.

I very much doubt that only python 3.12 works, but please open an issue with the problem you are facing with other python versions, then we can look into it.

About the versioning, im no expert in this but as i understand it there is a gir API version, for Gstreamer this is 1.0, this is independent from the actual version of Gstreamer which is 1.22.5.

What the API version allows is, that you can have multiple packages with different API version installed on the same system. Like for example Gtk 3.0 or 4.0.

when you import a package in python with gi.repository you need to specify the required API Version you want to load. Because in python you can only have one lib loaded for a specific namespace.

The developers should always raise the API version if they introduce breaking changes. If that happens we name the files _Gtk3.pyi and _Gtk4.pyi. At install time of the stubs the user can decide for which API version he wants to install the stubs.

For Gstreamer this is not necessary because everyone uses 1.0, i think there was one before that but nobody uses that anymore.

As for the lib version 1.22.5, as in python you can only install one stub package per library, we usually want to have the stubs for the latest released version of the respective library.

* Ubuntu 23.10
* libgirepository1.0-dev (1.78.1-1)
* gir1.2-gstreamer-1.0 (1.22.5-1)
* gir1.2-gst-rtsp-server-1.0 (1.22.6-1)
@yelodevopsi yelodevopsi force-pushed the gst-rtsp-server-subs branch from 1c80b49 to b4d0fe3 Compare April 9, 2024 20:53
@lovetox lovetox merged commit bc0b592 into pygobject:master Apr 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants