Restrict filename parameter of compile() (and other stdlib functions wrapping compile()) to take bytes, not Buffer. (#14847)

This commit is contained in:
Thanos
2025-10-08 10:32:16 -04:00
committed by GitHub
parent 12e7d4e9cf
commit be7e7c5e2b
4 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class InspectLoader(Loader):
def exec_module(self, module: types.ModuleType) -> None: ...
@staticmethod
def source_to_code(
data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive, path: ReadableBuffer | StrPath = "<string>"
data: ReadableBuffer | str | _ast.Module | _ast.Expression | _ast.Interactive, path: bytes | StrPath = "<string>"
) -> types.CodeType: ...
class ExecutionLoader(InspectLoader):