Skip to content
Snippets Groups Projects
Unverified Commit 9f06ff96 authored by Brett Cannon's avatar Brett Cannon Committed by GitHub
Browse files

gh-91217: deprecate nis (GH-91606)


Automerge-Triggered-By: GH:brettcannon
parent 304f5b63
No related branches found
No related tags found
No related merge requests found
......@@ -882,6 +882,7 @@ Deprecated
* :mod:`crypt`
* :mod:`imghdr`
* :mod:`msilib`
* :mod:`nis`
* :mod:`nntplib`
(Contributed by Brett Cannon in :issue:`47061`.)
......
from test import support
from test.support import import_helper
import unittest
import warnings
# Skip test if nis module does not exist.
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
nis = import_helper.import_module('nis')
......
Deprecate the nis module.
......@@ -524,5 +524,11 @@ static struct PyModuleDef nismodule = {
PyMODINIT_FUNC
PyInit_nis(void)
{
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"'nis' is deprecated and slated for removal in "
"Python 3.13",
7)) {
return NULL;
}
return PyModuleDef_Init(&nismodule);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment