mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed searching for binary Python 3.5 modules on Mac OS X (PY-17282)
Our binary module regexp was special-cased for the '-linux-gnu' suffix and didn't take into account other variants.
This commit is contained in:
@@ -783,7 +783,7 @@ MAC_SKIP_MODULES = ["test", "ctypes/test", "distutils/tests", "email/test",
|
||||
|
||||
POSIX_SKIP_MODULES = ["vtemodule", "PAMmodule", "_snackmodule", "/quodlibet/_mmkeys"]
|
||||
|
||||
BIN_MODULE_FNAME_PAT = re.compile('([a-zA-Z_]+[0-9a-zA-Z]*)\\.(?:pyc|pyo|(?:[a-zA-Z_]+-\\d\\d[a-zA-Z]*\\.|.+-linux-gnu\\.)?(?:so|pyd))')
|
||||
BIN_MODULE_FNAME_PAT = re.compile('([a-zA-Z_]+[0-9a-zA-Z]*)\\.(?:pyc|pyo|(?:[a-zA-Z_]+-\\d\\d[a-zA-Z]*(?:-[a-zA-Z_0-9\-]+)?\\.)?(?:so|pyd))')
|
||||
# possible binary module filename: letter, alphanum architecture per PEP-3149
|
||||
TYPELIB_MODULE_FNAME_PAT = re.compile("([a-zA-Z_]+[0-9a-zA-Z]*)[0-9a-zA-Z-.]*\\.typelib")
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import binascii
|
||||
import <error descr="No module named nonexistent">nonexistent</error>
|
||||
|
||||
|
||||
print(binascii, nonexistent)
|
||||
@@ -175,6 +175,24 @@ public class PythonSkeletonsTest extends PyEnvTestCase {
|
||||
});
|
||||
}
|
||||
|
||||
// PY-17282
|
||||
public void testBinaryStandardModule() {
|
||||
runTest(new SkeletonsTask() {
|
||||
@Override
|
||||
protected void runTestOn(@NotNull Sdk sdk) {
|
||||
myFixture.configureByFile(getTestName(false) + ".py");
|
||||
myFixture.enableInspections(PyUnresolvedReferencesInspection.class);
|
||||
|
||||
edt(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
myFixture.checkHighlighting(true, false, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void runTest(@NotNull PyTestTask task) {
|
||||
runPythonTest(task);
|
||||
|
||||
Reference in New Issue
Block a user