mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Fix SF bug [ #450909 ] __future__.division fails at prompt
When code is compiled and compiler flags are passed in, be sure to update cf_flags with any features defined by future statements in the compiled code.
This commit is contained in:
		
							parent
							
								
									80e36750c8
								
							
						
					
					
						commit
						481081e369
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -4027,8 +4027,12 @@ jcompile(node *n, char *filename, struct compiling *base, | |||
| 			com_free(&sc); | ||||
| 			return NULL; | ||||
| 		} | ||||
| 		if (flags) | ||||
| 			sc.c_future->ff_features |= flags->cf_flags; | ||||
| 		if (flags) { | ||||
| 			int merged = sc.c_future->ff_features | | ||||
| 				flags->cf_flags; | ||||
| 			sc.c_future->ff_features = merged; | ||||
| 			flags->cf_flags = merged; | ||||
| 		} | ||||
| 		if (symtable_build(&sc, n) < 0) { | ||||
| 			com_free(&sc); | ||||
| 			return NULL; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Hylton
						Jeremy Hylton