-
Notifications
You must be signed in to change notification settings - Fork 130
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
Problems reading stdin on Windows 11 Python 3.12 #791
Comments
does it work with the latest xopen 1.x version? 2.0.0 was a massive refactoring that enabled all sorts of cool functionality while also using less code, but as a consequence there were unforeseen bugs. |
I will try and check that next week (won't have access to a Windows machine over the weekend). |
No change with xopen 1.7.0, 1.8.0, or 1.9.0 - and my debugging to stderr still shows the detect_file_format function being called twice. |
I've now been able to reproduce the problem on Windows 10. I can also see where the function is called twice, will see what I can do. |
Interesting, it works on Python 3.10, 3.11 and 3.12.0, but fails on 3.12.4. Bisecting points to commit python/cpython@de347c0 (part of 3.12.3). |
I realize only now that this is the same issue as the one that we encountered in dnaio two days ago when trying to make a new release. This is now fixed by this PR: marcelm/dnaio#148 I’ve also changed the dnaio CI so that the Windows tests run on all supported Python versions, which should help to catch something like this better. |
I actually adjusted my code's test suite after reporting this not to use stdin/stdout so much with cutadapt - otherwise you might have had more bug reports from me ;) |
This issue was identified on peterjc/thapbi-pict#627 where continuous integration tests using cutadapt to generate test inputs started to fail WITHOUT relevant code changes. i.e. Something changes in the AppVeyor Windows environment (unclear what) and/or the PyPI packages (nothing obvious).
I have since reduced this to a local test case under Windows 11, Python 3.12.4 (installed from python.org with the PATH option ticked), and cutadapt 4.9 (installed with
pip install -U cutadapt
):This was then patched to include d9cf273 for a clearer error message.
Working example using a filename and one of the cutadapt test files (the primer isn't really appropriate for this dataset):
Restructured to read from stdin:
Inserting additional logging suggests function
detect_file_format
is called twice, the first time works and says FASTA format. The second time it is part way though the file, and fails.This reminds me of #774, but is something Windows specific it seems.
The text was updated successfully, but these errors were encountered: