Issue #18787: spwd.getspnam() now raises a PermissionError if the user
doesn't have privileges.
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
index 1129cb3..9046058 100644
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -471,6 +471,8 @@
the exception will stop a single-threaded server. (Contributed by
Martin Panter in :issue:`23430`.)
+* :func:`spwd.getspnam` now raises a :exc:`PermissionError` instead of
+ :exc:`KeyError` if the user doesn't have privileges.
Changes in the C API
--------------------