mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (#3219)
This commit is contained in:
		
							parent
							
								
									8337239d79
								
							
						
					
					
						commit
						91fb0afe18
					
				
					 3 changed files with 40 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -893,9 +893,7 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds)
 | 
			
		|||
        }
 | 
			
		||||
 | 
			
		||||
        /* Split the source into lines. */
 | 
			
		||||
        source_list = PyObject_CallMethodObjArgs(source,
 | 
			
		||||
                                                 PyId_splitlines.object,
 | 
			
		||||
                                                 NULL);
 | 
			
		||||
        source_list = PyUnicode_Splitlines(source, 0);
 | 
			
		||||
        Py_DECREF(source);
 | 
			
		||||
        if (!source_list)
 | 
			
		||||
            return NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue