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

MAINT: xdrlib is going away in Python 3.13 #3934

Closed
tylerjereddy opened this issue Nov 21, 2022 · 6 comments · Fixed by #4271
Closed

MAINT: xdrlib is going away in Python 3.13 #3934

tylerjereddy opened this issue Nov 21, 2022 · 6 comments · Fixed by #4271

Comments

@tylerjereddy
Copy link
Member

On latest develop in Python 3.11: MDAnalysis/topology/TPRParser.py:160: DeprecationWarning: 'xdrlib' is deprecated and slated for removal in Python 3.13

I can't quite tell if this will be dealt with naturally by gh-3929 or not, but doesn't seem to be an explicit objective there?

See also: https://peps.python.org/pep-0594/#xdrlib

@IAlibay
Copy link
Member

IAlibay commented Nov 21, 2022

@tylerjereddy we're replacing this with a vendored package of xdrlib (you can see this under the mda-xdrlib repo), I'm just finishing up an action for releases and tidying up some docs and we should be good to go.

@tylerjereddy
Copy link
Member Author

ah, great, I only searched our open issues I guess

@tylerjereddy
Copy link
Member Author

I wonder if AttributeError: 'PosixPath' object has no attribute 'encode' will go away as well--that seems to happen when initiating universes with pathlib components I think:

    self._xdr = self._file(self.filename)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "MDAnalysis/lib/formats/libmdaxdr.pyx", line 177, in MDAnalysis.lib.formats.libmdaxdr._XDRFile.__cinit__
AttributeError: 'PosixPath' object has no attribute 'encode'

@tylerjereddy
Copy link
Member Author

Ah, that's gh-2497, not sure if that will auto-close with the new effort, but it is already open anyway.

@jbarnoud
Copy link
Contributor

jbarnoud commented Mar 2, 2023

I am looking at the TPR parser at the moment. What is the status of this issue? I see https://github.com/MDAnalysis/mda-xdrlib and https://pypi.org/project/mda-xdrlib/ but it does not seem to be used, is it?

@IAlibay
Copy link
Member

IAlibay commented Mar 2, 2023

@jbarnoud it just needs deploying using this fancy action I am making (generalising for mdakits has been a bit difficult) but more pressing issues got pushed ahead. We have two years and it's a direct import swap (quite literally), so I wouldn't worry about it too much for now.

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

Successfully merging a pull request may close this issue.

3 participants