Page MenuHomeSolus

Fix and update python-mypy to 0.761
ClosedPublic

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

Details

Summary

Changelog:

0.720
0.730
0.740
0.750
0.761

Package update:

  • Adding typeshed by using pypi tarball. This is required by mypy to check python scripts.
  • Fixed rundeps
  • Add project homepage

Depends on D8187 D8209

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

Test Plan

Check for errors in pythons scripts located in mypy/test-data/samples/

Diff Detail

Repository
R4582 python-mypy
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:08 PM
algent requested review of this revision.Thu, Feb 6, 10:08 PM
JoshStrobl requested changes to this revision.Fri, Feb 7, 6:30 PM
JoshStrobl added a subscriber: JoshStrobl.

Can you test thonny against this as well please? Otherwise LGTM.

This revision now requires changes to proceed.Fri, Feb 7, 6:30 PM
algent added a comment.Fri, Feb 7, 7:34 PM

Run some scripts and they are running fine in graphical thonny output.

algent requested review of this revision.Fri, Feb 7, 7:37 PM
JoshStrobl requested changes to this revision.Sat, Feb 8, 5:56 PM
JoshStrobl added inline comments.
package.yml
15

This will create circular dependency issues. python-mypy_extensions depends (and should depend on) python-mypy, not the other way around.

This revision now requires changes to proceed.Sat, Feb 8, 5:56 PM
algent requested review of this revision.EditedSat, Feb 8, 8:29 PM

While doing my tests running some sample scripts from python-mypy folder I run into an error like this:

$ mypy bottles.py 
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 'mypy_extensions<0.5.0,>=0.4.3' distribution was not found and is required by mypy

Installed python-mypy-extensions later and get another error, because there were still some other rundependencies needed like python-typed-ast and python-typing-extensions.

In the end:

$ mypy bottles.py
Success: no issues found in 1 source file
$ mypy *.py
Success: no issues found in 14 source files

Did a research on other distros and found they too placed python-mypy-extensions as rundependency of python-mypy.

Also here python-mypy developers stated what are the requirements.

In that case, python-mypy_extensions needs to have python-mypy removed as a rundep.

algent edited the summary of this revision. (Show Details)Sun, Feb 9, 10:01 AM
algent added a parent revision: D8209: Remove python-mypy rundep..
JoshStrobl accepted this revision.Wed, Feb 19, 7:29 AM

LGTM, thanks!

This revision is now accepted and ready to land.Wed, Feb 19, 7:29 AM
This revision was automatically updated to reflect the committed changes.