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

Remove deprecated file open mode 'rU' #41

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

neoformit
Copy link
Contributor

Hoping this will fix the following error. planemo test passes with this:

Traceback (most recent call last):
  File "/mnt/tools/shed_tools/toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/83a19df00eab/seq_filter_by_id/tools/seq_filter_by_id/seq_filter_by_id.py", line 250, in <module>
    handle = open(tabular_file, "rU")
             ^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'

@peterjc
Copy link
Owner

peterjc commented Dec 21, 2023

Thanks. It looks like Python 3.11 turned the warning into an error https://bugs.python.org/issue37330 (not tested to confirm, certainly Python 3.10.12 is still fine).

This solves an error on the latest versions of Python 3
@peterjc
Copy link
Owner

peterjc commented Dec 21, 2023

I'm working on this now - it applies to multiple tools in the repository, and then they need version bumps.

@peterjc
Copy link
Owner

peterjc commented Dec 21, 2023

This will most likely break things under Python 2 (should anyone be mixing their line endings), but that's acceptable at this point in time.

@peterjc
Copy link
Owner

peterjc commented Dec 21, 2023

seq_filter_by_id v0.2.9 is now on the main Tool Shed with your fix - thank you!

(I have not yet updated the rest, I aim to fix #40 first to have automated testing and deployment working again)

(fixed typo, not -> now)

@peterjc peterjc merged commit 8517e3f into peterjc:master Dec 21, 2023
@neoformit
Copy link
Contributor Author

Brilliant thanks for the quick response Peter

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

Successfully merging this pull request may close these issues.

2 participants