Page MenuHomeSolus

Initial inclusion of python-typing-extensions
ClosedPublic

Authored by algent on Thu, Feb 6, 10:05 PM.

Details

Summary

This is needed as rundependency for python-mypy

Signed-off-by: Algent Albrahimi <algent@protonmail.com>

Test Plan

Run python-mypy and check for errors for a few python scripts

Diff Detail

Repository
R4911 python-typing-extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

algent created this revision.Thu, Feb 6, 10:05 PM
algent requested review of this revision.Thu, Feb 6, 10:05 PM

We're now on python 3.7. Is this still needed? Really don't want to accept a backport for a python version we already have.

algent added a comment.Fri, Feb 7, 5:59 PM

Hey @joebonrichie! While testing python-mypy i run into this error:

Traceback (most recent call last):
  File "/usr/bin/mypy", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'typing_extensions>=3.7.4' distribution was not found and is required by mypy

In python-mypy v760 changelog
They state:

Recommend typing_extensions instead of mypy_extensions for TypedDict (PR 8023)

This is their PR.

typing-extensions is a module of python-typing. Not sure if I should add python-typing as rundep for this package.

joebonrichie accepted this revision as: joebonrichie.Fri, Feb 7, 6:48 PM

Had a further look, looks like it needs python 3.8 to make use of the stdlib typing-extensions due to it's TypedDict usage. Seems good to me.

This revision is now accepted and ready to land.Fri, Feb 7, 6:48 PM
This revision was automatically updated to reflect the committed changes.