Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Relax ignore-missing-imports for modules that have stubs now and update mypy #11006

Merged
merged 15 commits into from
Oct 8, 2021

Commits on Oct 6, 2021

  1. Alphabetise mypy ignore-missing-imports section

    David Robertson committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    2665e77 View commit details
    Browse the repository at this point in the history
  2. typeshed has jsonschema stubs

    David Robertson committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    05bd370 View commit details
    Browse the repository at this point in the history
  3. pyOpenSSL has type stubs

    since at least here: python/typeshed#5649
    
    Two fixups to keep mypy happy.
    
    The first handles that `get_notAfter` could return None. Before this
    would raise a generic `AttributeError`; now it raises a ValueError with
    specific message.
    
    The second ensures the callback to `set_verify` returns bool, not
    NoneType. (AFAICS this was fine because PyOpenSSL only ever used the
    truthiness of the callback's return value.)
    David Robertson committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    faa1f10 View commit details
    Browse the repository at this point in the history
  4. Pillow has type stubs

    Had to make some more invasive changes to our media code. I replaced our
    naughty calls to `_getdecoder` with calls to [check_codec], introduced
    about seven years ago.
    
    [check_codec]: python-pillow/Pillow@799e831
    
    mypy didn't like our use of `_getexif`. The [Pillow 3.1.0 release
    notes][pillow-3.1] describe this as
    
    > private, experimental, but generally widely used
    
    There's a public `getexif()` without an underscore, but that's only
    available since [Pillow 6.0.0][pillow-6]
    
    [pillow-3.1]: https://pillow.readthedocs.io/en/stable/releasenotes/3.1.0.html#jpegimageplugin-getexif
    [pillow-6]: https://pillow.readthedocs.io/en/stable/releasenotes/6.0.0.html#added-exif-class
    David Robertson committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    db6001f View commit details
    Browse the repository at this point in the history
  5. Comment about the possibility of stubs existing

    David Robertson committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    e4a27c1 View commit details
    Browse the repository at this point in the history
  6. Changelog

    David Robertson committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    eec2cb0 View commit details
    Browse the repository at this point in the history
  7. pacakge->package, thanks Patrick!

    Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
    David Robertson and clokep authored Oct 6, 2021
    Configuration menu
    Copy the full SHA
    df7ffe5 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. Bump mypy version and pull in additional stubs

    I'm not sure why newer mypy requires these---perhaps it's a consequence
    of pulling in a newer mypy-zope?
    David Robertson committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    3844414 View commit details
    Browse the repository at this point in the history
  2. Make mypy happy by referring to struct_rusage

    David Robertson committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    ec73d78 View commit details
    Browse the repository at this point in the history
  3. Workaround python/mypy#6463

    David Robertson committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    e3e8756 View commit details
    Browse the repository at this point in the history
  4. Other mypy fixes

    David Robertson committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    4d0bc24 View commit details
    Browse the repository at this point in the history
  5. Pin mypy versions

    David Robertson committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    79fcc8c View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2021

  1. Update changelog

    David Robertson committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    e2ec76b View commit details
    Browse the repository at this point in the history
  2. Explicit error for spec is None

    David Robertson committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    57ba17d View commit details
    Browse the repository at this point in the history
  3. Comment about Debian buster

    David Robertson committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    6630fa2 View commit details
    Browse the repository at this point in the history