argparse को 2.x से 3.x पर अपग्रेड करना
argparse 2.0.1 और 3.0.4 के सार्वजनिक API की तुलना, उनके TypeScript टाइप से अपने-आप निकाली गई। बदला हुआ सिग्नेचर संभावित असंगत बदलाव है, निश्चितता नहीं।
सारांश
| हटाए गए इम्पोर्ट पाथ | 0 |
|---|---|
| हटाए गए एक्सपोर्ट | 1 |
| बदले गए सिग्नेचर | 18 |
| क्लास या इंटरफ़ेस के हटाए गए सदस्य | 1 |
| क्लास या इंटरफ़ेस के बदले गए सदस्य | 45 |
| नए डिप्रिकेटेड | 0 |
| आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ) | 0 |
| नए एक्सपोर्ट | 24 |
हटाए गए एक्सपोर्ट
| import | export | kind | पहले |
|---|---|---|---|
argparse | SubParser | class | class |
बदले गए सिग्नेचर
| export | पहले | बाद में |
|---|---|---|
argparse · Action | class | interface |
argparse · PARSER | string | "A..." |
argparse · OPTIONAL | string | "?" |
argparse · SUPPRESS | string | "==SUPPRESS==" |
argparse · Namespace | class | interface |
argparse · REMAINDER | string | "..." |
argparse · ONE_OR_MORE | string | "+" |
argparse · ZERO_OR_MORE | string | "*" |
argparse · ArgumentError | class | interface |
argparse · ArgumentGroup | class | interface |
argparse · HelpFormatter | class | interface |
argparse · ArgumentParser | class | interface |
argparse · ArgumentTypeError | class | interface |
argparse · RawTextHelpFormatter | class | interface |
argparse · BooleanOptionalAction | class | interface |
argparse · ActionConstructorOptions | number & { _: "ActionConstructorOptions"; } | interface |
argparse · RawDescriptionHelpFormatter | class | interface |
argparse · ArgumentDefaultsHelpFormatter | class | interface |
क्लास या इंटरफ़ेस के हटाए गए सदस्य
| member | import | पहले |
|---|---|---|
ArgumentGroup.add_argument_group | argparse | (options?: ArgumentGroupOptions | undefined): ArgumentGroup |
क्लास या इंटरफ़ेस के बदले गए सदस्य
| member | पहले | बाद में |
|---|---|---|
Action.call | (parser: ArgumentParser, namespace: Namespace, values: string | string[], optionString: string | null): void | (parser: ArgumentParser, namespace: Namespace, values: unknown, option_string?: string | undefined): void |
Action.constructor | (options: ActionConstructorOptions): Action | |
Namespace.constructor | (options: object): Namespace | |
ArgumentError.constructor | (argument: Action, message: string): ArgumentError | |
ArgumentGroup.constructor | (): ArgumentGroup | |
ArgumentGroup.get_default | (dest: string): any | (dest: string): unknown |
ArgumentGroup.add_argument | (arg: string, options?: ArgumentOptions | undefined): void | (arg1: string, arg2: string, options?: ArgumentOptions | undefined): void | (name: string, ...names: string[]): Action | (name: string, ...namesAndOptions: [...string[], ArgumentOptions]): Action |
ArgumentGroup.set_defaults | (options?: {} | undefined): void | (options: object): void |
ArgumentGroup.add_mutually_exclusive_group | (options?: { required: boolean; } | undefined): ArgumentGroup | (options?: MutuallyExclusiveGroupOptions | undefined): MutuallyExclusiveGroup |
HelpFormatter.constructor | (): HelpFormatter | |
ArgumentParser.exit | (status: number, message: string): void | (status?: number | undefined, message?: string | undefined): void |
ArgumentParser.error | (err: string | Error): void | (message: string): void |
ArgumentParser.parse_args | (args?: string[] | undefined, ns?: object | Namespace | undefined): any | <T extends object = Namespace>(args?: string[] | undefined, namespace?: T | undefined): T |
ArgumentParser.print_help | (): void | (file?: Writable | undefined): void |
ArgumentParser.constructor | (options?: ArgumentParserOptions | undefined): ArgumentParser | |
ArgumentParser.get_default | (dest: string): any | (dest: string): unknown |
ArgumentParser.print_usage | (): void | (file?: Writable | undefined): void |
ArgumentParser.add_argument | (arg: string, options?: ArgumentOptions | undefined): void | (arg1: string, arg2: string, options?: ArgumentOptions | undefined): void | (name: string, ...names: string[]): Action | (name: string, ...namesAndOptions: [...string[], ArgumentOptions]): Action |
ArgumentParser.set_defaults | (options?: {} | undefined): void | (options: object): void |
ArgumentParser.add_subparsers | (options?: SubparserOptions | undefined): SubParser | (options?: SubparserOptions | undefined): SubparsersAction |
ArgumentParser.parse_known_args | (args?: string[] | undefined, ns?: object | Namespace | undefined): any[] | <T extends object = Namespace>(args?: string[] | undefined, namespace?: T | undefined): [T, string[]] |
ArgumentParser.add_argument_group | (options?: ArgumentGroupOptions | undefined): ArgumentGroup | (options?: ArgumentGroupOptions | undefined): ArgumentGroup | (title?: string | undefined, description?: string | undefined): ArgumentGroup |
ArgumentParser.parse_intermixed_args | (args?: string[] | undefined, ns?: object | Namespace | undefined): any | <T extends object = Namespace>(args?: string[] | undefined, namespace?: T | undefined): T |
ArgumentParser.convert_arg_line_to_args | (argLine: string): string[] | (arg_line: string): string[] |
ArgumentParser.parse_known_intermixed_args | (args?: string[] | undefined, ns?: object | Namespace | undefined): any[] | <T extends object = Namespace>(args?: string[] | undefined, namespace?: T | undefined): [T, string[]] |
ArgumentParser.add_mutually_exclusive_group | (options?: { required: boolean; } | undefined): ArgumentGroup | (options?: MutuallyExclusiveGroupOptions | undefined): MutuallyExclusiveGroup |
ArgumentOptions.type | string | Function | undefined | ArgumentType | undefined |
ArgumentOptions.const | any | unknown |
ArgumentOptions.nargs | string | number | undefined | Nargs | undefined |
ArgumentOptions.action | string | (new (options: ActionConstructorOptions) => Action) | undefined | string | ActionClass | undefined |
ArgumentOptions.choices | string | string[] | undefined | string | object | readonly unknown[] | undefined |
ArgumentOptions.default | any | unknown |
SubparserOptions.action | string | undefined | string | ActionClass | undefined |
SubparserOptions.parser_class | (new () => any) | undefined | ArgumentParserClass | undefined |
ArgumentTypeError.constructor | (message: string): ArgumentTypeError | |
ArgumentGroupOptions.argument_default | any | unknown |
RawTextHelpFormatter.constructor | (): RawTextHelpFormatter | |
ArgumentParserOptions.formatter_class | (new () => HelpFormatter | ArgumentDefaultsHelpFormatter | RawDescriptionHelpFormatter | RawTextHelpFormatter) | undefined | HelpFormatterFactory | undefined |
ArgumentParserOptions.argument_default | any | unknown |
BooleanOptionalAction.call | (parser: ArgumentParser, namespace: Namespace, values: string | string[], optionString: string | null): void | (parser: ArgumentParser, namespace: Namespace, values: unknown, option_string?: string | undefined): void |
BooleanOptionalAction.constructor | (options: ActionConstructorOptions): BooleanOptionalAction | |
SubArgumentParserOptions.formatter_class | (new () => HelpFormatter | ArgumentDefaultsHelpFormatter | RawDescriptionHelpFormatter | RawTextHelpFormatter) | undefined | HelpFormatterFactory | undefined |
SubArgumentParserOptions.argument_default | any | unknown |
RawDescriptionHelpFormatter.constructor | (): RawDescriptionHelpFormatter | |
ArgumentDefaultsHelpFormatter.constructor | (): ArgumentDefaultsHelpFormatter | |
नए डिप्रिकेटेड
कुछ नहीं मिला।
आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)
कुछ नहीं मिला।
नए एक्सपोर्ट (24)
| import | export | kind |
|---|---|---|
argparse | Nargs | type |
argparse | FileType | interface |
argparse | Writable | interface |
argparse | ActionClass | interface |
argparse | ArgumentType | type |
argparse | FileTypeResult | interface |
argparse | FileTypeOptions | interface |
argparse | ActionsContainer | interface |
argparse | SubparsersAction | interface |
argparse | ActionConstructor | interface |
argparse | HelpFormatterClass | interface |
argparse | ArgumentParserClass | interface |
argparse | FileTypeConstructor | interface |
argparse | HelpFormatterFactory | type |
argparse | HelpFormatterOptions | interface |
argparse | NamespaceConstructor | interface |
argparse | MutuallyExclusiveGroup | interface |
argparse | ArgumentErrorConstructor | interface |
argparse | HelpFormatterConstructor | interface |
argparse | MetavarTypeHelpFormatter | interface |
argparse | ArgumentParserConstructor | interface |
argparse | ArgumentTypeErrorConstructor | interface |
argparse | MutuallyExclusiveGroupOptions | interface |
argparse | BooleanOptionalActionConstructor | interface |
अपने AI एजेंट को ये तथ्य दें
Vigia एक मुफ़्त MCP सर्वर है: आपका कोडिंग एजेंट कोड लिखने से पहले वर्ज़न, ब्रेकिंग बदलाव और कमज़ोरियाँ जाँचता है। न साइनअप, न API कुंजी।
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Cursor में जोड़ेंVS Code में जोड़ें★ GitHub पर स्टार दें
कोई भी दूसरा MCP क्लाइंट
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }एजेंट स्किल (SKILL.md): एजेंट को बताती है कि Vigia कब इस्तेमाल करना है · पुल रिक्वेस्ट के लिए GitHub Action
अक्सर पूछे जाने वाले प्रश्न
argparse को 2 से 3 पर अपग्रेड करने पर कौन-से असंगत बदलाव हैं?
argparse 2.0.1 और 3.0.4 के बीच Vigia को 1 हटाए गए एक्सपोर्ट, 18 बदले गए सिग्नेचर और 46 हटाए या बदले गए क्लास/इंटरफ़ेस सदस्य मिले।
argparse 3 में क्या डिप्रिकेट हुआ?
argparse 3.0.4 में 0 एक्सपोर्ट या सदस्य नए रूप से डिप्रिकेटेड चिह्नित हैं।
एजेंटों के लिए
GET https://vigia.coredls.cloud/v1/packages/npm/argparse/upgrade?from=2.0.1&to=3.0.4