black icon indicating copy to clipboard operation
black copied to clipboard

Upcoming aiohttp 4.0 is breaking our test suite with a new deprecation warning

Open ichard26 opened this issue 2 years ago • 6 comments

See https://github.com/ichard26/black-deps-ci/runs/7374216061?check_suite_focus=true. We can either bump the lower bound requirement for aiohttp, or we can reuse the approach taken in https://github.com/psf/black/pull/2974/ for a similar issue. I'll note that aiohttp 4.0 is still under development so breakage will come later, but eventually :)

cc @zsol we should probably configure pytest to not error out on warnings when running under mypy_primer since it'd be pointless busywork and noise for them.

ichard26 avatar Jul 17 '22 01:07 ichard26

cc @zsol we should probably configure pytest to not error out on warnings when running under mypy_primer since it'd be pointless busywork and noise for them.

Does mypy_primer run the black test suite?

graingert avatar Jul 18 '22 13:07 graingert

@graingert There's a PR to make it do so: https://github.com/hauntsaninja/mypy_primer/pull/41

ichard26 avatar Jul 18 '22 15:07 ichard26

Nah that mypy primer test should probably do something more trivial than running our test suite. Like maybe running black --check .

zsol avatar Jul 18 '22 21:07 zsol

So @ichard26 what is required to fix this, I can work on it.

shivamdurgbuns avatar Jul 29 '22 19:07 shivamdurgbuns

@shivamdurgbuns simplist fix is to append the relevant ignore to filterwarnings https://github.com/psf/black/blob/main/pyproject.toml#L51

You can also use a try/catch to see if the deprecated attribute is still present and then note the mitigation in the filterwarnings comment

graingert avatar Jul 29 '22 19:07 graingert

@graingert Understood! Will do accordingly.

shivamdurgbuns avatar Jul 29 '22 20:07 shivamdurgbuns