mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	gh-125331: Allow the parser to activate future imports on the fly (#125482)
This commit is contained in:
		
							parent
							
								
									05e89c34bd
								
							
						
					
					
						commit
						3bd3e09588
					
				
					 6 changed files with 50 additions and 2 deletions
				
			
		
							
								
								
									
										2
									
								
								Parser/parser.c
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								Parser/parser.c
									
										
									
										generated
									
									
									
								
							|  | @ -3360,7 +3360,7 @@ import_from_rule(Parser *p) | |||
|             UNUSED(_end_lineno); // Only used by EXTRA macro
 | ||||
|             int _end_col_offset = _token->end_col_offset; | ||||
|             UNUSED(_end_col_offset); // Only used by EXTRA macro
 | ||||
|             _res = _PyAST_ImportFrom ( b -> v . Name . id , c , _PyPegen_seq_count_dots ( a ) , EXTRA ); | ||||
|             _res = _PyPegen_checked_future_import ( p , b -> v . Name . id , c , _PyPegen_seq_count_dots ( a ) , EXTRA ); | ||||
|             if (_res == NULL && PyErr_Occurred()) { | ||||
|                 p->error_indicator = 1; | ||||
|                 p->level--; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pablo Galindo Salgado
						Pablo Galindo Salgado