New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add test for changed portions after reloading a namespace package #63910
Comments
A related addition (Lib/test/test_importlib/test_api.py - test_reload_namespace_changed): changeset: 86819:88c3a1a3c2ff3c3ab3f2bd77f0d5d5e5c1b37afa |
Here's a patch that adds the test. However, the test is failing and my gut's telling me it's a legitimate failure. I'll verify as soon as I have a chance and open a new issue if it is legit (i.e. a regression in 3.4, albeit an unlikely corner case). Thanks for suggesting the test, Nick! |
Well, the same patch (modulo adjusting to apply cleanly) fails in exactly the same way in 3.3. So either the test isn't right or namespace packages have never supported reload in this way. I'll keep investigating. |
Regarding this issue, keep in mind that namespace packages have a dynamic __path__ which already updates (effectively) when new portions are added to sys.path. So we just need to make sure that reloading does not break that. To that end, here's a much simpler patch (with passing tests) that verifies that PEP-451 did not break anything here. |
Latest patch LGTM. Can we have a patch review please as bpo-18864 is dependent on this. |
Do we still need this patch, Eric? |
To echo Brett's question, do we still need this patch, Eric? |
New changeset c22ec7a45114 by Eric Snow in branch 'default': |
I've gone ahead and pushed the patch. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: