Anthony Sottile

Results 862 comments of Anthony Sottile

yeah I didn't say they're modifying the `sys.std*` references, I was very careful to say "assigning globals _**to**_ `sys.std*` streams" ;) -- `logging` is all sneaky global variables after all

I can't remember how to make it outright crash, but this is close: ```python import logging import sys logger = logging.getLogger(__name__) def test(capsys): logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.DEBUG) def test2(): logger.error('ohai') ``` ```console...

there isn't really beyond what you've already done :) "I want to work on this" is usually sufficient!

if you need specific help let us know, would be happy to guide you through!

imo making it "just work" is not the correct solution here -- the code which triggers this has a bug (it leaks global state as a side-effect of the test)....

I have a fix in #2228 though I'm struggling to write a test to demonstrate the problem -- if you know of some way to force a round of deferral...

figured out a way to force deferral! found an example with a `metaclass` in mypy which seems to do the trick!

once mypy 1.11 lands I will merge this \o/

@b-long try importing more than one of your extensions into the same process and call functions from both of them in a loop on macos x86_64 and you'll see exactly...

what don't you understand? what are you confused about?