mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2025-10-24 21:14:00 -07:00 
			
		
		
		
	Fix AST nodes for Python 3 and enable dependent test_uri (#18597)
* Enable tests on python 3 for uri * Added one more node type to SAFE_NODES into safe_eval module. ast.USub represents unary operators. This is necessary for parsing some unusual but still valid JSON files during testing with Python 3.
This commit is contained in:
		
					parent
					
						
							
								b915e790d3
							
						
					
				
			
			
				commit
				
					
						84544ee8fd
					
				
			
		
					 2 changed files with 1 additions and 1 deletions
				
			
		|  | @ -69,6 +69,7 @@ def safe_eval(expr, locals={}, include_exceptions=False): | |||
|             ast.Name, | ||||
|             ast.Str, | ||||
|             ast.Sub, | ||||
|             ast.USub, | ||||
|             ast.Tuple, | ||||
|             ast.UnaryOp, | ||||
|         ) | ||||
|  |  | |||
|  | @ -1,3 +1,2 @@ | |||
| test_hg | ||||
| test_service | ||||
| test_uri | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue