fastapi-azure-auth icon indicating copy to clipboard operation
fastapi-azure-auth copied to clipboard

feat: add asyncio.Lock to prevent concurrent refreshes

Open davidhuser opened this issue 9 months ago • 6 comments

implementation of #233

davidhuser avatar Feb 24 '25 14:02 davidhuser

looks like Python 3.9 is not having it 🤡

davidhuser avatar Feb 24 '25 14:02 davidhuser

Not sure about the root cause but I am not investing more time for a 3.9-specific workaround given its reaching the end of support in October, so until then this PR can wait I hope.

davidhuser avatar Apr 23 '25 10:04 davidhuser

Yeah, I suspected so. I wouldn't bother either☺️
Let's keep it open and merge with 3.9 deprecation.

JonasKs avatar Apr 23 '25 10:04 JonasKs

Seems like pydantic-core is no longer supporting 3.9, so I think we can remove support too. So if you’d like to resurrect this PR with removal of 3.9 support, I’d be happy to merge ☺️

JonasKs avatar Jun 05 '25 14:06 JonasKs

I removed Python 3.9 and added 3.13 for tests, and made the 3.12 the "default". Due to a pytest plugin error in CI for 3.13 I went ahead and upgraded all dev dependencies.

Now I have two issues I'm not sure how to solve and where I need your input @JonasKs :

  1. linting fails due to fix end of files but it passes with the same config on my local machine.
  2. this test fails with the wrong reponse ("no signing keys found"), but I don't understand the logic or why that test passed previously. The test run also notices that it actually was never mocked. And the function name is slightly confusing (since it's about error not old config).

davidhuser avatar Jun 10 '25 13:06 davidhuser

I'll try to look into this further this weekend, but it seems like the tests only fails when all tests are run, not when just that test is run. I suspect something is leaking between tests

JonasKs avatar Jun 17 '25 11:06 JonasKs