pytest-dev / apipkg

MIT License
55 stars 17 forks source link

Fix race condition for import of modules which use apipkg in Python 3.3+ #27

Closed GlenWalker closed 2 years ago

GlenWalker commented 2 years ago

Update existing module in-place rather than replacing in sys.modules with a new ApiModule instance

This race condition exists for import statements (and __import__) in Python 3.3+ where sys.modules is checked before obtaining an import lock, and for importlib.import_module in Python 3.11+ for the same reason.

RonnyPfannschmidt commented 2 years ago

yikes ^^

GlenWalker commented 2 years ago

It looks like there was an "Internal Server Error" while running the GitHub actions for your merge, so they never finished. Is it possible to re-run them?