When to require python-typing_extensions?
Hello! The latest version of the azure-core package has typing_extensions in its requires field. If I understand correctly, the typing_extenions package is required for older Python versions only. Does anyone know which? The description isn't very clear. Adrian
Dne 01. 04. 22 v 13:39 John Paul Adrian Glaubitz napsal(a):
The latest version of the azure-core package has typing_extensions in its requires field. If I understand correctly, the typing_extenions package is required for older Python versions only.
Does anyone know which? The description isn't very clear.
Is that a problem? The module was introduced to backport changes which became available in 3.5, but since then it still continues as a testing ground for new extensions, so if you can you should still keep it around. https://github.com/python/typing/blob/master/typing_extensions/README.rst Best, Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 You either die a hero or you live long enough to see yourself become the villain. -- Harvey Dent in The Dark Knight
Hi Matej! On 4/1/22 15:19, Matěj Cepl wrote:
Dne 01. 04. 22 v 13:39 John Paul Adrian Glaubitz napsal(a):
The latest version of the azure-core package has typing_extensions in its requires field. If I understand correctly, the typing_extenions package is required for older Python versions only.
Does anyone know which? The description isn't very clear.
Is that a problem? The module was introduced to backport changes which became available in 3.5, but since then it still continues as a testing ground for new extensions, so if you can you should still keep it around.
https://github.com/python/typing/blob/master/typing_extensions/README.rst
I still don't quite understand which versions of Python need the package and which don't. I assume it's required for Python versions below 3.7, correct? Adrian
Dne 01. 04. 22 v 15:33 John Paul Adrian Glaubitz napsal(a):
I still don't quite understand which versions of Python need the package and which don't. I assume it's required for Python versions below 3.7, correct?
The only safe answer: whichever is required by the package in question. If the package requires typing.TypeGuard than it may be required even for 3.9. Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 I am a Roman Catholic, so that I do not expect `history' to be anything but a `long defeat' -- though it contains (and in a legend may contain more clearly and movingly) some samples or glimpses of final victory. -- J.R.R. Tolkien
Hi Matěj! On 4/1/22 16:58, Matěj Cepl wrote:
Dne 01. 04. 22 v 15:33 John Paul Adrian Glaubitz napsal(a):
I still don't quite understand which versions of Python need the package and which don't. I assume it's required for Python versions below 3.7, correct?
The only safe answer: whichever is required by the package in question. If the package requires typing.TypeGuard than it may be required even for 3.9.
Thanks. That's what I already feared. Is there a common good practice or shall I just unconditionally add it to Requires? Adrian
Am 01.04.22 um 17:25 schrieb John Paul Adrian Glaubitz:
Hi Matěj!
On 4/1/22 16:58, Matěj Cepl wrote:
Dne 01. 04. 22 v 15:33 John Paul Adrian Glaubitz napsal(a):
I still don't quite understand which versions of Python need the package and which don't. I assume it's required for Python versions below 3.7, correct?
As far as I understand there are several features introduced into the pythons over time. Whether you need the backport package or not depends on the fact whether your python has that feature already put in. Mostly, the upstream developer should know. Thus they often declare something to the effect in their install requirements.
Is there a common good practice or shall I just unconditionally add it to Requires?
Adrian
The only good practice is to follow the upstream declarations. That's the only safe way. - If you don't and run into problems, it's your fault. See also the discussion about the rpm generator on the python@opensuse mailinglist yesterday. - If you do and run into problems, you have found a bug and can help upstream improve the package
Adrian
- Ben
participants (3)
-
Ben Greiner
-
John Paul Adrian Glaubitz
-
Matěj Cepl