| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,14 +91,6 @@ PyAPI_FUNC(void) _PyErr_GetExcInfo(PyThreadState *, PyObject **, PyObject **, Py | |||
| 91 | 91 | ||
| 92 | 92 | PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *); | |
| 93 | 93 | ||
| 94 | - /* Convenience functions */ | ||
| 95 | - | ||
| 96 | - #ifdef MS_WINDOWS | ||
| 97 | - Py_DEPRECATED(3.3) | ||
| 98 | - PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( | ||
| 99 | - PyObject *, const Py_UNICODE *); | ||
| 100 | - #endif /* MS_WINDOWS */ | ||
| 101 | - | ||
| 102 | 94 | /* Like PyErr_Format(), but saves current exception as __context__ and | |
| 103 | 95 | __cause__. | |
| 104 | 96 | */ | |
@@ -108,16 +100,6 @@ PyAPI_FUNC(PyObject *) _PyErr_FormatFromCause( | |||
| 108 | 100 | ... | |
| 109 | 101 | ); | |
| 110 | 102 | ||
| 111 | - #ifdef MS_WINDOWS | ||
| 112 | - /* XXX redeclare to use WSTRING */ | ||
| 113 | - Py_DEPRECATED(3.3) | ||
| 114 | - PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename( | ||
| 115 | - int, const Py_UNICODE *); | ||
| 116 | - Py_DEPRECATED(3.3) | ||
| 117 | - PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename( | ||
| 118 | - PyObject *,int, const Py_UNICODE *); | ||
| 119 | - #endif | ||
| 120 | - | ||
| 121 | 103 | /* In exceptions.c */ | |
| 122 | 104 | ||
| 123 | 105 | /* Helper that attempts to replace the current exception with one of the | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,4 @@ | |||
| 1 | + Remove ``PyErr_SetFromErrnoWithUnicodeFilename()``, | ||
| 2 | + ``PyErr_SetFromWindowsErrWithUnicodeFilename()``, and | ||
| 3 | + ``PyErr_SetExcFromWindowsErrWithUnicodeFilename()``. They are not documented | ||
| 4 | + and have been deprecated since Python 3.3. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -776,17 +776,6 @@ PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename) | |||
| 776 | 776 | return result; | |
| 777 | 777 | } | |
| 778 | 778 | ||
| 779 | - #ifdef MS_WINDOWS | ||
| 780 | - PyObject * | ||
| 781 | - PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename) | ||
| 782 | - { | ||
| 783 | - PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL; | ||
| 784 | - PyObject *result = PyErr_SetFromErrnoWithFilenameObjects(exc, name, NULL); | ||
| 785 | - Py_XDECREF(name); | ||
| 786 | - return result; | ||
| 787 | - } | ||
| 788 | - #endif /* MS_WINDOWS */ | ||
| 789 | - | ||
| 790 | 779 | PyObject * | |
| 791 | 780 | PyErr_SetFromErrno(PyObject *exc) | |
| 792 | 781 | { | |
@@ -887,20 +876,6 @@ PyObject *PyErr_SetExcFromWindowsErrWithFilename( | |||
| 887 | 876 | return ret; | |
| 888 | 877 | } | |
| 889 | 878 | ||
| 890 | - PyObject *PyErr_SetExcFromWindowsErrWithUnicodeFilename( | ||
| 891 | - PyObject *exc, | ||
| 892 | - int ierr, | ||
| 893 | - const Py_UNICODE *filename) | ||
| 894 | - { | ||
| 895 | - PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL; | ||
| 896 | - PyObject *ret = PyErr_SetExcFromWindowsErrWithFilenameObjects(exc, | ||
| 897 | - ierr, | ||
| 898 | - name, | ||
| 899 | - NULL); | ||
| 900 | - Py_XDECREF(name); | ||
| 901 | - return ret; | ||
| 902 | - } | ||
| 903 | - | ||
| 904 | 879 | PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr) | |
| 905 | 880 | { | |
| 906 | 881 | return PyErr_SetExcFromWindowsErrWithFilename(exc, ierr, NULL); | |
@@ -924,17 +899,6 @@ PyObject *PyErr_SetFromWindowsErrWithFilename( | |||
| 924 | 899 | return result; | |
| 925 | 900 | } | |
| 926 | 901 | ||
| 927 | - PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename( | ||
| 928 | - int ierr, | ||
| 929 | - const Py_UNICODE *filename) | ||
| 930 | - { | ||
| 931 | - PyObject *name = filename ? PyUnicode_FromWideChar(filename, -1) : NULL; | ||
| 932 | - PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObjects( | ||
| 933 | - PyExc_OSError, | ||
| 934 | - ierr, name, NULL); | ||
| 935 | - Py_XDECREF(name); | ||
| 936 | - return result; | ||
| 937 | - } | ||
| 938 | 902 | #endif /* MS_WINDOWS */ | |
| 939 | 903 | ||
| 940 | 904 | PyObject * | |
| Back | FazBrowse Home | New Git URL |
0 commit comments