As of GDAL 3 I've started seeing warnings written to stderr on open, such as:
It's possible that these datasets have malformed projection information, but in cases where I don't care I'd like to be able to silence these types of warnings, as they can easily be emitted hundreds of times. However I can't find a way to do so.
Using an Env() context with CPL_DEBUG set to os.devnull has no effect, nor does redirecting sys.stderr itself. It also doesn't look like this is being emitted through the logging module. So it seems like the underlying library itself may be writing to stderr? I don't know if this is a rasterio issue, a gdal issue, or a proj issue.
Any pointers are appreciated.