fix(python): preserve marshal scalar identity and decode limits
This commit is contained in:
1 parent
a47788a6a4
commit
06032237c6
7 files changed
+164
-25
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import type { PYTHON_PYC_LIMIT_MAXIMA } from "../domain/python/pythonPyc.js";
|
||||
|
||||
/** Distinguish corrupt recognized pycs from magics outside parser coverage. */
|
||||
export class PythonPycFormatFailure extends Error {
|
||||
constructor(
|
||||
@@ -13,7 +15,9 @@ export class PythonPycFormatFailure extends Error {
|
||||
export class PythonPycResourceFailure extends Error {
|
||||
constructor(
|
||||
readonly boundary: "objects" | "depth" | "string",
|
||||
readonly reported_limits: Readonly<Record<string, number>>,
|
||||
readonly reported_limits: Readonly<
|
||||
Partial<Record<keyof typeof PYTHON_PYC_LIMIT_MAXIMA, number>>
|
||||
>,
|
||||
message: string,
|
||||
) {
|
||||
super(message);
|
||||
|
||||
Reference in new issue
Block a user