Skip to content

Conversation

@thomasmaclean
Copy link

@thomasmaclean thomasmaclean commented Apr 7, 2023

Backport of #2661, which addresses a thread-safety issue where accessing a PoolManager with many distinct origins would cause connection pools to be closed while requests are in progress. #1252 causes issues in multiprocessing workflows for dependent libraries like requests etc.

@sethmlarson
Copy link
Member

@thomasmaclean Thanks for opening this PR, unfortunately this release stream still supports Python 2.7 so you'll need to find an alternative to weakref.finalize, maybe there's an existing work-around for this?

@thomasmaclean
Copy link
Author

thomasmaclean commented Apr 10, 2023

@thomasmaclean Thanks for opening this PR, unfortunately this release stream still supports Python 2.7 so you'll need to find an alternative to weakref.finalize, maybe there's an existing work-around for this?

I'm backporting the CPython version of finalize as it's pretty portable the way it's written. I tried to copy the pattern used for backports_makefile but please let me know if there's a better way to do what I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants