mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-44094: Remove deprecated PyErr_ APIs. (GH-26011)
These APIs are deprecated since Python 3.3. They are not documented too.
This commit is contained in:
		
							parent
							
								
									e0c614e5fd
								
							
						
					
					
						commit
						ae3c66acb8
					
				
					 3 changed files with 4 additions and 54 deletions
				
			
		|  | @ -776,17 +776,6 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename) | |||
|     return result; | ||||
| } | ||||
| 
 | ||||
| #ifdef MS_WINDOWS | ||||
| PyObject * | ||||
| PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename) | ||||
| { | ||||
|     PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL; | ||||
|     PyObject *result = PyErr_SetFromErrnoWithFilenameObjects(exc, name, NULL); | ||||
|     Py_XDECREF(name); | ||||
|     return result; | ||||
| } | ||||
| #endif /* MS_WINDOWS */ | ||||
| 
 | ||||
| PyObject * | ||||
| PyErr_SetFromErrno(PyObject *exc) | ||||
| { | ||||
|  | @ -887,20 +876,6 @@ PyObject *PyErr_SetExcFromWindowsErrWithFilename( | |||
|     return ret; | ||||
| } | ||||
| 
 | ||||
| PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename( | ||||
|     PyObject *exc, | ||||
|     int ierr, | ||||
|     const Py_UNICODE *filename) | ||||
| { | ||||
|     PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL; | ||||
|     PyObject *ret = PyErr_SetExcFromWindowsErrWithFilenameObjects(exc, | ||||
|                                                                  ierr, | ||||
|                                                                  name, | ||||
|                                                                  NULL); | ||||
|     Py_XDECREF(name); | ||||
|     return ret; | ||||
| } | ||||
| 
 | ||||
| PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr) | ||||
| { | ||||
|     return PyErr_SetExcFromWindowsErrWithFilename(exc, ierr, NULL); | ||||
|  | @ -924,17 +899,6 @@ PyObject *PyErr_SetFromWindowsErrWithFilename( | |||
|     return result; | ||||
| } | ||||
| 
 | ||||
| PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename( | ||||
|     int ierr, | ||||
|     const Py_UNICODE *filename) | ||||
| { | ||||
|     PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL; | ||||
|     PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObjects( | ||||
|                                                   PyExc_OSError, | ||||
|                                                   ierr, name, NULL); | ||||
|     Py_XDECREF(name); | ||||
|     return result; | ||||
| } | ||||
| #endif /* MS_WINDOWS */ | ||||
| 
 | ||||
| PyObject * | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Inada Naoki
						Inada Naoki