Re: ipmctl: removal of Python standard libraries in Python 3.13
control: tag -1 +patch
Hi,
You now have two almost identical xdrlib revived packages to choose from...
* python3-mda-xdrlib
* python3-standard-xdrlib
I would suggest to use python3-mda-xdrlib because
it already has two others reverse-dependencies
so we don't need to keep around two copies of
the same thing forever.
Greetings
Emmanuel: no harm was made ;-);
it's easy to drop a binary from src:deadlib
-------
https://packages.debian.org/sid/all/python3-standard-xdrlib/filelist
https://packages.debian.org/sid/all/python3-mda-xdrlib/filelist
tchet@quieter:~/pipes$ reverse-depends -b python3-mda-xdrlib
Reverse-Build-Depends
=====================
* mantis-xray
* mdanalysis
apt-cache search xdrlib
tchet@quieter:~/pipes$ apt show python3-standard-xdrlib
Package: python3-standard-xdrlib
Version: 3.13.0-3
Source: python-deadlib
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Homepage: https://github.com/youknowone/python-deadlib
Description: xdrlib Standard Python Lib (Python 3)
xdrlib was part of the Standard Python Lib. Now it was removed from
Python. See PEP-594.
tchet@quieter:~/pipes$ apt show python3-mda-xdrlib
Package: python3-mda-xdrlib
Version: 0.2.0-3
Source: python-mda-xdrlib
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Homepage: https://github.com/MDAnalysis/mda-xdrlib
Description: Stand-alone XDRLIB module (from cpython 3.10.8)
mda-xdrlib is a stand-alone XDRLIB module extracted from
cpython 3.10.8. The xdrlib package has historically been
a feature of the core Python library. However, as of
Python 3.11, the module was deemed to no longer be widely
used and has been deprecated, with a target removal version
of Python 3.13. Several of the MDAnalysis projects rely on
the xdrlib module for their functionality, specifically for
parsing GROMACS TPR and EDR files. To avoid a need to vendor
in the xdrlib functionality in multiple projects, the
approach of creating this stand-alone module which contains
the Python 3.10.8 xdrlib code and its relevant tests.
tchet@quieter:~/pipes$ diff -u
/usr/lib/python3/dist-packages/mda_xdrlib/xdrlib.py
/usr/lib/python3/dist-packages/xdrlib/__init__.py
--- /usr/lib/python3/dist-packages/mda_xdrlib/xdrlib.py 2024-09-06
05:56:14.000000000 +0200
+++ /usr/lib/python3/dist-packages/xdrlib/__init__.py 2024-12-21
02:18:52.000000000 +0100
@@ -7,6 +7,15 @@
import struct
from io import BytesIO
from functools import wraps
+import warnings
+
+# python-deadlib: Replace deprecation warning not to raise exception
+warnings.warn(
+ f"{__name__} was removed in Python 3.13. "
+ f"Please be aware that you are currently NOT using standard '{__name__}', "
+ f"but instead a separately installed 'standard-{__name__}'.",
+ DeprecationWarning, stacklevel=2
+)
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
@@ -221,9 +230,7 @@
def unpack_list(self, unpack_item):
list = []
- while 1:
- x = self.unpack_uint()
- if x == 0: break
+ while (x := self.unpack_uint()) != 0:
if x != 1:
raise ConversionError('0 or 1 expected, got %r' % (x,))
item = unpack_item()
Reply to: