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

Python3.13: ModuleNotFoundError: No module named 'xdrlib' #49

Open
Bastian-Krause opened this issue Sep 30, 2024 · 2 comments
Open

Python3.13: ModuleNotFoundError: No module named 'xdrlib' #49

Bastian-Krause opened this issue Sep 30, 2024 · 2 comments

Comments

@Bastian-Krause
Copy link

python-vxi11 uses xdrlib:

import xdrlib

class Packer(xdrlib.Packer):

class Unpacker(xdrlib.Unpacker):

The xdrlib module documentation in the Python standard library reads:

Deprecated since version 3.11, will be removed in version 3.13: The xdrlib module is deprecated (see PEP 594 for details).

Python 3.13 is expected on 2024-10-07.

@heevasti
Copy link

heevasti commented Oct 11, 2024

Importing the vxi11 now indeed fails with ModuleNotFoundError over the xdrlib. Could this be updated to use e.g. the https://pypi.org/project/xdrlib3/ which is a fork, for Python versions >=3.7? Only change needed would be in the import to change it import xdrlib3 as xdrlib. The second fork that is also available, https://pypi.org/project/py-xdrlib/, (version 4.0.2) can also be used. This is even easier if introduced in the project dependencies as the import statement can then stay the same. But the Python version requirement is set for some reason to be >=3.11. This can give compatibility problems with other dependencies to older packages.

@esben
Copy link

esben commented Dec 11, 2024

The easiest solution might be to use https://github.com/youknowone/python-deadlib.

After pip install standard-xdrlib you can do:

>>> import xdrlib
<python-input-0>:1: DeprecationWarning: xdrlib was removed in Python 3.13. Please be aware that you are currently NOT using standard 'xdrlib', but instead a separately installed 'standard-xdrlib'.
  import xdrlib

And the version is currently 3.13.0, so version requirement should even be fine as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants