From 0dbc26bdc4d0d7054ab9b5b951efe15fc086bf88 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Sat, 1 May 2021 19:53:54 -0700 Subject: [PATCH 1/2] symbol: removed in py310 We still don't have a better way of doing this, right? --- stdlib/symbol.pyi | 176 +++++++++++++++++++++++----------------------- 1 file changed, 89 insertions(+), 87 deletions(-) diff --git a/stdlib/symbol.pyi b/stdlib/symbol.pyi index 6fbe306fabe9..4fd376e9e68d 100644 --- a/stdlib/symbol.pyi +++ b/stdlib/symbol.pyi @@ -1,90 +1,92 @@ from typing import Dict +import sys -single_input: int -file_input: int -eval_input: int -decorator: int -decorators: int -decorated: int -async_funcdef: int -funcdef: int -parameters: int -typedargslist: int -tfpdef: int -varargslist: int -vfpdef: int -stmt: int -simple_stmt: int -small_stmt: int -expr_stmt: int -annassign: int -testlist_star_expr: int -augassign: int -del_stmt: int -pass_stmt: int -flow_stmt: int -break_stmt: int -continue_stmt: int -return_stmt: int -yield_stmt: int -raise_stmt: int -import_stmt: int -import_name: int -import_from: int -import_as_name: int -dotted_as_name: int -import_as_names: int -dotted_as_names: int -dotted_name: int -global_stmt: int -nonlocal_stmt: int -assert_stmt: int -compound_stmt: int -async_stmt: int -if_stmt: int -while_stmt: int -for_stmt: int -try_stmt: int -with_stmt: int -with_item: int -except_clause: int -suite: int -test: int -test_nocond: int -lambdef: int -lambdef_nocond: int -or_test: int -and_test: int -not_test: int -comparison: int -comp_op: int -star_expr: int -expr: int -xor_expr: int -and_expr: int -shift_expr: int -arith_expr: int -term: int -factor: int -power: int -atom_expr: int -atom: int -testlist_comp: int -trailer: int -subscriptlist: int -subscript: int -sliceop: int -exprlist: int -testlist: int -dictorsetmaker: int -classdef: int -arglist: int -argument: int -comp_iter: int -comp_for: int -comp_if: int -encoding_decl: int -yield_expr: int -yield_arg: int +if sys.version_info < (3, 10): + single_input: int + file_input: int + eval_input: int + decorator: int + decorators: int + decorated: int + async_funcdef: int + funcdef: int + parameters: int + typedargslist: int + tfpdef: int + varargslist: int + vfpdef: int + stmt: int + simple_stmt: int + small_stmt: int + expr_stmt: int + annassign: int + testlist_star_expr: int + augassign: int + del_stmt: int + pass_stmt: int + flow_stmt: int + break_stmt: int + continue_stmt: int + return_stmt: int + yield_stmt: int + raise_stmt: int + import_stmt: int + import_name: int + import_from: int + import_as_name: int + dotted_as_name: int + import_as_names: int + dotted_as_names: int + dotted_name: int + global_stmt: int + nonlocal_stmt: int + assert_stmt: int + compound_stmt: int + async_stmt: int + if_stmt: int + while_stmt: int + for_stmt: int + try_stmt: int + with_stmt: int + with_item: int + except_clause: int + suite: int + test: int + test_nocond: int + lambdef: int + lambdef_nocond: int + or_test: int + and_test: int + not_test: int + comparison: int + comp_op: int + star_expr: int + expr: int + xor_expr: int + and_expr: int + shift_expr: int + arith_expr: int + term: int + factor: int + power: int + atom_expr: int + atom: int + testlist_comp: int + trailer: int + subscriptlist: int + subscript: int + sliceop: int + exprlist: int + testlist: int + dictorsetmaker: int + classdef: int + arglist: int + argument: int + comp_iter: int + comp_for: int + comp_if: int + encoding_decl: int + yield_expr: int + yield_arg: int -sym_name: Dict[int, str] + sym_name: Dict[int, str] From 3a70e5c253da6b1c2a18c2c9319f258f588dfb4e Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Sat, 1 May 2021 19:55:46 -0700 Subject: [PATCH 2/2] please isort --- stdlib/symbol.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/symbol.pyi b/stdlib/symbol.pyi index 4fd376e9e68d..036d3191452d 100644 --- a/stdlib/symbol.pyi +++ b/stdlib/symbol.pyi @@ -1,5 +1,5 @@ -from typing import Dict import sys +from typing import Dict if sys.version_info < (3, 10): single_input: int