mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Removed unnecessary wrapping of __bytes__ in proxy class in lazy().
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							c7ba2e3cbb
						
					
				
				
					commit
					459f30f73e
				
			| @@ -126,8 +126,6 @@ def lazy(func, *resultclasses): | ||||
|                     "Cannot call lazy() with both bytes and text return types." | ||||
|                 ) | ||||
|  | ||||
|             if cls._delegate_bytes: | ||||
|                 cls.__bytes__ = cls.__bytes_cast | ||||
|  | ||||
|         @classmethod | ||||
|         def __promise__(cls, method_name): | ||||
| @@ -140,9 +138,6 @@ def lazy(func, *resultclasses): | ||||
|  | ||||
|             return __wrapper__ | ||||
|  | ||||
|         def __bytes_cast(self): | ||||
|             return bytes(func(*self.__args, **self.__kw)) | ||||
|  | ||||
|         def __cast(self): | ||||
|             return func(*self.__args, **self.__kw) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user