Skip to contentSkip to conversation

Move to xdrlib3

PATCH Applied Jeff Layton 2 participants 5 messages Jan 22, 2025 – Feb 10, 2025

Subsystems (2)
lore
Share & tools
lore

Jeff Layton

author maintainer
#0 lore raw

PATCH 1/1 Move to xdrlib3

As of python 3.13, the xdrlib module is no longer included. Fortunately there is an xdrlib3 module, which is a fork of the bundled module:

https://pypi.org/project/xdrlib3/

Change pynfs to use that instead and revise the documentation to include a step to install that module.

---
 README                                | 8 +++++++-
 nfs4.0/lib/rpc/rpc.py                 | 2 +-
 nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py | 2 +-
 nfs4.0/nfs4lib.py                     | 2 +-
 nfs4.0/nfs4server.py                  | 2 +-
 rpc/security.py                       | 2 +-
 xdr/xdrgen.py                         | 4 ++--
 7 files changed, 14 insertions(+), 8 deletions(-)
README +7 -1
index b8b4e775f7766086f870f2dda4a60b3e9f9bac6f..efdc23807e8107b8fcd575e8a4c80b9c73e3cd07 100644
@@ -14,8 +14,14 @@ Install dependent modules:
 * openSUSE
 	zypper install krb5-devel python3-devel swig python3-gssapi python3-ply
 
-You can prepare both for use with
+Install the xdrlib3 module:
+
+	pip install xdrlib3
+
+You can prepare both versions for use with
+
 	./setup.py build
+
 which will create auto-generated files and compile any shared libraries
 in place.
 
nfs4.0/lib/rpc/rpc.py +1 -1
index 243ef9e31aa83eb6be18800065b63cf78d99f833..475179042530a8d602a51e7bad1af7958ff5dd56 100644
@@ -9,7 +9,7 @@
 
 from __future__ import absolute_import
 import struct
-import xdrlib
+import xdrlib3 as xdrlib
 import socket
 import select
 import threading
nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py +1 -1
index 1e990a369e6588f24dff75e9569c104d775ff710..2581a1e1dca22f637dc32144a05c88c66c57665e 100644
@@ -1,7 +1,7 @@
 from .base import SecFlavor, SecError
 from rpc.rpc_const import AUTH_SYS
 from rpc.rpc_type import opaque_auth
-from xdrlib import Packer, Error
+from xdrlib3 import Packer, Error
 
 class SecAuthSys(SecFlavor):
     # XXX need better defaults
nfs4.0/nfs4lib.py +1 -1
index eddcd862bc2fe2061414fb4de61e52aed93495ae..2337d8cd190de90e4d158b3ef9e3dfd6a61027c5 100644
@@ -41,7 +41,7 @@ import xdrdef.nfs4_const as nfs4_const
 from  xdrdef.nfs4_const import *
 import xdrdef.nfs4_type as nfs4_type
 from xdrdef.nfs4_type import *
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
 import xdrdef.nfs4_pack as nfs4_pack
 
 import nfs_ops
nfs4.0/nfs4server.py +1 -1
index 2dbad3046709ea57c1503a36649d85c25e6301a8..10bf28ee5794684912fa8e6d19406e06bf88b742 100755
@@ -34,7 +34,7 @@ import time, StringIO, random, traceback, codecs
 import StringIO
 import nfs4state
 from nfs4state import NFS4Error, printverf
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
 
 unacceptable_names = [ "", ".", ".." ]
 unacceptable_characters = [ "/", "~", "#", ]
rpc/security.py +1 -1
index 0682f438cd6237334c59e7cb280c8b192e7c8a76..789280c5d7328a928b2f6c1af95397d17180eff9 100644
@@ -3,7 +3,7 @@ from .rpc_const import AUTH_NONE, AUTH_SYS, RPCSEC_GSS, SUCCESS, CALL, \
 from .rpc_type import opaque_auth, authsys_parms
 from .rpc_pack import RPCPacker, RPCUnpacker
 from .gss_pack import GSSPacker, GSSUnpacker
-from xdrlib import Packer, Unpacker
+from xdrlib3 import Packer, Unpacker
 from . import rpclib
 from .gss_const import *
 from . import gss_type
xdr/xdrgen.py +2 -2
index b472e50676799915ea3b6a14f6686a5973484fb2..f802ba80045e79716a71fa7a64d72f1b8831128d 100755
@@ -1357,8 +1357,8 @@ pack_header = """\
 import sys,os
 from . import %s as const
 from . import %s as types
-import xdrlib
-from xdrlib import Error as XDRError
+import xdrlib3 as xdrlib
+from xdrlib3 import Error as XDRError
 
 class nullclass(object):
     pass

---
base-commit: d042a1f6421985b7c9d17edf8eb0d59bcf7f5908
change-id: 20250122-master-68414e8f6d5f

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
#1 lore raw
Quoted 24 lines · Jeff Layton

As of python 3.13, the xdrlib module is no longer included. Fortunately there is an xdrlib3 module, which is a fork of the bundled module:

https://pypi.org/project/xdrlib3/

Change pynfs to use that instead and revise the documentation to include a step to install that module.

---
  README                                | 8 +++++++-
  nfs4.0/lib/rpc/rpc.py                 | 2 +-
  nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py | 2 +-
  nfs4.0/nfs4lib.py                     | 2 +-
  nfs4.0/nfs4server.py                  | 2 +-
  rpc/security.py                       | 2 +-
  xdr/xdrgen.py                         | 4 ++--
  7 files changed, 14 insertions(+), 8 deletions(-)
README +0 -0
index b8b4e775f7766086f870f2dda4a60b3e9f9bac6f..efdc23807e8107b8fcd575e8a4c80b9c73e3cd07 100644

README Install dependent modules: · line 19

Quoted 7 lines
README +3 -1
@@ -14,8 +14,14 @@ Install dependent modules:
  * openSUSE
  	zypper install krb5-devel python3-devel swig python3-gssapi python3-ply
 
-You can prepare both for use with
+Install the xdrlib3 module:
+
+	pip install xdrlib3

Thanks Jeff,

I see that Debian's unstable & testing suites have a pkg (python3-standard-xdrlib) to provide this post-removal from standard Python. Of course, that's not in general release, yet, but then neither is 3.13 itself. Not sure if we should mention it?

e.g: your distro may provide xdrlib3 via a pkg (details…), or you may install it via pip…

or similar?

cheers,
c.

Quoted 94 lines
README +4 -0
+
+You can prepare both versions for use with
+
  	./setup.py build
+
  which will create auto-generated files and compile any shared libraries
  in place.
 
nfs4.0/lib/rpc/rpc.py +1 -1
index 243ef9e31aa83eb6be18800065b63cf78d99f833..475179042530a8d602a51e7bad1af7958ff5dd56 100644
@@ -9,7 +9,7 @@
 
  from __future__ import absolute_import
  import struct
-import xdrlib
+import xdrlib3 as xdrlib
  import socket
  import select
  import threading
nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py +1 -1
index 1e990a369e6588f24dff75e9569c104d775ff710..2581a1e1dca22f637dc32144a05c88c66c57665e 100644
@@ -1,7 +1,7 @@
  from .base import SecFlavor, SecError
  from rpc.rpc_const import AUTH_SYS
  from rpc.rpc_type import opaque_auth
-from xdrlib import Packer, Error
+from xdrlib3 import Packer, Error
 
  class SecAuthSys(SecFlavor):
      # XXX need better defaults
nfs4.0/nfs4lib.py +1 -1
index eddcd862bc2fe2061414fb4de61e52aed93495ae..2337d8cd190de90e4d158b3ef9e3dfd6a61027c5 100644
@@ -41,7 +41,7 @@ import xdrdef.nfs4_const as nfs4_const
  from  xdrdef.nfs4_const import *
  import xdrdef.nfs4_type as nfs4_type
  from xdrdef.nfs4_type import *
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
  import xdrdef.nfs4_pack as nfs4_pack
 
  import nfs_ops
nfs4.0/nfs4server.py +1 -1
index 2dbad3046709ea57c1503a36649d85c25e6301a8..10bf28ee5794684912fa8e6d19406e06bf88b742 100755
@@ -34,7 +34,7 @@ import time, StringIO, random, traceback, codecs
  import StringIO
  import nfs4state
  from nfs4state import NFS4Error, printverf
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
 
  unacceptable_names = [ "", ".", ".." ]
  unacceptable_characters = [ "/", "~", "#", ]
rpc/security.py +1 -1
index 0682f438cd6237334c59e7cb280c8b192e7c8a76..789280c5d7328a928b2f6c1af95397d17180eff9 100644
@@ -3,7 +3,7 @@ from .rpc_const import AUTH_NONE, AUTH_SYS, RPCSEC_GSS, SUCCESS, CALL, \
  from .rpc_type import opaque_auth, authsys_parms
  from .rpc_pack import RPCPacker, RPCUnpacker
  from .gss_pack import GSSPacker, GSSUnpacker
-from xdrlib import Packer, Unpacker
+from xdrlib3 import Packer, Unpacker
  from . import rpclib
  from .gss_const import *
  from . import gss_type
xdr/xdrgen.py +2 -3
index b472e50676799915ea3b6a14f6686a5973484fb2..f802ba80045e79716a71fa7a64d72f1b8831128d 100755
@@ -1357,8 +1357,8 @@ pack_header = """\
  import sys,os
  from . import %s as const
  from . import %s as types
-import xdrlib
-from xdrlib import Error as XDRError
+import xdrlib3 as xdrlib
+from xdrlib3 import Error as XDRError
 
  class nullclass(object):
      pass
 
---

base-commit: d042a1f6421985b7c9d17edf8eb0d59bcf7f5908
change-id: 20250122-master-68414e8f6d5f

Best regards,

author maintainer
#2 lore raw
Quoted 40 lines · Calum Mackay
Quoted 24 lines · Jeff Layton

As of python 3.13, the xdrlib module is no longer included. Fortunately there is an xdrlib3 module, which is a fork of the bundled module:

https://pypi.org/project/xdrlib3/

Change pynfs to use that instead and revise the documentation to include a step to install that module.

---
  README                                | 8 +++++++-
  nfs4.0/lib/rpc/rpc.py                 | 2 +-
  nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py | 2 +-
  nfs4.0/nfs4lib.py                     | 2 +-
  nfs4.0/nfs4server.py                  | 2 +-
  rpc/security.py                       | 2 +-
  xdr/xdrgen.py                         | 4 ++--
  7 files changed, 14 insertions(+), 8 deletions(-)
README +0 -0
index b8b4e775f7766086f870f2dda4a60b3e9f9bac6f..efdc23807e8107b8fcd575e8a4c80b9c73e3cd07 100644

README Install dependent modules: · line 19

Quoted 7 lines
README +3 -1
@@ -14,8 +14,14 @@ Install dependent modules:
  * openSUSE
  	zypper install krb5-devel python3-devel swig python3-gssapi python3-ply
 
-You can prepare both for use with
+Install the xdrlib3 module:
+
+	pip install xdrlib3

Thanks Jeff,

I see that Debian's unstable & testing suites have a pkg (python3-standard-xdrlib) to provide this post-removal from standard Python. Of course, that's not in general release, yet, but then neither is 3.13 itself. Not sure if we should mention it?

Quoted 8 lines

e.g: your distro may provide xdrlib3 via a pkg (details…), or you may install it via pip…
or similar?

cheers,
c.

Sure, I'm fine with phrasing it that way. Mind fixing it up when you merge it?

I'm on Fedora 41 which ships with python 3.13, so I think it is in general release now. Fedora doesn't have xdrlib3 packaged however, so I just used pip.

Quoted 97 lines
Quoted 95 lines
README +4 -0
+
+You can prepare both versions for use with
+
  	./setup.py build
+
  which will create auto-generated files and compile any shared libraries
  in place.
 
nfs4.0/lib/rpc/rpc.py +1 -1
index 243ef9e31aa83eb6be18800065b63cf78d99f833..475179042530a8d602a51e7bad1af7958ff5dd56 100644
@@ -9,7 +9,7 @@
 
  from __future__ import absolute_import
  import struct
-import xdrlib
+import xdrlib3 as xdrlib
  import socket
  import select
  import threading
nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py +1 -1
index 1e990a369e6588f24dff75e9569c104d775ff710..2581a1e1dca22f637dc32144a05c88c66c57665e 100644
@@ -1,7 +1,7 @@
  from .base import SecFlavor, SecError
  from rpc.rpc_const import AUTH_SYS
  from rpc.rpc_type import opaque_auth
-from xdrlib import Packer, Error
+from xdrlib3 import Packer, Error
 
  class SecAuthSys(SecFlavor):
      # XXX need better defaults
nfs4.0/nfs4lib.py +1 -1
index eddcd862bc2fe2061414fb4de61e52aed93495ae..2337d8cd190de90e4d158b3ef9e3dfd6a61027c5 100644
@@ -41,7 +41,7 @@ import xdrdef.nfs4_const as nfs4_const
  from  xdrdef.nfs4_const import *
  import xdrdef.nfs4_type as nfs4_type
  from xdrdef.nfs4_type import *
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
  import xdrdef.nfs4_pack as nfs4_pack
 
  import nfs_ops
nfs4.0/nfs4server.py +1 -1
index 2dbad3046709ea57c1503a36649d85c25e6301a8..10bf28ee5794684912fa8e6d19406e06bf88b742 100755
@@ -34,7 +34,7 @@ import time, StringIO, random, traceback, codecs
  import StringIO
  import nfs4state
  from nfs4state import NFS4Error, printverf
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
 
  unacceptable_names = [ "", ".", ".." ]
  unacceptable_characters = [ "/", "~", "#", ]
rpc/security.py +1 -1
index 0682f438cd6237334c59e7cb280c8b192e7c8a76..789280c5d7328a928b2f6c1af95397d17180eff9 100644
@@ -3,7 +3,7 @@ from .rpc_const import AUTH_NONE, AUTH_SYS, RPCSEC_GSS, SUCCESS, CALL, \
  from .rpc_type import opaque_auth, authsys_parms
  from .rpc_pack import RPCPacker, RPCUnpacker
  from .gss_pack import GSSPacker, GSSUnpacker
-from xdrlib import Packer, Unpacker
+from xdrlib3 import Packer, Unpacker
  from . import rpclib
  from .gss_const import *
  from . import gss_type
xdr/xdrgen.py +2 -3
index b472e50676799915ea3b6a14f6686a5973484fb2..f802ba80045e79716a71fa7a64d72f1b8831128d 100755
@@ -1357,8 +1357,8 @@ pack_header = """\
  import sys,os
  from . import %s as const
  from . import %s as types
-import xdrlib
-from xdrlib import Error as XDRError
+import xdrlib3 as xdrlib
+from xdrlib3 import Error as XDRError
 
  class nullclass(object):
      pass
 
---

base-commit: d042a1f6421985b7c9d17edf8eb0d59bcf7f5908
change-id: 20250122-master-68414e8f6d5f

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
#3 lore raw
Quoted 45 lines · Jeff Layton
Quoted 44 lines · Calum Mackay
Quoted 24 lines · Jeff Layton

As of python 3.13, the xdrlib module is no longer included. Fortunately there is an xdrlib3 module, which is a fork of the bundled module:

https://pypi.org/project/xdrlib3/

Change pynfs to use that instead and revise the documentation to include a step to install that module.

---
   README                                | 8 +++++++-
   nfs4.0/lib/rpc/rpc.py                 | 2 +-
   nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py | 2 +-
   nfs4.0/nfs4lib.py                     | 2 +-
   nfs4.0/nfs4server.py                  | 2 +-
   rpc/security.py                       | 2 +-
   xdr/xdrgen.py                         | 4 ++--
   7 files changed, 14 insertions(+), 8 deletions(-)
README +0 -0
index b8b4e775f7766086f870f2dda4a60b3e9f9bac6f..efdc23807e8107b8fcd575e8a4c80b9c73e3cd07 100644

README Install dependent modules: · line 19

Quoted 7 lines
README +3 -1
@@ -14,8 +14,14 @@ Install dependent modules:
   * openSUSE
   	zypper install krb5-devel python3-devel swig python3-gssapi python3-ply
 
-You can prepare both for use with
+Install the xdrlib3 module:
+
+	pip install xdrlib3

Thanks Jeff,

I see that Debian's unstable & testing suites have a pkg (python3-standard-xdrlib) to provide this post-removal from standard Python. Of course, that's not in general release, yet, but then neither is 3.13 itself. Not sure if we should mention it?

e.g: your distro may provide xdrlib3 via a pkg (details…), or you may install it via pip…
or similar?

Quoted 7 lines
Quoted 4 lines

cheers,
c.

Sure, I'm fine with phrasing it that way. Mind fixing it up when you merge it?

Yes, of course! Thanks again,

cheers,
c.

Quoted 103 lines

I'm on Fedora 41 which ships with python 3.13, so I think it is in general release now. Fedora doesn't have xdrlib3 packaged however, so I just used pip.

Quoted 97 lines
Quoted 95 lines
README +4 -0
+
+You can prepare both versions for use with
+
   	./setup.py build
+
   which will create auto-generated files and compile any shared libraries
   in place.
 
nfs4.0/lib/rpc/rpc.py +1 -1
index 243ef9e31aa83eb6be18800065b63cf78d99f833..475179042530a8d602a51e7bad1af7958ff5dd56 100644
@@ -9,7 +9,7 @@
 
   from __future__ import absolute_import
   import struct
-import xdrlib
+import xdrlib3 as xdrlib
   import socket
   import select
   import threading
nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py +1 -1
index 1e990a369e6588f24dff75e9569c104d775ff710..2581a1e1dca22f637dc32144a05c88c66c57665e 100644
@@ -1,7 +1,7 @@
   from .base import SecFlavor, SecError
   from rpc.rpc_const import AUTH_SYS
   from rpc.rpc_type import opaque_auth
-from xdrlib import Packer, Error
+from xdrlib3 import Packer, Error
 
   class SecAuthSys(SecFlavor):
       # XXX need better defaults
nfs4.0/nfs4lib.py +1 -1
index eddcd862bc2fe2061414fb4de61e52aed93495ae..2337d8cd190de90e4d158b3ef9e3dfd6a61027c5 100644
@@ -41,7 +41,7 @@ import xdrdef.nfs4_const as nfs4_const
   from  xdrdef.nfs4_const import *
   import xdrdef.nfs4_type as nfs4_type
   from xdrdef.nfs4_type import *
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
   import xdrdef.nfs4_pack as nfs4_pack
 
   import nfs_ops
nfs4.0/nfs4server.py +1 -1
index 2dbad3046709ea57c1503a36649d85c25e6301a8..10bf28ee5794684912fa8e6d19406e06bf88b742 100755
@@ -34,7 +34,7 @@ import time, StringIO, random, traceback, codecs
   import StringIO
   import nfs4state
   from nfs4state import NFS4Error, printverf
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
 
   unacceptable_names = [ "", ".", ".." ]
   unacceptable_characters = [ "/", "~", "#", ]
rpc/security.py +1 -1
index 0682f438cd6237334c59e7cb280c8b192e7c8a76..789280c5d7328a928b2f6c1af95397d17180eff9 100644
@@ -3,7 +3,7 @@ from .rpc_const import AUTH_NONE, AUTH_SYS, RPCSEC_GSS, SUCCESS, CALL, \
   from .rpc_type import opaque_auth, authsys_parms
   from .rpc_pack import RPCPacker, RPCUnpacker
   from .gss_pack import GSSPacker, GSSUnpacker
-from xdrlib import Packer, Unpacker
+from xdrlib3 import Packer, Unpacker
   from . import rpclib
   from .gss_const import *
   from . import gss_type
xdr/xdrgen.py +2 -3
index b472e50676799915ea3b6a14f6686a5973484fb2..f802ba80045e79716a71fa7a64d72f1b8831128d 100755
@@ -1357,8 +1357,8 @@ pack_header = """\
   import sys,os
   from . import %s as const
   from . import %s as types
-import xdrlib
-from xdrlib import Error as XDRError
+import xdrlib3 as xdrlib
+from xdrlib3 import Error as XDRError
 
   class nullclass(object):
       pass
 
---

base-commit: d042a1f6421985b7c9d17edf8eb0d59bcf7f5908
change-id: 20250122-master-68414e8f6d5f

Best regards,

Applied
#4 lore raw
In reply to Jeff Layton
Quoted 50 lines · Jeff Layton
Quoted 40 lines · Calum Mackay
Quoted 24 lines · Jeff Layton

As of python 3.13, the xdrlib module is no longer included. Fortunately there is an xdrlib3 module, which is a fork of the bundled module:

https://pypi.org/project/xdrlib3/

Change pynfs to use that instead and revise the documentation to include a step to install that module.

---
   README                                | 8 +++++++-
   nfs4.0/lib/rpc/rpc.py                 | 2 +-
   nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py | 2 +-
   nfs4.0/nfs4lib.py                     | 2 +-
   nfs4.0/nfs4server.py                  | 2 +-
   rpc/security.py                       | 2 +-
   xdr/xdrgen.py                         | 4 ++--
   7 files changed, 14 insertions(+), 8 deletions(-)
README +0 -0
index b8b4e775f7766086f870f2dda4a60b3e9f9bac6f..efdc23807e8107b8fcd575e8a4c80b9c73e3cd07 100644

README Install dependent modules: · line 19

Quoted 7 lines
README +3 -1
@@ -14,8 +14,14 @@ Install dependent modules:
   * openSUSE
   	zypper install krb5-devel python3-devel swig python3-gssapi python3-ply
 
-You can prepare both for use with
+Install the xdrlib3 module:
+
+	pip install xdrlib3

Thanks Jeff,

I see that Debian's unstable & testing suites have a pkg (python3-standard-xdrlib) to provide this post-removal from standard Python. Of course, that's not in general release, yet, but then neither is 3.13 itself. Not sure if we should mention it?

Quoted 8 lines

e.g: your distro may provide xdrlib3 via a pkg (details…), or you may install it via pip…
or similar?

cheers,
c.

Quoted 6 lines

Sure, I'm fine with phrasing it that way. Mind fixing it up when you merge it?

I'm on Fedora 41 which ships with python 3.13, so I think it is in general release now. Fedora doesn't have xdrlib3 packaged however, so I just used pip.

Applied, with the fixed-up README.

thanks very much Jeff, apols for the delay.

cheers,
c.

Quoted 99 lines
Quoted 98 lines
Quoted 96 lines
README +4 -0
+
+You can prepare both versions for use with
+
   	./setup.py build
+
   which will create auto-generated files and compile any shared libraries
   in place.
 
nfs4.0/lib/rpc/rpc.py +1 -1
index 243ef9e31aa83eb6be18800065b63cf78d99f833..475179042530a8d602a51e7bad1af7958ff5dd56 100644
@@ -9,7 +9,7 @@
 
   from __future__ import absolute_import
   import struct
-import xdrlib
+import xdrlib3 as xdrlib
   import socket
   import select
   import threading
nfs4.0/lib/rpc/rpcsec/sec_auth_sys.py +1 -1
index 1e990a369e6588f24dff75e9569c104d775ff710..2581a1e1dca22f637dc32144a05c88c66c57665e 100644
@@ -1,7 +1,7 @@
   from .base import SecFlavor, SecError
   from rpc.rpc_const import AUTH_SYS
   from rpc.rpc_type import opaque_auth
-from xdrlib import Packer, Error
+from xdrlib3 import Packer, Error
 
   class SecAuthSys(SecFlavor):
       # XXX need better defaults
nfs4.0/nfs4lib.py +1 -1
index eddcd862bc2fe2061414fb4de61e52aed93495ae..2337d8cd190de90e4d158b3ef9e3dfd6a61027c5 100644
@@ -41,7 +41,7 @@ import xdrdef.nfs4_const as nfs4_const
   from  xdrdef.nfs4_const import *
   import xdrdef.nfs4_type as nfs4_type
   from xdrdef.nfs4_type import *
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
   import xdrdef.nfs4_pack as nfs4_pack
 
   import nfs_ops
nfs4.0/nfs4server.py +1 -1
index 2dbad3046709ea57c1503a36649d85c25e6301a8..10bf28ee5794684912fa8e6d19406e06bf88b742 100755
@@ -34,7 +34,7 @@ import time, StringIO, random, traceback, codecs
   import StringIO
   import nfs4state
   from nfs4state import NFS4Error, printverf
-from xdrlib import Error as XDRError
+from xdrlib3 import Error as XDRError
 
   unacceptable_names = [ "", ".", ".." ]
   unacceptable_characters = [ "/", "~", "#", ]
rpc/security.py +1 -1
index 0682f438cd6237334c59e7cb280c8b192e7c8a76..789280c5d7328a928b2f6c1af95397d17180eff9 100644
@@ -3,7 +3,7 @@ from .rpc_const import AUTH_NONE, AUTH_SYS, RPCSEC_GSS, SUCCESS, CALL, \
   from .rpc_type import opaque_auth, authsys_parms
   from .rpc_pack import RPCPacker, RPCUnpacker
   from .gss_pack import GSSPacker, GSSUnpacker
-from xdrlib import Packer, Unpacker
+from xdrlib3 import Packer, Unpacker
   from . import rpclib
   from .gss_const import *
   from . import gss_type
xdr/xdrgen.py +2 -3
index b472e50676799915ea3b6a14f6686a5973484fb2..f802ba80045e79716a71fa7a64d72f1b8831128d 100755
@@ -1357,8 +1357,8 @@ pack_header = """\
   import sys,os
   from . import %s as const
   from . import %s as types
-import xdrlib
-from xdrlib import Error as XDRError
+import xdrlib3 as xdrlib
+from xdrlib3 import Error as XDRError
 
   class nullclass(object):
       pass
 
---

base-commit: d042a1f6421985b7c9d17edf8eb0d59bcf7f5908
change-id: 20250122-master-68414e8f6d5f

Best regards,