altendky / qtrio

QTrio - a library bringing Qt GUIs together with async and await via Trio
https://qtrio.readthedocs.io/
Other
40 stars 4 forks source link

Relax version constraint on trio-typing #272

Closed vxgmichel closed 2 years ago

vxgmichel commented 2 years ago

Is there a reason why trio-typing is pinned to ~= 0.5.0?

It would be nice to be able to use the latest (i.e 0.7.0) version of trio-typing in projects that depend on qtrio.

Would this simple change make sense?

diff --git a/setup.cfg b/setup.cfg
index 6a731e6..be83401 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -44,7 +44,7 @@ install_requires=
     qts ~= 0.2.0
     # trio >= 0.16 for guest mode
     trio >= 0.16
-    trio-typing ~= 0.5.0
+    trio-typing >= 0.5.0
     # python_version < '3.8' for `Protocol`
     typing-extensions; python_version < '3.8'
 packages = find:

Note that trio-typing 0.5.0 is no longer compatible with the latest mypy (0.961):

>>> import trio_typing.plugin
[...]
ImportError: cannot import name 'TypeVarDef' from 'mypy.types' 
altendky commented 2 years ago

It's a classic question of leaving it open to new versions that don't even indicate they'll work by their version, or getting in people's way like this. I'd rather not think through that decision but let's see how https://github.com/altendky/qtrio/pull/273 goes.

vxgmichel commented 2 years ago

Hi @altendky,

Could we get a release now that #273 is merged?

Thanks!

vxgmichel commented 2 years ago

Another friendly ping for a new release :)

(because qtrio is holding back trio-typing which is holding back mypy in our repo, and we'd like to update all those dependencies)

altendky commented 2 years ago

Looks to be updated. Let me know how it goes for you. Also, sorry for the painful process here and thanks for keeping at it.

https://pypi.org/project/qtrio/ https://qtrio.readthedocs.io/en/stable/history.html

vxgmichel commented 2 years ago

I've been able to update qtrio, trio_typing and mypy, and everything looks good so far.

Thanks a lot :)