Backport PR #33645, #33632 and #34087 on branch 1.0.x
xref #33645, #33632 and #34087

fix test_s3_roundtrip failure on branch 1.0.x https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=35271&view=logs&j=98c84d08-34d8-513e-80be-2c581992dd5a&t=f75024c1-aff0-57fb-4f0e-35923b654e09