Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate the nis module #76188

Closed
floppym mannequin opened this issue Nov 11, 2017 · 7 comments
Closed

deprecate the nis module #76188

floppym mannequin opened this issue Nov 11, 2017 · 7 comments
Labels
3.11 only security fixes build The build process and cross-build type-feature A feature request or enhancement

Comments

@floppym
Copy link
Mannequin

floppym mannequin commented Nov 11, 2017

BPO 32007
Nosy @tiran, @benjaminp, @mcepl, @floppym, @JelleZijlstra, @stratakis, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2022-03-13.19:01:35.147>
created_at = <Date 2017-11-11.17:06:22.963>
labels = ['type-feature', 'build', '3.11']
title = 'deprecate the nis module'
updated_at = <Date 2022-03-13.19:01:35.146>
user = 'https://github.com/floppym'

bugs.python.org fields:

activity = <Date 2022-03-13.19:01:35.146>
actor = 'iritkatriel'
assignee = 'none'
closed = True
closed_date = <Date 2022-03-13.19:01:35.147>
closer = 'iritkatriel'
components = ['Build']
creation = <Date 2017-11-11.17:06:22.963>
creator = 'floppymaster'
dependencies = []
files = []
hgrepos = []
issue_num = 32007
keywords = []
message_count = 7.0
messages = ['306090', '306138', '309699', '321074', '321173', '411342', '415078']
nosy_count = 7.0
nosy_names = ['christian.heimes', 'benjamin.peterson', 'mcepl', 'floppymaster', 'JelleZijlstra', 'cstratak', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue32007'
versions = ['Python 3.11']

@floppym
Copy link
Mannequin Author

floppym mannequin commented Nov 11, 2017

The nis extension module fails to build against glibc-2.26 with the "obsolete-rpc" option disabled.

Downstream bug report: https://bugs.gentoo.org/631488

glibc-2.26 release notes: https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html

The nis module is normally skipped since rpcsvc/yp_prot.h will not exist. However, if the external "libnsl" package is installed, compilation is attempted and fails as given below.

building 'nis' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -march=native -O2 -pipe -g -fwrapv -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I./Include -I. -I/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Include -I/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3 -c /var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Modules/nismodule.c -o build/temp.linux-x86_64-3.6/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Modules/nismodule.o
/var/tmp/portage/dev-lang/python-3.6.3/work/Python-3.6.3/Modules/nismodule.c:17:21: fatal error: rpc/rpc.h: No such file or directory
 #include <rpc/rpc.h>
                     ^
compilation terminated.

To summarize:

glibc no longer provides rpc/rpc.h or rpcsvc/yp_prot.h. One must install a couple of external libraries to provide the same functionality.

The missing rpcsvc/yp_prot.h file can be resolved by installing the "libnsl" package, which installs the header where setup.py expects to find it.

The missing rpc/rpc.h file may be provided by the "libtirpc" package, but this installs the file under /usr/include/tirpc, which must be added to the include path (-I/usr/include/tirpc).

Ideally, pkg-config would be used to find both libnsl and libtirpc.

@floppym floppym mannequin added build The build process and cross-build labels Nov 11, 2017
@benjaminp
Copy link
Contributor

Rather than investing any effort in nis, we should probably just deprecate and eventually remove it.

(If glibc is actually getting rid of something, you know must be very very deprecated.)

@tiran
Copy link
Member

tiran commented Jan 9, 2018

bpo-32521 is a duplicate of this issue. I didn't notice this issue when I created a fix.

  • I agree with Benjamin, let's deprecate the NIS module. NIS/YP functionality has been replaced by NSS a long time ago.
  • We have no infrastructure to use pkg-config from distutils yet, which is a shame.

@mcepl
Copy link
Mannequin

mcepl mannequin commented Jul 5, 2018

It seems to be even more weird. Even with installed libnsl-devel (libnsl-devel-1.2.0-2.5.x86_64 on openSUSE/Tumbleweed) I get this in config.log:

checking for t_open in -lnsl... no

and truly, when grepping for t_open in /usr/include/rpc* I get nothing.

@mcepl
Copy link
Mannequin

mcepl mannequin commented Jul 6, 2018

  • I agree with Benjamin, let's deprecate the NIS module. NIS/YP functionality has been replaced by NSS a long time ago.

Agree. a) who will separate its functionality into separate module for PyPI, b) who start a thread on python-devel?

@iritkatriel iritkatriel added the 3.11 only security fixes label Jan 23, 2022
@iritkatriel iritkatriel changed the title nis module fails to build against glibc-2.26 deprecate the nis module Jan 23, 2022
@iritkatriel iritkatriel added type-feature A feature request or enhancement and removed build The build process and cross-build labels Jan 23, 2022
@JelleZijlstra
Copy link
Member

PEP-549 lists nis among modules to be removed: https://www.python.org/dev/peps/pep-0594/#nis

For what it's worth, when I built 3.11 from source on Ubuntu 16.04 I managed to build the nis extension, without installing any special libraries first.

@iritkatriel
Copy link
Member

is deprecated as per PEP-594, so there is no need for a separate issue for it.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes build The build process and cross-build type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants