{"id":24848,"library":"xdrlib3","title":"xdrlib3","description":"A Python library for encoding and decoding XDR (External Data Representation) data. It is a forked version of Python's standard library `xdrlib` (removed in Python 3.13), intended as a drop-in replacement. Current version 0.1.1, requires Python 3.7+.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/overcat/xdrlib3","tags":["xdr","serialization","encoding","rpc"],"install":[{"cmd":"pip install xdrlib3","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"xdrlib is removed in Python 3.13; xdrlib3 is the replacement.","wrong":"from xdrlib import Packer","symbol":"Packer","correct":"from xdrlib3 import Packer"},{"note":"Same as above, xdrlib is gone in Python 3.13.","wrong":"from xdrlib import Unpacker","symbol":"Unpacker","correct":"from xdrlib3 import Unpacker"}],"quickstart":{"code":"from xdrlib3 import Packer, Unpacker\n\np = Packer()\np.pack_int(42)\ndata = p.get_buffer()\n\nu = Unpacker(data)\nprint(u.unpack_int())  # 42","lang":"python","description":"Basic usage: pack an integer, then unpack it."},"warnings":[{"fix":"Replace `from xdrlib import Packer, Unpacker` with `from xdrlib3 import Packer, Unpacker`.","message":"xdrlib is removed from Python stdlib starting Python 3.13. Code using `from xdrlib import ...` will fail. Migrate to xdrlib3.","severity":"breaking","affected_versions":">=3.13"},{"fix":"Ensure Python >=3.7, as specified in requires_python.","message":"The library is a fork of the old stdlib module. It is not maintained by Python core developers. Check for compatibility if using Python <3.7.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `pip install xdrlib3` and `import xdrlib3`.","message":"The package name on PyPI is `xdrlib3`, but the import module is also `xdrlib3`. Do not confuse with `xdrlib` (the old stdlib) or other XDR libraries.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install and use xdrlib3 instead: `pip install xdrlib3` and change imports to `from xdrlib3 import Packer`.","cause":"Python 3.13 removed the deprecated xdrlib module.","error":"ModuleNotFoundError: No module named 'xdrlib'"},{"fix":"Use `from xdrlib3 import Packer` (not `from xdrlib3.xdrlib import Packer`).","cause":"Typo or incorrect submodule path. The correct import is `from xdrlib3 import Packer`.","error":"ImportError: cannot import name 'Packer' from 'xdrlib3'"},{"fix":"Call `p.pack_int(42)` with an argument.","cause":"Forgetting to pass the value to pack methods.","error":"TypeError: pack_int() missing 1 required positional argument: 'value'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}