gh-121111: Fix `zipimport` incorrectly dealing with namespace packages
- Issue: gh-121111
This fix worked, Thank you so much.
This fix worked, Thank you so much.
@AraHaan It just work, did not be fixed. Run the test to confirm.
This fix worked, Thank you so much.
@AraHaan It just work, did not be fixed. Run the test to confirm.
It seems to work when backported to 3.12 for me.
@serhiy-storchaka Could you take look at the testcase and patch?
Can confirm that the test written by @SeaHOH continues to fail on the new patch. There were two bugs at play here, I only patched one of them (my original test case fails on the main branch, as of now).
The underlying problem is not directly with _is_dir, but it's that _read_directory doesn't have a way to represent empty directories. AFAIK, find_spec is only affected by this now.
Sorry for my English is so bad. Seems #121233 fixed the bug.