mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (#124999)
Co-authored-by: Wulian <xiguawulian@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 6a08a753b7)
			
			
This commit is contained in:
		
							parent
							
								
									cbcdf34a4b
								
							
						
					
					
						commit
						d54dbd62cc
					
				
					 4 changed files with 40 additions and 5 deletions
				
			
		|  | @ -174,7 +174,13 @@ def _excepthook(self, typ, value, tb): | |||
| 
 | ||||
|     def runsource(self, source, filename="<input>", symbol="single"): | ||||
|         try: | ||||
|             tree = ast.parse(source) | ||||
|             tree = self.compile.compiler( | ||||
|                 source, | ||||
|                 filename, | ||||
|                 "exec", | ||||
|                 ast.PyCF_ONLY_AST, | ||||
|                 incomplete_input=False, | ||||
|             ) | ||||
|         except (SyntaxError, OverflowError, ValueError): | ||||
|             self.showsyntaxerror(filename, source=source) | ||||
|             return False | ||||
|  | @ -185,7 +191,7 @@ def runsource(self, source, filename="<input>", symbol="single"): | |||
|             the_symbol = symbol if stmt is last_stmt else "exec" | ||||
|             item = wrapper([stmt]) | ||||
|             try: | ||||
|                 code = self.compile.compiler(item, filename, the_symbol, dont_inherit=True) | ||||
|                 code = self.compile.compiler(item, filename, the_symbol) | ||||
|             except SyntaxError as e: | ||||
|                 if e.args[0] == "'await' outside function": | ||||
|                     python = os.path.basename(sys.executable) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nice Zombies
						Nice Zombies