Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
/pythonnetPublic archive
forked frompythonnet/pythonnet

Commit26f1438

Browse files
authored
Alternative Fix forpythonnet#182 (pythonnet#231)
1 parent7fcf401 commit26f1438

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/runtime/importhook.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,15 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw)
246246
// and it was NOT an ImportError; bail out here.
247247
returnIntPtr.Zero;
248248
}
249+
250+
if(mod_name==string.Empty)
251+
{
252+
// Most likely a missing relative import.
253+
// For example site-packages\bs4\builder\__init__.py uses it to check if a package exists:
254+
// from . import _html5lib
255+
// We don't support them anyway
256+
returnIntPtr.Zero;
257+
}
249258
// Otherwise, just clear the it.
250259
Exceptions.Clear();
251260
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp