Migrate pygstc to asyncio based sockets.#252
Migrate pygstc to asyncio based sockets.#252jameshilliard wants to merge 1 commit intoRidgeRun:developfrom
Conversation
f6a7da2 to
510c975
Compare
510c975 to
a970f11
Compare
|
I love this. I'll review calmly next week. Thanks for your multiple submissions. |
.github/workflows/main.yml
Outdated
| jobs: | ||
| build: | ||
| runs-on: ubuntu-18.04 | ||
| runs-on: ubuntu-20.04 |
There was a problem hiding this comment.
Do we really want to move the testing version forward?
There was a problem hiding this comment.
That was due to 18.04 shipping with python 3.6 while I used features here requiring a python 3.7 minimum.
| 'Programming Language :: Python :: 3.7', | ||
| 'Programming Language :: Python :: 3.8', | ||
| 'Programming Language :: Python :: 3.9'], | ||
| python_requires='>=3.7', |
There was a problem hiding this comment.
Does asyncio not support 3.5, otherwise we might be breaking support
There was a problem hiding this comment.
Well basic asyncio does support 3.5, however specific features I used have a minimum version of 3.7.
There was a problem hiding this comment.
FYI python 3.5 is already end of life, and 3.6 will be end of life within a couple of months looks like.
There was a problem hiding this comment.
python 3.6 is now end of life so requiring python 3.7 shouldn't be an issue anymore right?
| import select | ||
| import asyncio | ||
| import socket | ||
| from contextlib import asynccontextmanager |
There was a problem hiding this comment.
This feature has a minimum python version requirement of 3.7. I can probably rework this to not require it but it makes socket cleanup a bit cleaner IMO.
|
I've rebased this however there's some failures unrelated to the changes in this pull request, I reworked the python test runner in #278 to fix the tests themselves(although some appear to still fail due to gstd bugs however). |
46628a8 to
8222898
Compare
|
I've rebased this on top of #278 which fixes most tests. |
279ead3 to
9bcde91
Compare
|
The main issue I see with this is that we currently support python >= 3.5. I could see migrating the client to python 3.6 but not to python 3.7 just yet. A lot of GstD users run it on NVIDIA JetPack and the latest version 4.6 still uses Ubuntu 18.04 and python 3.6. Unless there is an easy to maintain way to provide backwards compatibly I think we will have to wait a while to include this change. |
Hmm, is it just NVIDIA JetPack using EOL python versions? 3.5 has been deprecated for a while now and 3.6 has been for a few months. This just updates the client library so I think if anyone need to use an older python they can just not install the new asyncio version probably right?
Can't they just do |
|
Keep in mind many Yocto projects, where change of packet, specialy Python is not as easy as apt install. |
3869039 to
eaadd41
Compare
e582a54 to
b84de81
Compare
b84de81 to
90dbe9c
Compare
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
90dbe9c to
3cd0dad
Compare
|
Rebased this just now, does this look good to merge now that python 3.6 has been end of life for a long time? |
This should allow pygstc to be used properly in a non-blocking manner in addition to providing a cleaner abstraction over the TCP socket operations.
I also fixed the python tests to run properly in github actions.