mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	In stdlib, use hashlib instead of deprecated md5 and sha modules.
This commit is contained in:
		
							parent
							
								
									fa42bd7af4
								
							
						
					
					
						commit
						bffb0bc064
					
				
					 6 changed files with 16 additions and 17 deletions
				
			
		|  | @ -2,7 +2,6 @@ | |||
| # Since we don't have them, this test checks only a few codepoints. | ||||
| 
 | ||||
| from test.test_support import verify, vereq | ||||
| import sha | ||||
| 
 | ||||
| import stringprep | ||||
| from stringprep import * | ||||
|  | @ -73,6 +72,7 @@ | |||
| # unicode database. Instead, stringprep.py asserts the version of | ||||
| # the database. | ||||
| 
 | ||||
| # import hashlib | ||||
| # predicates = [k for k in dir(stringprep) if k.startswith("in_table")] | ||||
| # predicates.sort() | ||||
| # for p in predicates: | ||||
|  | @ -83,6 +83,6 @@ | |||
| #         if f(unichr(i)): | ||||
| #             data[i] = "1" | ||||
| #     data = "".join(data) | ||||
| #     h = sha.sha() | ||||
| #     h = hashlib.sha1() | ||||
| #     h.update(data) | ||||
| #     print p,h.hexdigest() | ||||
| #     print p, h.hexdigest() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl