mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-43931: Export Python version as API data (GH-25577)
When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...). Automerge-Triggered-By: GH:pablogsal
This commit is contained in:
		
							parent
							
								
									da3cf4304f
								
							
						
					
					
						commit
						50669083fe
					
				
					 12 changed files with 34 additions and 0 deletions
				
			
		|  | @ -13,3 +13,6 @@ Py_GetVersion(void) | |||
|                   PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); | ||||
|     return version; | ||||
| } | ||||
| 
 | ||||
| // Export the Python hex version as a constant.
 | ||||
| const unsigned long Py_Version = PY_VERSION_HEX; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gabriele N. Tornetta
						Gabriele N. Tornetta